无法在R centOS 7中使用BioLite-read.table中出错
我在centos 7上使用R,当我尝试安装bioconductor软件包时,我遇到以下错误无法在R centOS 7中使用BioLite-read.table中出错,r,read.table,bioconductor,centos7,R,Read.table,Bioconductor,Centos7,我在centos 7上使用R,当我尝试安装bioconductor软件包时,我遇到以下错误 > source("http://bioconductor.org/biocLite.R") Bioconductor version 3.0 (BiocInstaller 1.16.1), ?biocLite for help > biocLite("affy") Error in read.table(file = file, header = header, sep = sep, quo
> source("http://bioconductor.org/biocLite.R")
Bioconductor version 3.0 (BiocInstaller 1.16.1), ?biocLite for help
> biocLite("affy")
Error in read.table(file = file, header = header, sep = sep, quote = quote, :
no lines available in input
此错误似乎比仅biocLite
更大,因为使用read.table
的其他函数(如affy
包中的rma
)也会抛出相同的错误。我不知道如何解决这个错误。非常感谢您的帮助。谢谢
eset=rma(data,normalize=FALSE)
Error in read.table(file = file, header = header, sep = sep, quote = quote, :
no lines available in input
@里奇棉
我不确定您所说的选项(error=recover)
是什么意思,但我尝试了以下方法
> source("http://bioconductor.org/biocLite.R")
Bioconductor version 3.0 (BiocInstaller 1.16.1), ?biocLite for help
> biocLite("affy")
Error in read.table(file = file, header = header, sep = sep, quote = quote, :
no lines available in input
> traceback()
9: stop("no lines available in input")
8: read.table(file = file, header = header, sep = sep, quote = quote,
dec = dec, fill = fill, comment.char = comment.char, ...)
7: utils::read.delim(file, header = TRUE, comment.char = "#", colClasses = c(rep.int("character",
3L), rep.int("logical", 4L)))
6: tools:::.read_repositories(p)
5: setRepositories(ind = 1:20)
4: .biocinstallRepos(biocVersion = biocVersion)
3: .getContribUrl(biocVersion())
2: bioconductorPackageIsCurrent()
1: biocLite("affy")
> options(error=recover)
> biocLite("affy")
Error in read.table(file = file, header = header, sep = sep, quote = quote, :
no lines available in input
Enter a frame number, or 0 to exit
1: biocLite("affy")
2: bioconductorPackageIsCurrent()
3: .getContribUrl(biocVersion())
4: .biocinstallRepos(biocVersion = biocVersion)
5: setRepositories(ind = 1:20)
6: tools:::.read_repositories(p)
7: utils::read.delim(file, header = TRUE, comment.char = "#", colClasses = c(re
8: read.table(file = file, header = header, sep = sep, quote = quote, dec = dec
Selection: 8
Called from: top level
Browse[1]>
eval(expr,envir,enclos)
eval(substitute(browser(skipCalls=skip),list(skip=7...
当文件存在但为空时,通常会出现错误消息
> system("touch /tmp/123")
> read.table("/tmp/123")
Error in read.table("/tmp/123") : no lines available in input
回溯显示setRepositories()
失败。看来源
> head(setRepositories, 9)
1 function (graphics = getOption("menu.graphics"), ind = NULL,
2 addURLs = character())
3 {
4 if (is.null(ind) && !interactive())
5 stop("cannot set repositories non-interactively")
6 p <- file.path(Sys.getenv("HOME"), ".R", "repositories")
7 if (!file.exists(p))
8 p <- file.path(R.home("etc"), "repositories")
9 a <- tools:::.read_repositories(p)
(在这种情况下,解决方案是删除上面提到的文件)或系统文件
file.path(R.home("etc"), "repositories")
对于后一种情况,对于我来说,从源代码获得的“factory fresh”安装
> length(readLines(p))
[1] 20
但海报可能会得到0。这在centOS中是一个损坏的安装,因此需要更多关于R版本和安装的信息。我相信最近R-devel、R-help或R bug tracker上都有关于这一点的帖子,但我一直找不到。如果直接调用
read.table
会发生什么?工作正常。im定期使用read.table
和read.csv
R是否正确连接到internet?你能从Bioconductor下载其他软件包吗?克兰怎么样?错误发生后,traceback()
的输出是什么?如果使用选项(error=recover)
重新运行,您会看到什么?在问题中添加了以下内容
> length(readLines(p))
[1] 20