Ptit_Bleu <ptit_bleu <at> yahoo.fr> writes:
...
> Is there a way to pass arguments to Sweave like Sweave("myfile.rnw",
> namevar="Device2") and it will change namevar by Device2 into the file
> myfile.rnw before creating the .tex file ?
> Or is it possible to do it via another language, that is: loading the rnw
> file, modifying it, saving it and finally calling Sweave ?
You can set an environment variable in the system (SET DELTA=...), and read it
in from R:
Sys.getenv("DELTA")
Works for Windows with a rather inconsistent implementation of environment
strings, so it should work the better with Linux.
Dieter
______________________________________________
[email protected] mailing list
https://stat.ethz.ch/mailman/listinfo/r-help
PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
and provide commented, minimal, self-contained, reproducible code.