Stephan Kolassa <Stephan.Kolassa <at> gmx.de> writes: > I would like to loop over a medium amount of Sweave code, including both R and LaTeX chunks. Is there any way to > do so? As an illustration, can I create a .tex file like this using a loop within a .Rnw file, where the > "1,2,3" comes from some iteration variable in R? > > ################################################ > \documentclass{article} > \usepackage{Sweave} > \begin{document} > Iteration 1 > Iteration 2 > Iteration 3 > \end{document} > ################################################
I normally do this with a \newcommand: all latex stuff in the newcommand{}, passing parameters created by R. Dieter ______________________________________________ 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.