Re: [Rd] R CMD Sweave versus Sweave() on Windows

From: Prof Brian Ripley <ripley_at_stats.ox.ac.uk>
Date: Thu, 21 Apr 2011 13:17:22 +0100 (BST)

On Thu, 21 Apr 2011, Pfaff, Bernhard Dr. wrote:

> Dear list subscriber,
>
> I am quite puzzled by the behaviour of processing Sweave files within an R session, i.e.
> Sweave("foo.Rnw") versus R CMD Sweave foo.Rnw
>
> In the former the environmental variable 'SWEAVE_STYLEPATH_DEFAULT =
> TRUE' is obeyed (this is set in etc/Renviron.site as well as under
> the users home directory in .Renviron). That is the hard-coded path
> to Sweave.sty is included in the resultant tex-file, whereas if the
> Sweave file is processed from cmd.exe as R CMD Sweave foo.Rnw, only
> \usepackage{Sweave} is included.
>
> Any pointers are much appreciated.

R CMD Sweave does not read the startup files. Try runnning R --vanilla and Sweave("foo.Rnw"): you will see the same.

> Best,
> Bernhard
>
> Output of sessionInfo():
>> sessionInfo()
> R version 2.13.0 (2011-04-13)
> Platform: i386-pc-mingw32/i386 (32-bit)
>
> locale:
> [1] LC_COLLATE=German_Germany.1252 LC_CTYPE=German_Germany.1252
> [3] LC_MONETARY=German_Germany.1252 LC_NUMERIC=C
> [5] LC_TIME=German_Germany.1252
>
> attached base packages:
> [1] stats graphics datasets grDevices utils methods base
>
> other attached packages:
> [1] fortunes_1.4-1
>
>
> Dr. Bernhard Pfaff
> Director
> Global Asset Allocation
>
> Invesco Asset Management Deutschland GmbH
> An der Welle 5
> D-60322 Frankfurt am Main
>
> Tel: +49 (0)69 29807 230
> Fax: +49 (0)69 29807 178
> www.institutional.invesco.com
> Email: bernhard_pfaff_at_fra.invesco.com
>
> Geschäftsführer: Karl Georg Bayer, Bernhard Langer, Dr. Jens Langewand, Alexander Lehmann, Christian Puschmann
> Handelsregister: Frankfurt am Main, HRB 28469
> Sitz der Gesellschaft: Frankfurt am Main
>
>
> *****************************************************************
> Confidentiality Note: The information contained in this ...{{dropped:10}}
>
> ______________________________________________
> R-devel_at_r-project.org mailing list
>
https://stat.ethz.ch/mailman/listinfo/r-devel
>

-- 
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


______________________________________________ R-devel_at_r-project.org mailing list https://stat.ethz.ch/mailman/listinfo/r-devel

Received on Thu 21 Apr 2011 - 12:24:43 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Thu 21 Apr 2011 - 13:30:48 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-devel. Please read the posting guide before posting to the list.

list of date sections of archive