I do not think it is possible with the 'R CMD Sweave' interface, but
you can always use the 'R -e' approach, e.g. R -e 'Sweave("foo.Rnw");
file.rename("foo.tex", "foo-bar.tex"); tools::texi2dvi('foo-bar.tex')'
(not tested, but idea is there)

To make this more natural, you can try the knitr package which allows
you to specify the output filename, e.g. library(knitr);
knit('foo.Rnw', output = 'foo-bar.tex')

Regards,
Yihui
--
Yihui Xie <xieyi...@gmail.com>
Phone: 515-294-2465 Web: http://yihui.name
Department of Statistics, Iowa State University
2215 Snedecor Hall, Ames, IA


On Fri, Jun 15, 2012 at 4:40 AM, Manish Gupta <mandecent.gu...@gmail.com> wrote:
> HI,
>
> I am working on R and Latex.
>
> R CMD Sweave Test.Rnw  (this generates Rnw.Tex file )
>
> R CMD pdflatex Test.tex  (It generated Test.pdf)
>
> Is there any way to change the name of of output file (Test.pdf).  I want it
> to pass the output file name as parameter.
>
> R CMD Sweave Test.Rnw  Output_File
>
> R CMD pdflatex Output_File.tex
>
> So output file name will be Output_File.pdf
>
> Regards
>

______________________________________________
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.

Reply via email to