eugen pircalabelu
2009-Jan-31 20:32 UTC
[R] Question on Sweave-Latex and examples in the Sweave Manual
Hi List, I have a problem with using Latex and Sweave for creating a document. So I downloaded the Sweave manual from http://www.statistik.lmu.de/~leisch/Sweave/Sweave-manual.pdf and i have tried to replicate the example on pages 4-5, but i encounter the following problem: IT DOES NOT WORK. I can run Sweave, create the .tex file and then when building the .tex file in TeXnikCenter i get all sorts of error messages. The syntax:>Sweave("ex1.Rnw")Writing to file ex1.tex Processing code chunks ... 1 : echo term verbatim 2 : term verbatim eps pdf You can now run LaTeX on 'ex1.tex' I have attached the log file with the error messages. Initially i had a problem with \usepackage {sweave} but i think i have solved (as it is not mentioned in the log file) it by putting it in the .Rnw file and then i copied the Sweave.sty file in the same folder as my Rnw file. I have seen the FAQ section on http://www.statistik.lmu.de/~leisch/Sweave/FAQ.html#x1-14000A.12 (and similar posts in the archive) but still i have problems. I have reinstalled R in C:\R-2.8.1 as it says in the FAQ (and one of the posts in the archive) but i still get 15 errors, one of them being a fatal one, as it can be seen in the log file. Does anyone have a solution for this problem? Thank you very much and have a great day ahead! PS: I have slightly modified the original document as library(ctest) is no longer available> sessionInfo() # i also use TexnikCenter and MikTex 2.7 on my computerR version 2.8.1 (2008-12-22) i386-pc-mingw32 locale: LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base loaded via a namespace (and not attached): [1] grid_2.8.1 lattice_0.17-17 nlme_3.1-89 tools_2.8.1
Ista Zahn
2009-Feb-01 14:16 UTC
[R] Question on Sweave-Latex and examples in the Sweave Manual
Hi Eugene, I didn't get the attachment, so I'm not sure what error messages you are getting. But I think \usepackage{sweave} should be \usepackage{Sweave} (with a capital S). -Ista> ---------- Forwarded message ---------- > From: eugen pircalabelu <eugen_pircalabelu at yahoo.com> > To: R-help <r-help at stat.math.ethz.ch> > Date: Sat, 31 Jan 2009 12:32:11 -0800 (PST) > Subject: [R] Question on Sweave-Latex and examples in the Sweave Manual > Hi List, > > I have a problem with using Latex and Sweave for creating a document. > So I downloaded the Sweave manual from > http://www.statistik.lmu.de/~leisch/Sweave/Sweave-manual.pdf > > and i have tried to replicate the example on pages 4-5, but i encounter the following problem: IT DOES NOT WORK. I can run Sweave, create the .tex file and then when building the .tex file in TeXnikCenter i get all sorts of error messages. > > The syntax: > >>Sweave("ex1.Rnw") > Writing to file ex1.tex > Processing code chunks ... > 1 : echo term verbatim > 2 : term verbatim eps pdf > > You can now run LaTeX on 'ex1.tex' > > I have attached the log file with the error messages. > > Initially i had a problem with \usepackage {sweave} but i think i have solved (as it is not mentioned in the log file) it by putting it in the .Rnw file and then i copied the Sweave.sty file in the same folder as my Rnw file. > > I have seen the FAQ section on > http://www.statistik.lmu.de/~leisch/Sweave/FAQ.html#x1-14000A.12 (and similar posts in the archive) but still i have problems. I have reinstalled R in C:\R-2.8.1 as it says in the FAQ (and one of the posts in the archive) but i still get 15 errors, one of them being a fatal one, as it can be seen in the log file. > > Does anyone have a solution for this problem? > Thank you very much and have a great day ahead! > > > PS: I have slightly modified the original document as > library(ctest) is no longer available > >> sessionInfo() # i also use TexnikCenter and MikTex 2.7 on my computer > > R version 2.8.1 (2008-12-22) > i386-pc-mingw32 > > locale: > LC_COLLATE=English_United States.1252;LC_CTYPE=English_United States.1252;LC_MONETARY=English_United States.1252;LC_NUMERIC=C;LC_TIME=English_United States.1252 > > attached base packages: > [1] stats graphics grDevices utils datasets methods base > > loaded via a namespace (and not attached): > [1] grid_2.8.1 lattice_0.17-17 nlme_3.1-89 tools_2.8.1