[Rd] Lack of consistent cross-platform behaviour of tools:::buildVignettes()
Hervé Pagès
hpages at fhcrc.org
Thu Sep 16 06:54:54 CEST 2010
Hi,
On both Unix and Windows there is a mechanism to add variables
to the environment when R is started. I noticed that, on Unix,
this mechanism is not used when R is started normally at the
command line but only when it's started using the 'R CMD' syntax.
One problem with this is some lack of consistent cross-platform
behaviour. For example:
On Linux:
$ echo $TEXINPUTS
$ echo "Sys.getenv('TEXINPUTS')" | R --slave
TEXINPUTS
""
But on Windows:
E:\tmp>echo %TEXINPUTS%
%TEXINPUTS%
E:\tmp>echo Sys.getenv("TEXINPUTS") | R\bin\R.exe --slave
TEXINPUTS
".;;E:/biocbld/bbs-2.7-bioc/R/share/texmf/tex/latex;"
So on Linux if I cd to the inst/doc folder of a package source tree
that has a Makefile and run
echo "tools:::buildVignettes('pkgname', '.')" | R --slave
it fails with error:
! LaTeX Error: File `Sweave.sty' not found.
while doing the same thing on Windows works.
Is there any reason for not setting the environments variables
that are defined in ${R_HOME}/bin/Rcmd (the shell script wrapper
for all R CMD commands) when R is started normally?
Thanks,
H.
BTW, I found this (on both, Unix and Windows):
$ echo "Sys.getenv('TEXINPUTS')" | R
Fatal error: you must specify '--save', '--no-save' or '--vanilla'
What about --slave? Thanks!
--
Hervé Pagès
Program in Computational Biology
Division of Public Health Sciences
Fred Hutchinson Cancer Research Center
1100 Fairview Ave. N, M2-B876
P.O. Box 19024
Seattle, WA 98109-1024
E-mail: hpages at fhcrc.org
Phone: (206) 667-5791
Fax: (206) 667-1319
More information about the R-devel
mailing list