Skip to content
Prev 360905 / 398506 Next

Warning when running R - can't install packages either

Hi Jakub,

This is really a separate question. It is not really end-user related, 
and should be asked on the R-devel mailing list. Nonetheless, some 
answers below.
On 05/13/2016 03:55 PM, Jakub Jirutka wrote:
R_HOME is set when R starts

~$ env|grep R_HOME
~$ R --vanilla -e "Sys.getenv('R_HOME')"
 > Sys.getenv('R_HOME')
[1] "/home/mtmorgan/bin/R-3-3-branch"

and (after reading the documentation in ?R_HOME it the R help system)

~$ R RHOME
/home/mtmorgan/bin/R-3-3-branch

so there is no need to set it in a system-wide profile. It is sometimes 
referenced inside an R package source tree that uses C or other compiled 
code in a Makevars file, as described in the 'Writing R Extensions' manual

https://cran.r-project.org/doc/manuals/r-release/R-exts.html
e.g., the section on configure and cleanup

https://cran.r-project.org/doc/manuals/r-release/R-exts.html#Configure-and-cleanup

In these circumstances it has been set by the R process that is 
compiling the source code.
As you say, those look like dependencies required to build R itself.

Individual packages may have dependencies on these or other system 
libraries, but many packages do not have system dependencies. It is up 
to the package maintainer to ensure that appropriate checks are made to 
discover the system resource; there are probably dozens or even hundreds 
of system dependencies amongst all of the CRAN packages. Typically the 
task of satisfying those dependencies is left to the user (or to those 
creating distributions of R packages, e.g., 
https://cran.r-project.org/bin/linux/debian/)

Martin Morgan
This email message may contain legally privileged and/or...{{dropped:2}}