본문 바로가기

R8

[R] TCGAbiobanks Reference - https://bioc.ism.ac.jp/packages/3.4/bioc/vignettes/TCGAbiolinks/inst/doc/tcgaBiolinks.html - https://rpubs.com/tiagochst/LUAD_DNA_methylation_data 2022. 3. 10.
[R] table information # list objects in the working environment ls() # list the variables in mydata names(mydata) # list the structure of mydata str(mydata) # list levels of factor v1 in mydata levels(mydata$v1) # dimensions of an object dim(object) # class of an object (numeric, matrix, data frame, etc) class(object) # print mydata mydata # print first 10 rows of mydata head(mydata, n=10) # print last 5 rows of myda.. 2022. 1. 6.
[R] predict https://stat.ethz.ch/R-manual/R-devel/library/stats/html/predict.glm.html 데이터를 통해 GLM으로 모델링한 model이 있다고 해보자. 함수 predict 는 모델로부터 값을 예측해주는 기능을 한다. predict(model, newdata, type=c("link", "response", "terms"), se.fit=FALSE, dispersion=NULL, term=NULL, na.action=na.pass,..) - Parameter * model : glm fittef model from data. * newdata : 예측하고자 하는 값이 있는 데이터. * type : { link : log-odds, response : expecte.. 2021. 10. 19.
[R] Enhanced Volcano plot sudo apt install libfribidi-dev libfreetype6-dev libpng-dev libtiff5-dev libjpeg-dev BiocManager::install('EnhancedVolcano') https://github.com/kevinblighe/EnhancedVolcano dds 2021. 10. 12.
[R] boxplot options https://r-charts.com/distribution/boxplot-function/ pdf(paste0(fname, "_non_vs_normalized.pdf")) par(mar=c(1, 4, 2, 1)) par(mfrow = c(2, 1)) boxplot(log_ndds, notch=TRUE, main = "Non-normalized read counts", ylab="log2(read counts + 1)", names=NA, cex = .2, col = meta$color, border = 8, medcol = 3, outlwd = 0.5, boxlwd = 0.1, whisklwd =0.2) boxplot(log_dds, notch=TRUE, main = "Size-factor-normal.. 2021. 10. 6.
[R] install packages $ vi .Rprofile local({ r 2021. 10. 5.
[R] basic Command Description or result getwd() 현재 디렉토리 setwd('~/set_new_directory/') 현재 디렉토리 바꾸기 install.package("package_name") 패키지 설치 library(installed_package) 패키지 불러오기 numbers 2021. 5. 25.
[R] Clustering Data의 clustered region이 얼마나 되는지, 얼만큼 나눌 수 있는지 measure가 필요한 경우가 있다. install.packages(c("factoextra", "fpc", "NbClust")) library(c(factoextra,fpc,NbClust,ggplot2)) df 2020. 12. 30.