Reputation: 31918
I'm using R 3.0.2 and am trying to install the lattice package, like so:
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.
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. I wonder if it is possible that the newer lattice versions are not compatible with the new R version?
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. 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
>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
Upvotes: 3
Views: 1794
Reputation: 61
I solved this by just deleting the "Priority: recommended" line in the DESCRIPTION file
Upvotes: -1