简体   繁体   English

在R中安装网格:“错误:无效的Description文件”

[英]Installing lattice in R: “Error : Invalid DESCRIPTION file”

I'm using R 3.0.2 and am trying to install the lattice package, like so: 我正在使用R 3.0.2,并尝试安装grid软件包,如下所示:

install.packages("lattice")

This leads to the following error: 这导致以下错误:

Error : Invalid DESCRIPTION file

Invalid Priority field. Packages with priorities 'base' or 'recommended' or 'defunct-base' must already be known to R.

How can I fix it? 我该如何解决?

Since the DESCRIPTION just seems to contain meta-info, I do not see why this should preclude me from installing the lattice package. 由于DESCRIPTION似乎包含元信息,因此我不明白为什么这会阻止我安装lattice软件包。

Update: 更新:

I have lattice installed, but need a newer version due to some dependencies. 我已经安装了点阵,但由于某些依赖性,需要更新的版本。 Using update.packages() for lattice returns the same error as above. 对晶格使用update.packages()返回与上述相同的错误。 I wonder if it is possible that the newer lattice versions are not compatible with the new R version? 我想知道较新的晶格版本是否与新的R版本不兼容?

Seeing BondedDust referring to DESCRIPTION I started investigating it, and it seems the new package has a Priority field in the DESCRIPTION file, but that the old version of the lattice DESCRIPTION file does not. 看到BondedDust引用了Description,我开始研究它,似乎新包在DESCRIPTION文件中有一个Priority字段,但是旧版的DESCRIPTION文件没有。 Why should this matter? 为什么这很重要?

me@tang:~/test_lattice$ grep Priority /home/endrebak/local/anaconda/lib64/R/library/lattice/DESCRIPTION                                                                                    
me@tang:~/test_lattice$ grep Priority lattice/DESCRIPTION #New version
Priority: recommended

I've tried updating the old DESCRIPTION file with a Priority: recommended line and reloading R, but still 我尝试使用Priority: recommended行更新旧的Description文件并重新加载R,但是仍然

>rownames(installed.packages(priority="recommended"))
NULL
#rownames(installed.packages(priority="base")) works fine, however.

Full error message below: 完整的错误消息如下:

trying URL 'http://cran.uib.no/src/contrib/lattice_0.20-29.tar.gz'
Content type 'application/x-gzip' length 347091 bytes (338 Kb)
* installing *source* package ‘lattice’ ...
** package ‘lattice’ successfully unpacked and MD5 sums checked
Error : Invalid DESCRIPTION file

Invalid Priority field.
Packages with priorities 'base' or 'recommended' or 'defunct-base' must
already be known to R.

See the information on DESCRIPTION files in section 'Creating R
packages' of the 'Writing R Extensions' manual.

ERROR: installing package DESCRIPTION failed for package ‘lattice’
* removing ‘/home/me/local/anaconda/lib64/R/library/lattice’
* restoring previous ‘/home/me/local/anaconda/lib64/R/library/lattice’

The downloaded source packages are in
        ‘/tmp/Rtmptpj1ff/downloaded_packages’
Updating HTML index of packages in '.Library'
Making 'packages.html' ... done
Warning message:
In install.packages("lattice") :
  installation of package ‘lattice’ had non-zero exit status

我通过升级到R 3.2修复了此错误。

我通过删除DESCRIPTION文件中的“ Priority:recommend”这一行来解决了

暂无
暂无

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 R闪亮:文件错误(文件,“ rt”):无效的“描述”参数 - R shiny: Error in file(file, “rt”) : invalid 'description' argument R Openxlsx 包(版本 4.2.2)-文件错误(描述 = xlsxFile):“描述”参数无效 - R Openxlsx package (version 4.2.2) - Error in file(description = xlsxFile) : invalid 'description' argument 使用 openxlsx 将 Excel 数据导入 R:文件中的错误(con,“r”):无效的“描述”参数 - Import Excel data into R using openxlsx: Error in file(con, "r") : invalid 'description' argument 文件错误(文件):运行时无效的“描述”参数 R 图库示例 - Error in file(file) : invalid 'description' argument when running R graph gallery example 文件错误(描述 = xlsxFile):使用 lapply 时“描述”参数无效 - Error in file(description = xlsxFile) : invalid 'description' argument when using lapply 文件中的错误(文件,ifelse(追加,“a”,“w”)):无效的“描述”参数 - Error in file(file, ifelse(append, “a”, “w”)) : invalid 'description' argument 文件(文件,“rt”)中的错误:调用函数时“描述”参数无效 - Error in file(file, "rt") : invalid 'description' argument , when calling the function 如何解决错误“文件错误:无效的'description'参数? - How to resolve error " Error in file : invalid 'description' argument? 将levelplot()保存到R的晶格包中的文件 - Saving levelplot() to file in R's lattice package 使用R包或库安装.zip文件时出错 - Error installing .zip file with R package or library
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM