现在项目需要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(
# -*- coding:utf8 -*- import os import jieba def splitSentence(inputFile): fin = open(inputFile, 'r') #以读的方式打开文件 global fout #以写得方式打开文件 #print fin global stop for eachLine in fin: #print eachLine line = eachLine.strip()#.decode('utf-8', 'ignore') #去除