#A=data.frame(five=factor(rep(5,30)))#建立数组,30个都是5的一列数
#A=data.frame(count=factor(rep(c(5,4,3,2,1),c(30,25,24,15,10))))#建立数组,5有30个,4有25个,3有24个,2有15个,1有10个
A=data.frame(count=factor(rep(c(1,2,3,4,5),c(172,139,225,69,25))),group="group1")
B=data.frame(count=factor(rep(c(1,2,3,4,5),c(391,241,92,13,3))),group="group2")
C=data.frame(count=factor(rep(c(1,2,3,4,5),c(17,29,21,6,0))),group="group3")
D=data.frame(count=factor(rep(c(1,2,3,4,5),c(215,171,87,6,2))),group="group4")
write.table(A,"./clade2-indica.txt",sep = "\t")
write.table(B,"./clade2-japonica.txt",sep = "\t")
write.table(C,"./clade3-indica.txt",sep = "\t")
write.table(D,"./clade3-japonica.txt",sep = "\t”)
a<-read.table("clade2-indica.txt",sep = '\t',header = T)
b<-read.table("clade2-japonica.txt",sep = '\t',header = T)
c<-read.table("clade3-indica.txt",sep = '\t',header = T)
d<-read.table("clade3-japonica.txt",sep = '\t',header = T)
A<-a$count
B<-b$count
C<-c$count
D<-d$count
boxplot(A,B,C,D)
boxplot(A,B,C,D,ylab="lesion level", col="#D64E41",outline=T,ylim=c(1,5))
boxplot(A,B,C,D,ylab="lesion level", col=c("#91BD47","#FF902A","#91BD47","#FF902A"),outline=T,ylim=c(1,5))
library(clusterProfiler)
网友评论