转载请说明. R语言官网:http://www.r-project.org/ R语言软件下载:http://ftp.ctex.org/mirrors/CRAN/ 注:下载时点击 install R for the first time 下面进行一个简单的入门程序学习. 先新建一个txt,叫做 Rice_insect.txt 点我下载,内容为:(用制表符Tab) Year Adult Day Precipitation 1973 27285 15 387.3 1974 239 14
现在项目需要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
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(