전체 글 썸네일형 리스트형 크롤링과 스크랩핑 한글 깨지지 않게 하는 방법readLines('http://주소') 원하는 정보를 html에서 얻는 법tmp1=getURL()htmlParse(tmp1,encoding='UTF-8') #UTF-8은 깨짐을 최대한 막기위한 encodingxpathSApply(tmp1,'//div[@class="par"]',xmlValue) #원하는 부분의 정보를 얻는 방법임 //div[@해당글자="~~"]로 하면 됨 더보기 특정 패키지 인스톨 여부 확인 "package이름" %in% rownames(installed.packages()) 더보기 단백질(protein) sequence 얻는 법 library(biomaRt)ensembl=useMart(biomart='ensembl',dataset = "hsapiens_gene_ensembl")#gene symbol로 하는 경우human.prot = getSequence(id="BRCA1", mart=ensembl, seqType=c("peptide"), type="hgnc_symbol")#ensembl_transcript로 하는 경우getSequence(id=tmp2,mart = ensembl, seqType = 'peptide',type = 'ensembl_transcript_id') #GRCh 37로 하는 경우grch37 = useMart(biomart="ENSEMBL_MART_ENSEMBL", host="grch37.ensembl.org".. 더보기 x축 없애고 plot하기 plot( ~~~~~~, xaxt="n")axis(1, at=(숫자로 어디), labels=(어떤 것을 label할지), las=2(수직), cex.axis=(크기를 조절하는 숫자)) 더보기 package detach하는법 패키지 unload detach("package:패키지 이름", unload=TRUE) 더보기 R에서 사용되는 기호들과 의미 (%) Syntax Meaningx + y x plus yx - y x minus yx*y juxtapose x and yx/y x forwardslash yx %%y x나누기 y의 나머지x %+-% y x plus or minus yx %/% y x divided by yx %*% y x times yx %.% y x cdot yx[i] x subscript ix^2 x superscript 2paste(x, y, z) juxtapose x, y, and zsqrt(x) square root of xsqrt(x, y) yth root of xx == y x equals yx != y x is not equal to yx = y .. 더보기 이전 1 ··· 105 106 107 108 다음