Skip to content

Doubt about Sweave

2 messages · Ronaldo Reis-Jr., Berwin A Turlach

#
Hi,

At this moment, I make my R output using comments and latex tags in R.
Something like this:

### make a plot
plot(y~x)
dev.copy2eps(file="plot.eps")
# @\includegraphics[width=\linewidth]{plot}@
...

After I include the file saved with this code in a latex document using the 
listings package.

It work.

I reading about Sweave and it make a good output. But all example is made with 
R commands mades in a file. Is possible to make an output with sweave 
interactively in R and after the analysis end export the latex code to a 
file?

Thanks
Ronaldo
#
G'day Ronaldo,
RRJ> I reading about Sweave and it make a good output. But all
    RRJ> example is made with R commands mades in a file. Is possible
    RRJ> to make an output with sweave interactively in R and after
    RRJ> the analysis end export the latex code to a file?
As far as I know, no.  But you may want to look at Peter Wolf's
package 'relax'; see: 
     http://www.wiwi.uni-bielefeld.de/~wolf/software/relax/relax.html
That package may have the functionality that you are looking for.

Cheers,

        Berwin