Skip to content
Prev 127160 / 398500 Next

One pdf file with plots and text output

ONKELINX, Thierry wrote:
I was thinking about Sweave as well, but I don't understand how I can 
use it.

Let's say I have a source file, which defines a function

DoGrowthAll <- function()
   {
     pdf("GrowthAll.pdf", height=11, width=8, paper="a4")
     sink("GrowthAll.txt")
     try(
         {
           plot(x.lm)
           summary(xlm)
           .
           .
           .
         }
         )
     sink()
     dev.off()
     system("xpdf ./GrowthAll.pdf", wait=FALSE)
   }

Now how can I use Sweave to create this report?

Rainer