From josh.m.ulrich at gmail.com  Thu Jul  9 20:36:35 2015
From: josh.m.ulrich at gmail.com (Joshua Ulrich)
Date: Thu, 9 Jul 2015 13:36:35 -0500
Subject: [Rd] R CMD build failure
In-Reply-To: <2f3a88$105o53@ironport10.mayo.edu>
References: <2f3a88$105o53@ironport10.mayo.edu>
Message-ID: <CAPPM_gSNjOGYkxENJ-e+m50hABMa+YKTp0O3Y3s-jOZ_RieNxw@mail.gmail.com>

On Thu, Jul 9, 2015 at 12:26 PM, Therneau, Terry M., Ph.D.
<therneau at mayo.edu> wrote:
> I have a local library 'dart' that imports "httr".  It has routines that
> access central patient data such as birth date, so it is heavily used
> locally but of no interest to anyone else.
>
> The httr library (and 300 others) are in a shared directory, referenced by
> everyone in the biostatistics group via adding this location to the
> .libPaths in their default .Rprofile.  (Actually, their .Rprofile starts by
> running material from a central one, the libPaths is there).
>
> When I run R (3.2.0) all is fine, but R CMD build fails with  the text below
>
> * creating vignettes ... ERROR
> Error: processing vignette 'dart.Rnw' failed with diagnostics:
>  chunk 2 (label = auth1)
> Error : package ?httr? required by ?dart? could not be found
> Execution halted
>
>
> If I add the requiste directory to my R_LIBS_USER environment variable then
> all is fine.  However, that's a nuisance since the location changes over
> time (e.g. R releases).  The system admins have a whole process that keeps
> .bashrc, .Rprofle and etc dot references up to date.   Plugging into this is
> why we use .Rprofile.  They are quite willing to make select changes in the
> central file, but with >1000 users any suggested changes in the overall
> process do not get a warm welcome.
>
> Any ideas?  There is no mention in the Writing R Extentions manual that it
> ignores the Rprofile file.  If "suck it up and use R_LIBS_USER" is the
> answer, well, there are only a few who build packages.
>
It is mentioned in ?Startup:

"'R CMD check' and 'R CMD build' do not always read the standard
startup files, but they do always read specific 'Renviron' files.
The location of these can be controlled by the environment
variables 'R_CHECK_ENVIRON' and 'R_BUILD_ENVIRON'.  If these are
set their value is used as the path for the 'Renviron' file;
otherwise, files '~/.R/check.Renviron' or '~/.R/build.Renviron' or
sub-architecture-specific versions are employed."

Maybe one of those options could work for you?

> PS, I can't use RHOME:/etc/Rprofile.site since the biostat group is not the
> only set of R users.  Some other groups, for instance, cannot even see our
> central area.
>
> Terry T.
>
> ______________________________________________
> R-devel at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-devel

-- 
Joshua Ulrich  |  about.me/joshuaulrich
FOSS Trading  |  www.fosstrading.com



[Rd] R CMD build failure
Joshua Ulrich