setwd('/home/Hornik/tmp/') plot(1 : 5) pdf("unit6a-plot.pdf") plot(1 : 5) dev.off() Sweave("unit6b.Rnw") system("pdflatex unit6b.tex") Sweave("unit6b.Rnw") system("pdflatex unit6b.tex") Sweave("unit6b.Rnw") Sweave("unit6b.Rnw") system("pdflatex unit6b.tex") Sweave("unit6b.Rnw") system("pdflatex unit6b.tex") Sweave("unit6b.Rnw") system("pdflatex unit6b.tex") q()