1.在linux中安装好R 2.准备好画曼哈顿图的R脚本即manhattan.r,manhattan.r内容如下: #!/usr/bin/Rscript #example : Rscript plot_manhatom.r XXX.assoc XXX.pdf argv <- commandArgs() #define the function to plot the manhatton and quantitle-quantitle plot plot_manhatton<-function(
现在项目需要R语言做几个线性拟合,画一些点图,突然需要画误差线,网上找了下,可以用代码实现..效果如下 xx1<-c(xxxxxx,xxxx,xxxxx) yy1<-c(xxxxxx,xxxx,xxxxx) std1<-c(xxxxxx,xxxx,xxxxx) std2<-c(xxxxxx,xxxx,xxxxx) plot_stdy <- function(x, y, sd, len = 1, col = "black") { len <- len
在R中画地图先从简单的maps包开始. library("maps") 在这个maps包中有一些数据集,用命令data(package=”maps”),可以看到如下数据: canada.cities Database of Canadian cities county.fips FIPS county codes for US County Map countyMapEnv United States County Map f