Thanks to Prof Ripley, 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")) PathNew <- paste(Sys.getenv("PATH"),";",replace.substring.wild(R.home(),"R*","PortableUSB/PortableApps/MikeTex/miktex/bin"),sep="") Sys.setenv("PATH"=PathNew) }
Sorry I mispelled MikTex with MikeTex!!, it is MixTex Portable but now I get > tools::texi2dvi("Sweave-test-1.tex", pdf=TRUE) Error in tools::texi2dvi("Sweave-test-1.tex", pdf = TRUE) : running 'texi2dvi' on 'Sweave-test-1.tex' failed LaTeX errors: E:/R/R-2.10.0/etc/Sweave-test-1.tex:66: Undefined control sequence The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, E:/R/R-2.10.0/etc/Sweave-test-1.tex:67: Undefined control sequence The control sequence at the end of the top line of your error message was never \def'ed. If you have misspelled it (e.g., `\hobx'), type `I' and the correct spelling (e.g., `I\hbox'). Otherwise just continue, E:/R/R-2.10.0/etc/Sweave-test-1.tex:67: Extra }, or forgotten $ I've deleted a group-closing symbol because it seems to be spurious, as in `$x}$'. But perhaps the } is legitimate and you forgot something else, as in `\hbox{$x}'. In such cases the way to recover is to insert both the forgotten and the E:/R/R-2.10.0/etc/Sweave-test-1.tex:68: Missing $ inserted I've inserted > which would indicate an error in Sweave, the file used is the file included with R-2.10.0 I am using Windows 7 in a Toshiba Satellite laptop 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.