问题遇到的现象和发生背景
对disease.txt内基因进行机器学习筛选时,出现subscript out of bounds
“1.norexp_GSE57782.txt”为基因表达矩阵
“disease.txt”内为基因
操作环境、软件版本等信息
> rt=read.table(inputFile, header=T, sep="\t", check.names=F)
> rt=as.matrix(rt)
> rownames(rt)=rt[,1]
> exp=rt[,2:ncol(rt)]
> dimnames=list(rownames(exp),colnames(exp))
> data=matrix(as.numeric(as.matrix(exp)),nrow=nrow(exp),dimnames=dimnames)
> data=avereps(data)
> data=t(data)
> data=data[,read.table("disease.txt", header=F, sep="\t", check.names=F)[,1]]
Error in data[, read.table("disease.txt", header = F, sep = "\t", check.names = F)[, :
subscript out of bounds
在读取数据时出现subscript out of bounds错误
我想要达到的结果
解决报错