Daniel Polhamus
2013-Nov-21 16:23 UTC
[Rd] R CMD check (v-3.0.2) not loading $R_CHECK_ENVIRON
Hi all, I'm trying to check a package using R CMD check --as-cran <package>. When I do so, the check fails upon not finding the dependencies which I have installed in a non-standard location. Per the manual, I created ~/.R/check.Renviron : $ cat ~/.R/check.Renviron R_LIBS=/usr/lib64/R/library:/usr/lib64/R/var R_LIBS_SITE=/usr/lib64/R/library:/usr/lib64/R/var No luck. I tried explicitly pointing R_CHECK_ENVIRON to ~/.R/check.Renviron: $ echo $R_CHECK_ENVIRON /root/.R/check.Renviron Still no luck. Finally, I just set R_LIBS globally (which, was empty) before running the check and the dependencies are then found. Just wanted to be sure I'm not missing something before creating a bug report. This is on Ubuntu 10.04 with R-3.0.2, as root. Many thanks... -- Daniel G Polhamus, PhD Metrum Research Group, LLC [[alternative HTML version deleted]]
Dirk Eddelbuettel
2013-Nov-21 16:57 UTC
[Rd] R CMD check (v-3.0.2) not loading $R_CHECK_ENVIRON
On 21 November 2013 at 11:23, Daniel Polhamus wrote: | Hi all, | | I'm trying to check a package using R CMD check --as-cran <package>. When | I do so, the check fails upon not finding the dependencies which I have | installed in a non-standard location. Per the manual, I created | ~/.R/check.Renviron : Who is '~' here? You, or root? | $ cat ~/.R/check.Renviron | R_LIBS=/usr/lib64/R/library:/usr/lib64/R/var | R_LIBS_SITE=/usr/lib64/R/library:/usr/lib64/R/var /usr/lib64/R/var ? Really? You mix system directories with user-controlled ones? Interesting surprises may come your way... | No luck. I tried explicitly pointing R_CHECK_ENVIRON to | ~/.R/check.Renviron: | | $ echo $R_CHECK_ENVIRON | /root/.R/check.Renviron | | Still no luck. Finally, I just set R_LIBS globally (which, was empty) | before running the check and the dependencies are then found. Just wanted | to be sure I'm not missing something before creating a bug report. | | This is on Ubuntu 10.04 with R-3.0.2, as root. Never ever run R as root. If you want to write to /usr/local/lib/R/site-library (as you may want to and should), either change the permissions, or better still add yourself and colleagues to the group owning the directory and/or make the directory group-owned by a group on the system (our choice at work). R 3.0.2 now reflects these permission so you can all write there jointly. That said, this all works here, but I run R as me and never ever as root: edd at max:~$ tail -4 .R/check.Renviron # edd Apr 2003 Allow local install in /usr/local, also add a directory for # Debian packaged CRAN packages, and finally the default dir # edd Jul 2007 Now use R_LIBS_SITE, not R_LIBS R_LIBS_SITE=${R_LIBS_SITE-'/usr/local/lib/R/site-library:/usr/lib/R/site-library:/usr/lib/R/library'} edd at max:~$ The question would have been quite appropriate for r-sig-debian (which also acts as "r-sig-ubuntu"). Lastly: Ubuntu 10.04. Really? I find 12.04 too old. Dirk | Many thanks... | | -- | Daniel G Polhamus, PhD | Metrum Research Group, LLC | | [[alternative HTML version deleted]] | | ______________________________________________ | R-devel at r-project.org mailing list | https://stat.ethz.ch/mailman/listinfo/r-devel -- Dirk Eddelbuettel | edd at debian.org | http://dirk.eddelbuettel.com
Seemingly Similar Threads
- R CMD check error
- R CMD check not reading R_LIBS from ~/.R/check.Renviron
- Trouble building package using R in development
- How to go about getting a change in the SPEC file from which R is built on EPEL?
- R CMD check --as-cran attempts to hide R_LIBS_USER but fails