[R] Executing a DOS proram from R

Chuck Cleland ccleland at optonline.net
Tue Sep 4 14:16:08 CEST 2007


Walter Paczkowski wrote:
> Good morning,
> 
> I wrote a function to generate tables using LaTex.  The function creates a .tex file with all the layouts I want.  I would now like to call pdflatex.exe from inside this same function.  Does anyone know an R command to do this?  And also, what is the form of the pdflatex command to compile a .tex file?  I always use WinEdt so I never actually call pdflatex.exe directly.  Is the call just:
> 
>             pdflatex filename.tex
> 
> or is there something else I need to know to create a pdf file using LaTex?
> 
> Thanks,
> 
> Walt Paczkowski

  The following works for me and puts the resulting PDF into the R
current working directory:

system("pdflatex c:/myfolder/filename.tex")

?system

> ______________________________________________
> R-help at stat.math.ethz.ch 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.

-- 
Chuck Cleland, Ph.D.
NDRI, Inc.
71 West 23rd Street, 8th floor
New York, NY 10010
tel: (212) 845-4495 (Tu, Th)
tel: (732) 512-0171 (M, W, F)
fax: (917) 438-0894



More information about the R-help mailing list