[R] Trouble with R CMD check: I can't seem to get dependencies right (maybe I'm using R_LIBS incorrectly?)

Dylan Arena darena at stanford.edu
Fri Sep 5 05:40:27 CEST 2008


Hi there,


I'm in the following directory:

~/Documents/Rstuff/diceFiles/dice_1.1

The directory "dice" is in this directory, with all the usual build
files (DESCRIPTION, NAMESPACE, etc).  I'm trying to run the following
command:

R CMD check dice

(where "dice" is the name of the package I'm checking), and I get the following:

* checking package dependencies ... ERROR
Packages required but not available:
  gtools

My DESCRIPTION file does (correctly) list gtools as a dependency, so
I'm happy this check is ensuring its availability.  What I can't
figure out is how to get the check command to see that gtools is in
fact installed.  I've created a file called .Renviron in my home
directory that has the following line in it:

R_LIBS=~/Documents/Rstuff/library

And in the directory specified by R_LIBS above is the gtools package.
(I've also got a file called .Rprofile in my home directory, with the
line .libPaths("~/Documents/Rstuff/library")
in it.)  My reading of the R-intro manual is that setting R_LIBS in
this way should allow the R CMD check command to search in the
directory specified by R_LIBS when looking for gtools.  I'm pretty
sure at this point, though, that my understanding is incorrect.

At this point I'm in over my depth.  I'm writing because I'm hopeful
that to someone on this list my problem is trivially solvable.  My
basic question is: what must I do to get R CMD check to find the
gtools package?


Please let me know any ideas you might have for me,
Dylan



More information about the R-help mailing list