That seems like a bug of Debian; R should be able to find Sweave.sty with > file.path(R.home("share"), "texmf", "tex", "latex", "Sweave.sty") [1] "/usr/share/R/share/texmf/tex/latex/Sweave.sty"
I'm using Ubuntu and R can find Sweave.sty correctly. If possible, I strongly recommend you update R to the latest 2.14.1 (it is pretty easy to update if you set a CRAN mirror; see instructions at http://cran.r-project.org/bin/linux/debian/). There have been many changes in Sweave since 2.11. 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 2012/2/1 Jean-Pierre Chrétien <jeanpierre.chret...@free.fr>: > Le 01/02/2012 17:15, Yihui Xie a écrit : >> >> I guess you compiled the document under >> >> /usr/local/share/lyx-2.0.3svn/examples/, right? >> >> I believe the problem is that R has no write privilege to that >> directory, so the default pdf() device cannot be started there. You >> can copy sweave.lyx to a directory where you have write privilege, and >> see if it compiles correctly. > > > So I opened the example file in the compilation tree (which is under my > personal account) and the error is gone, but now it does not find > Sweave.sty. > > The doc itself says it should, but unfortunately the Debian package puts the > file in > > /usr/share/R/texmf > > instead of the documented > > /usr/share/R/texmf/tex/latex > > So I copied the file as > > /usr/local/texlive/texmf-local/tex/latex/sweave/Sweave.sty > > and ran texhash, and I get the pdf all right. > > Seems thus that the manual does not compile out of the box on Debian > Squeeze, > due to the path problem. > > -- > Jean-Pierre