下面是数据集(d2):
WT.hypo WT.hyper KO.hypo KO.hyper
1 11.996507 2.406066 10.903488 7.595285
2 10.992267 2.192558 9.399490 7.184496
3 16.797177 11.088748 6.221103 4.293984
4 9.918818 2.937259 6.317434 3.319860
5 NA NA 5.918438 2.914264下面是脚本:
#beeswarm
beeswarm(d2, method="swarm", col = c("black"), pch = 16, cex.axis = 1, cex = 1 )
#add mean
m <- mean(d2, na.rm=T)
segments(0.9,m[[1]],1.1,m[[1]], lwd = 2, lty = 3, col = "black")似乎"m<- mean(d2,na.rm=T)“中缺少一些参数
数据集:
d2=structure(list(WT.hypo = c(11.996507, 10.992267, 16.797177, 9.918818,
NA), WT.hyper = c(2.406066, 2.192558, 11.088748, 2.937259, NA
), KO.hypo = c(10.903488, 9.39949, 6.221103, 6.317434, 5.918438
), KO.hyper = c(7.595285, 7.184496, 4.293984, 3.31986, 2.914264
)), .Names = c("WT.hypo", "WT.hyper", "KO.hypo", "KO.hyper"), class = "data.frame", row.names = c(NA,
-5L))https://stackoverflow.com/questions/44442093
复制相似问题