[R-sig-Debian] R-3.4.0 and recommended packages

Dirk Eddelbuettel edd at debian.org
Tue Apr 25 18:20:01 CEST 2017


On 25 April 2017 at 16:11, Göran Broström wrote:
| I understand that, but what is then the best practice to avoid having 
| duplicates of the recommended packages? I tried running R as root and
| 
|  > update.packages(checkBuilt=TRUE)
| --- Please select a CRAN mirror for use in this session ---
| Warning: package 'class' in library '/usr/lib/R/library' will not be updated
| Warning: package 'cluster' in library '/usr/lib/R/library' will not be 
| updated
| Warning: package 'codetools' in library '/usr/lib/R/library' will not be 
| updated
| Warning: package 'foreign' in library '/usr/lib/R/library' will not be 
| updated
| Warning: package 'KernSmooth' in library '/usr/lib/R/library' will not 
| be updated
| Warning: package 'lattice' in library '/usr/lib/R/library' will not be 
| updated
| Warning: package 'Matrix' in library '/usr/lib/R/library' will not be 
| updated
| Warning: package 'nlme' in library '/usr/lib/R/library' will not be updated
| Warning: package 'nnet' in library '/usr/lib/R/library' will not be updated
| Warning: package 'spatial' in library '/usr/lib/R/library' will not be 
| updated
| Warning: package 'survival' in library '/usr/lib/R/library' will not be 
| updated
|  >
| 
| Not possible?

update.packages() has several arguments.  As my previous email said, the
library paths seen by R can have __different sources__ on Debian system so
you have to __treat them differently__.

So

    update.packages(lib.loc="/usr/local/lib/R/site-library", checkBuilt=TRUE)

may be what you wanted here.
 
| I also tried
| 
| $ sudo apt install --reinstall r-cran-survival
| 
| to no avail.

It just reinstalls __the same binary__ over and over if you repeat.

| > | 2. Installing from scratch should have this fixed automatically, right?
| >
| > False.
| 
| Thanks. Maybe better to install R from source then.

Absolutely not!

I think you are confused about installing

  - R (ie the interpreter, or engine)
  - R packages from the distribution
  - R packages directly from CRAN

I have worked with that very mix for what must now be over fifteen years
(from when we starting to package r-cran-*) and it just works. I tend to do
mostly 1) and 3) to update R packages more quickly then the distribution
might but that is mostly a personal preference.

This list is good for sortiing these questions out so please continue to post
til you feel you got it working.

Dirk
| 
| Göran

-- 
http://dirk.eddelbuettel.com | @eddelbuettel | edd at debian.org



More information about the R-SIG-Debian mailing list