-
學(xué)習(xí)資源:
-
看分布數(shù)目:
table(a[,8] == "RNA-Seq")
;返回行號:
which(a[,8] == "RNA-Seq")
或者grep("RNA-Seq",a[,8]
(grepl("RNA-Seq",a[,8]
返回T或F);獲取行:
b<-a[which(a[,8] == "RNA-Seq"),]
或者b<-a[a[,8]=="RNA-Seq",]
嚣伐。 t.test(a,b)
t檢驗sub("PE","",tmp)
替換赂毯;unique(sub("PE","",tmp))
boxplot(log(exprSet+1))
注意要+1战虏;exprSet<-exprSet[apply(exprSet,1,function(x) sum(x>1) > 5),]
a<-read.csv("*.csv",stringsAsFactors)<-F)
42.略
vignette()查看某個包的幫助文檔。如
vignette("stringr")
ggpubr boxplot 搜索
localhost 查看服務(wù)器
HTML](https://www.w3school.com.cn/html/index.asp)及HTML DOM基礎(chǔ)知識党涕,實例:peerJ期刊探索烦感、爬取開放期刊影響因子及審稿時長等
-
R基礎(chǔ)繪圖:
text(a,b,,labels=" ",font=1肥荔,...)
#a,b指坐標(biāo)绿渣,font字體,cex方法倍數(shù)燕耿,pch符號(點的樣式)中符,lty線的類型,lwd線的寬度rug(cars$dist,side = 2)
rug坐標(biāo)軸及密度誉帅,bty邊框grid(nx=NA, ny=8, lwd=1, col='skyblue')
grid網(wǎng)格type=p淀散、l、c蚜锨、s等: 點档插、線、其他
plot(pv~uv,xlab=R.version.string,ylab = Sys.time())
Sys.time()pv <- sample(100,10)
sample()segments(pv[1],uv[1],pv[5],uv[5])
線段arrows(1,3,8,3,angle = 60);text(9,3,'angle=60')
箭頭類型 angle=0,30,60,90lines()
折線圖亚再,barplot()
柱狀圖(beside=T)郭膛、條形圖(horiz=T),#設(shè)定顏色 library(RColorBrewer) col <- brewer.pal(11,'Spectral')[1:11]
title(main= ,sub= )
#ggplot作圖 ggplot(mpg, aes(displ, hwy,color=class)) + geom_point() + facet_wrap(~class) ggplot(mpg, aes(hwy)) + geom_histogram() #直方圖 ggplot(mpg, aes(manufacturer)) + geom_bar() #柱狀圖 ggplot(mpg, aes(hwy)) + geom_freqpoly() #頻率多邊形 ggplot(economics, aes(date, unemploy / pop)) +geom_line() #時間序列 ggplot(economics, aes(unemploy / pop, uempmed)) + geom_path() #路徑圖
P13氛悬、P20(10min)饲鄙、P31-33習(xí)題講解 暫時跳過
安裝包常用命令:
install.packages(" ",repos = "http://mirror./////")
BiocManager::install(" ")
devtools::install_github("davidgohel/ReporteRs")