[R] R_HOME setting on Linux

Richard Chandler-Mant rchandler-mant at mango-solutions.com
Wed Jul 23 13:06:06 CEST 2014

I have an installation of R 3.0.2 on a CentOS 6.3 distribution in /opt/R/3.0.2

In the R start-up script (/opt/R/3.0.2/bin/R) the value of R_HOME is set to /opt/R/3.0.2/lib/R and this is the value returned from the R.home() function within an R session.

According to the installation documentation (http://cran.r-project.org/doc/manuals/r-release/R-admin.html#Installation) the following statement is made about the R home directory:

"prefix/LIBnn/R or libdir/R
all the rest (libraries, on-line help system, ...). Here LIBnn is usually 'lib', but may be 'lib64' on some 64-bit Linux systems. This is known as the R home directory."

So from this I gather that my R linux installation is correct. The issue I am having is running some of the unit tests that are included with the core R application, specifically the reg-tests-1b.R file in the tests directory which contains the following:

## recursive listing of directories
p <- file.path(R.home(), "share","texmf") # always exists, readable lfri <- list.files(p, recursive=TRUE, include.dirs=TRUE) subdirs <- c("bibtex", "tex") lfnd <- setdiff(list.files(p, all.files=TRUE, no..=TRUE), ".svn") stopifnot(!is.na(match(subdirs, lfri)), identical(subdirs, lfnd)) ## the first failed for a few days, unnoticed, in the development version of R

This test is failing for me because R.home() = /opt/R/3.0.2/lib/R and the directory /opt/R/3.0.2/lib/R/share/texmf does not exist but does exist at /opt/R/3.0.2/share/texmf

Is this a bug with the test or an error in my installation?

Thank you in advance for your help.


LEGAL NOTICE\ \ This message is intended for the use of ...{{dropped:18}}

More information about the R-help mailing list