Re: [R] Sweave : change value in rnw file to generate multiple "single"reports ?

From: Duncan Murdoch <murdoch_at_stats.uwo.ca>
Date: Mon, 10 Dec 2007 13:32:43 -0500

On 12/10/2007 11:49 AM, ONKELINX, Thierry wrote:
> I think something like this would work.
>
> Change your query to
>
> rs <- dbSendQuery(con, statement = paste("select * from treatdata where
> name='", whichDevice,"'", sep = ""))
>
> And then create a script like.
>
> whichDevice <- "Device1"
> Sweave("myfile.rnw")
> whichDevice <- "Device2"
> Sweave("myfile.rnw")

Yes, I had forgotten that works. I usually use R CMD Sweave, where (as Gabor mentioned) it's harder to set variables.

Duncan Murdoch



R-help_at_r-project.org 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. Received on Mon 10 Dec 2007 - 18:37:05 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 Mon 10 Dec 2007 - 19:30:20 GMT.

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