Hello, I am trying to start using Sweave. I copy the example from help Sweave
testfile <- system.file("Sweave", "Sweave-test-1.Rnw", package = "utils") ## enforce par(ask=FALSE) options(device.ask.default=FALSE) ## create a LaTeX file Sweave(testfile) ## This can be compiled to PDF by tools::texi2dvi("Sweave-test-1.tex", pdf=TRUE) and I get: > Sweave(testfile) Writing to file Sweave-test-1.tex Processing code chunks ... 1 : print term verbatim 2 : term hide 3 : echo print term verbatim 4 : term verbatim 5 : echo term verbatim 6 : echo term verbatim eps pdf 7 : echo term verbatim eps pdf You can now run LaTeX on 'Sweave-test-1.tex' > tools::texi2dvi("Sweave-test-1.tex", pdf=TRUE) texify: -interaction=nonstopmode: unknown option Error in tools::texi2dvi("Sweave-test-1.tex", pdf = TRUE) : unable to run E:\PortableUSB/PortableApps/MikeTex/miktex/bin/texi2dvi.exe on 'Sweave-test-1.tex' > I installed Portable MikeTex in E:/PortableUSB/PortableApps/MikeText I modified Rprofile.site with .First <- function() { Sys.setenv("JAGS_HOME"=replace.substring.wild(R.home(), "R-*", "JAGS-1.0.3")) Sys.setenv("LATEX"=replace.substring.wild(R.home(),"R*","PortableUSB/PortableApps/MikeTex/miktex/bin/latex.exe")) Sys.setenv("PDFLATEX"=replace.substring.wild(R.home(),"R*","PortableUSB/PortableApps/MikeTex/miktex/bin/texi2dvi.exe")) } Can somebody tell me what other environmental variables to add? or what I am doing wrong? Thanks Heberto Ghezzo McGill University Montreal - Canada ______________________________________________ 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.