R语言 去极值
(2014-01-07 16:10:23)
标签:
去极值condagrubber文化 |
分类: R语言 |
@Conda
library(outliers)
####Set parameters######
######set input file name
file = "CHI/pheno.txt"
######set which column will be used
index = 3
######set threshold
threshold = 0.05
outfile = paste(file,"remove.outliers",sep=".")
x = read.table(file,header=T)
p=0
while(p < threshold)
{
}
write.table(x,file=outfile,quote=F,row.names=F,col.names=T,sep="\t")
代码主要是用了outliers包,采用的grubbs检验。没有对具体检验方法设定太多的参数,就设定一些简单参数,能用就行。毕竟项目重点不是这个脚本,这也只是冰山一角而已。