-
学习资源:
-
看分布数目:
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 查看服务器
HTML](https://www.w3school.com.cn/html/index.asp)及HTML DOM基础知识,实例:peerJ期刊探索、爬取开放期刊影响因子及审稿时长等
-
R基础绘图:
text(a,b,,labels=" ",font=1,...)
#a,b指坐标,font字体,cex方法倍数,pch符号(点的样式),lty线的类型,lwd线的宽度rug(cars$dist,side = 2)
rug坐标轴及密度,bty边框grid(nx=NA, ny=8, lwd=1, col='skyblue')
grid网格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),#设定颜色 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习题讲解 暂时跳过
安装包常用命令:
install.packages(" ",repos = "http://mirror./////")
BiocManager::install(" ")
devtools::install_github("davidgohel/ReporteRs")