Re: [R] Sweave - How to use local objects in code chunks

2010-01-16 Thread Charles C. Berry
On Sat, 16 Jan 2010, Ista Zahn wrote: I don't think it works that way. The .Rnw file should be self-contained. Put all the R code in the .Rnw file (or keep it in a separate file and source() it into the .Rnw file). Right. So the issue is to figure out how to do this in a way that allows Jan-H

Re: [R] Sweave - How to use local objects in code chunks

2010-01-16 Thread Ista Zahn
I don't think it works that way. The .Rnw file should be self-contained. Put all the R code in the .Rnw file (or keep it in a separate file and source() it into the .Rnw file). -Ista On Sat, Jan 16, 2010 at 3:35 PM, Jan-Henrik Pötter wrote: > Hello, > > I wrote a function create_report that ca

[R] Sweave - How to use local objects in code chunks

2010-01-16 Thread Jan-Henrik Pötter
Hello, I wrote a function create_report that calls the function Sweave. create_report shall be used to create a pdf-report about an lm-Object which is passed as an argument to create_report. I try to use an object sel_model, that is created within the function environment of create_report and lat