[R] R CMD build/check on Windows 7

Prof Brian Ripley ripley at stats.ox.ac.uk
Tue Jul 17 19:32:50 CEST 2012


On 17/07/2012 18:20, Bert Gunter wrote:
> Folks:
>
> sessionInfo()
> R version 2.15.0 (2012-03-30)
> Platform: i386-pc-mingw32/i386 (32-bit)
>
> locale:
> [1] LC_COLLATE=English_United States.1252
> [2] LC_CTYPE=English_United States.1252
> [3] LC_MONETARY=English_United States.1252
> [4] LC_NUMERIC=C
> [5] LC_TIME=English_United States.1252
>
> attached base packages:
>   [1] datasets  splines   grid      tcltk     stats     graphics  grDevices
>   [8] utils     methods   base
>
> other attached packages:
> [1] svSocket_0.9-51 lattice_0.19-26 MASS_7.3-17
>
> loaded via a namespace (and not attached):
> [1] cluster_1.14.2 Hmisc_3.9-3    R2HTML_2.2     svMisc_0.9-65
> TinnR_1.0-5
> [6] tools_2.15.0
>
>
> According to section 1.3 of the WRITING R EXTENSIONS manual, both R CMD
> build and R CMD check run R with the '--vanilla' option so no user startup
> files are read.
>
> However,
>
> 1. If I have an Rprofile.site in my etc startup directory, if I am in the
> ...\top directory and try to check or build the top\mypackage source
> package, I can only do so by giving (in the Windows shell, of course) the
> full path name to R CMD build/check, e.g.
> R CMD build pathtoTop\top\mypackage  .
>
> R CMD build mypackage
>
> yields the error:  ERROR  cannot change to directory 'test'
>
>
> 2. However, if I remove (e.g. change the name) of Rprofile.site, then
>
> R CMD build/check mypackage
>
> works fine. Note that my Rprofile.site file DOES contain a setwd()
> statement to some other directory; if I comment out this statement, then I
> also do not need to use the full path name even with the Rprofile.site file
> there.

Well "don't do that"!

> So my question is: Is the documentation wrong? -- Is there an environmental
> or option I need to set/change? -- Is this a Windows "feature" subtlety?

Most likely. Do you have multiple architectures installed?  If so, try 
--no-multiarch.

But this really is an R-devel question.

> Many thanks.
>
> -- Bert
>


-- 
Brian D. Ripley,                  ripley at stats.ox.ac.uk
Professor of Applied Statistics,  http://www.stats.ox.ac.uk/~ripley/
University of Oxford,             Tel:  +44 1865 272861 (self)
1 South Parks Road,                     +44 1865 272866 (PA)
Oxford OX1 3TG, UK                Fax:  +44 1865 272595



More information about the R-help mailing list