Dear list,I have read really a lot the past few days, but I haven't found a matching solution for my problem.I have R 2.9.2 on Windows XP and MikTex 2.8 installed.What I want to do is to automate the sweave file generation.I thought I could use the R2Sweave, RweaveLatex, and Sweave in a combination so thatI won't need to do anything.Perhaps some minor modifications at the last step.My purpose is to print text (summaries) and plots on the same pdf file, fast and easily.If later I need to produce a much more elegant paper I know I will need to fix the latexpart of my code.Let's say I have a file of R code "script.R"so in R> R2Sweave("script.R")> RweaveLatex()> Sweave("script.Rnw")> texi2dvi("script.tex", pdf=T)would produce of something like the pdf with the summaries and plots coded inside the "script.R"Thank you [[alternative HTML version deleted]]
I'm not sure I understand. Why not just take your existing R script and wrap it in \begin{document} <<>>= ... @ \end{document} and run it through Sweave? -Ista On Mon, Oct 19, 2009 at 2:40 PM, Gabriel Koutilellis <kgabriel at in.com> wrote:> Dear list,I have read really a lot the past few days, but I haven't found a matching solution for my problem.I have R 2.9.2 on Windows XP and MikTex 2.8 installed.What I want to do is to automate the sweave file generation.I thought I could use the R2Sweave, RweaveLatex, and Sweave in a combination so thatI won't need to do anything.Perhaps some minor modifications at the last step.My purpose is to print text (summaries) and plots on the same pdf file, fast and easily.If later I need to produce a much more elegant paper I know I will need to fix the latexpart of my code.Let's say I have a file of R code "script.R"so in R> R2Sweave("script.R")> RweaveLatex()> Sweave("script.Rnw")> texi2dvi("script.tex", pdf=T)would produce of something like the pdf with the summaries and plots coded inside the "script.R"Thank you > > ? ? ? ?[[alternative HTML version deleted]] > > ______________________________________________ > 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. >-- Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org
here is a simple scriptx texi2dvi("script.tex", pdf=T)would produce of something like the pdf with the summaries and plots coded inside the "script.R"Thank you > >[[alternative HTML version deleted]] > > > Rhelp@rproject.org mailing list > https://stat.ethz.ch/mailman/listinfo/rhelp > PLEASE do read the posting guide http://www.Rproject.org/postingguide.html > and provide commented, minimal, selfcontained, reproducible code. >Ista Zahn Graduate student University of Rochester Department of Clinical and Social Psychology http://yourpsyche.org [[alternative HTML version deleted]]
I use Lyx (www.lyx.org) with the Sweave noweb report or article class for the same purpose (if I understand you correctly). LyX is a LateX front-end where you can embed long and short R code. You can write the complete R program inside the document. For latex tables the most elegant solution is sometimes to write the latex to a file and put the file as an include in the Lyx document. I have a project report that I run every morning to give a refined and up-to-date document in a matter of minutes. 2009/10/19 Gabriel Koutilellis <kgabriel@in.com>> Dear list,I have read really a lot the past few days, but I haven't found a > matching solution for my problem.I have R 2.9.2 on Windows XP and MikTex 2.8 > installed.What I want to do is to automate the sweave file generation.I > thought I could use the R2Sweave, RweaveLatex, and Sweave in a combination > so thatI won't need to do anything.Perhaps some minor modifications at the > last step.My purpose is to print text (summaries) and plots on the same pdf > file, fast and easily.If later I need to produce a much more elegant paper I > know I will need to fix the latexpart of my code.Let's say I have a file of > R code "script.R"so in R> R2Sweave("script.R")> RweaveLatex()> > Sweave("script.Rnw")> texi2dvi("script.tex", pdf=T)would produce of > something like the pdf with the summaries and plots coded inside the > "script.R"Thank you > > [[alternative HTML version deleted]] > > ______________________________________________ > R-help@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. >[[alternative HTML version deleted]]