Hi, has anybody encountered and solved the following problem? I continued work now on a different computer where I have also used Sweave successfully before. I can run Sweave() and it generates a .tex file. All code chunks are processed and translated to Latex perfectly fine but somehow only the \Sexpr{} tags are not parsed. This is an example .Rnw: \documentclass{article} \usepackage{Sweave} \begin{document} What is \Sexpr{3*3}? \end{document} And this is the resulting .tex: \documentclass{article} \usepackage{Sweave} \begin{document} What is \Sexpr{3*3}? \end{document} Can anybody give me a hint what's wrong? Many thanks, Werner Lesen Sie Ihre E-Mails auf dem Handy.
Werner Wernersen wrote:> Hi, > > has anybody encountered and solved the following > problem? > > I continued work now on a different computer where I > have also used Sweave successfully before. I can run > Sweave() and it generates a .tex file. All code chunks > are processed and translated to Latex perfectly fine > but somehow only the \Sexpr{} tags are not parsed. > > This is an example .Rnw: > \documentclass{article} > \usepackage{Sweave} > \begin{document} > What is \Sexpr{3*3}? > \end{document}I just ran this example and a correct TeX showed up. sessionInfo() below. MikTeX 2.7. -Tobias> And this is the resulting .tex: > \documentclass{article} > \usepackage{Sweave} > \begin{document} > What is \Sexpr{3*3}? > \end{document}> sessionInfo() R version 2.6.2 (2008-02-08) i386-pc-mingw32 locale: LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United Kingdom.1252;LC_MONETARY=English_United Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base >
Werner Wernersen wrote:> Hi, > > has anybody encountered and solved the following > problem? > > I continued work now on a different computer where I > have also used Sweave successfully before. I can run > Sweave() and it generates a .tex file. All code chunks > are processed and translated to Latex perfectly fine > but somehow only the \Sexpr{} tags are not parsed. > > This is an example .Rnw: > \documentclass{article} > \usepackage{Sweave} > \begin{document} > What is \Sexpr{3*3}? > \end{document}I just ran this example and a correct .tex file showed up. sessionInfo() below. MikTeX 2.7. -Tobias> And this is the resulting .tex: > \documentclass{article} > \usepackage{Sweave} > \begin{document} > What is \Sexpr{3*3}? > \end{document}> sessionInfo() R version 2.6.2 (2008-02-08) i386-pc-mingw32 locale: LC_COLLATE=English_United Kingdom.1252;LC_CTYPE=English_United Kingdom.1252;LC_MONETARY=English_United Kingdom.1252;LC_NUMERIC=C;LC_TIME=English_United Kingdom.1252 attached base packages: [1] stats graphics grDevices utils datasets methods base >
Hi, The problem does not seem to be related to your code (that is working for me) but must be due to the way you called Sweave or your system is configured. What command did you call on the Rnw-file? G EUR On 19.03.2008, at 10:53, Werner Wernersen wrote:> Hi, > > has anybody encountered and solved the following > problem? > > I continued work now on a different computer where I > have also used Sweave successfully before. I can run > Sweave() and it generates a .tex file. All code chunks > are processed and translated to Latex perfectly fine > but somehow only the \Sexpr{} tags are not parsed. > > This is an example .Rnw: > \documentclass{article} > \usepackage{Sweave} > \begin{document} > What is \Sexpr{3*3}? > \end{document} > > And this is the resulting .tex: > \documentclass{article} > \usepackage{Sweave} > \begin{document} > What is \Sexpr{3*3}? > \end{document} > > Can anybody give me a hint what's wrong? > > Many thanks, > Werner > > > Lesen Sie Ihre E-Mails auf dem Handy. > > ______________________________________________ > 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.
Werner Wernersen wrote:> Hi, > > has anybody encountered and solved the following > problem? > > I continued work now on a different computer where I > have also used Sweave successfully before. I can run > Sweave() and it generates a .tex file. All code chunks > are processed and translated to Latex perfectly fine > but somehow only the \Sexpr{} tags are not parsed. > > This is an example .Rnw: > \documentclass{article} > \usepackage{Sweave} > \begin{document} > What is \Sexpr{3*3}? > \end{document} > > And this is the resulting .tex: > \documentclass{article} > \usepackage{Sweave} > \begin{document} > What is \Sexpr{3*3}? > \end{document} > > Can anybody give me a hint what's wrong?No. That file works for me, and you've given no details about how you ran Sweave, what version you were using, etc. Duncan Murdoch