[R] finding yap.exe with Sweave

Felipe Carrillo mazatlanmexico at yahoo.com
Thu Jan 1 00:57:33 CET 2009


This is what I did: 
Installed R,Tinn-R and MikTex. Then I tried to Sweave an Rnw file, something like Sweave("test.rnw"),then texi2dvi("test.rnw,pdf=TRUE) but I had a message saying saying that it couldn't find "pdflatex". After doing a little bit of research I went ahead and downloaded notepad++ and followed the wizard instructions which asked me to find the path to C:\Program Files\MikTex\.....latex.exe and then to follow and save the same path to yap.exe. After I did this notepad++ asked me to perform a test to see if I could generate a dvi file which I did and everything worked beautifully. No I am able to run Sweave from R and everything works ok but I feel that I has to be a workaround it because I don't use notepad++ at all, I only used it once to do what I described above. I am thinking that based on what you described, I just need to put Sweave.sty on MikTex path. I'll try that and see what happens. R resides on my C:\drive and MikTex resides in C:\Program
 Files\MikTex so I wonder if those two need to be in the same directory. Thanks for looking into it.


--- On Wed, 12/31/08, Christopher W. Ryan <cryan at binghamton.edu> wrote:

> From: Christopher W. Ryan <cryan at binghamton.edu>
> Subject: Re: [R] finding yap.exe with Sweave
> To: r-help at stat.math.ethz.ch
> Date: Wednesday, December 31, 2008, 12:04 PM
> Hmm, it's been a while since I installed my R and
> Sweave, so I can't
> remember exactly how I did it, but I don't recall any
> particular
> difficulties. I think I had to copy the Sweave.sty to my
> localtexmf
> tree; I see it there now in
> C:\localtexmf\tex\latex\Sweave\Sweave.sty,
> in addition to having it in
> C:\Program
> Files\R\R-2.5.1\share\texmf\Sweave.sty.
> 
> I suppose instead I could have just put the latter
> directory in my
> MikTex as a local tree, in which to look for .sty files.
> 
> I use MikTex too, and I don't use any particular
> editor; I write in
> TinnR but have used Programmers Notepad and others
> successfully.
> 
> What do you mean you had to use, "notepad++ to tell
> Sweave where
> Latex.exe and yap.exe where located under MikTex
> path?"
> 
> --Chris
> Christopher W. Ryan, MD
> SUNY Upstate Medical University Clinical Campus at
> Binghamton
> 40 Arch Street, Johnson City, NY  13790
> cryanatbinghamtondotedu
> PGP public keys available at
> http://home.stny.rr.com/ryancw/
> 
> "If you want to build a ship, don't drum up the
> men to gather wood,
> divide the work and give orders. Instead, teach them to
> yearn for the
> vast and endless sea."  [Antoine de St. Exupery]
> 
> Felipe Carrillo wrote:
> > Dear all:
> > Just to make sure I am on the same page as everyone
> else. 
> > I just got a new computer and had to reinstall MikTex
> and  of course R and Tinn-R. In order to be able to generate
> PDF's with Sweave I had to install notepad++ to tell
> Sweave where Latex.exe and yap.exe where located under
> MikTex path. So,I have two questions: 
> > 1- Do I need to have a Miktex editor in order to use
> Sweave? I am not using the editor because I am generating my
> PDF's from R using Sweave.
> > 2- Is Sweave able to find the path to Latex.exe and
> yap.exe by itself?
> > Everything works fine now but I am just want to get it
> right for future installations.
> > I'm running on windows xp and have R-2.8.1
> installed
> > Thanks in advance
> > 
> > 
> > Felipe D. Carrillo  
> > Supervisory Fishery Biologist  
> > Department of the Interior  
> > US Fish & Wildlife Service  
> > California, USA
> > 
> > ______________________________________________
> > 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.
> >
> 
> ______________________________________________
> 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.




More information about the R-help mailing list