[R] Sweave and LaTeX

Renger van Nieuwkoop renger at ecoplan.ch
Thu Oct 4 13:05:06 CEST 2007


Hi
I started using Sweave and LaTeX but have a (smaller) problem. 
As I am not yet very fluent in LaTeX I do the following: I texify my snw-file to look for errors in my LaTeX and correct them.
However, if I have the following chunk, I get an error when texifying:

...
\usepackage{Sweave}
...


<<echo=F, results=tex>>=
workdr<-('c:/aaa/Projekte/IOT2005/Bericht/Workingpapers')
setwd(workdr)
xtable(table_nzo,caption="Importgüter, die nicht einem NOGA-Sektor zugeordnet werden können")
@

The problematic line is the last one before @. If I comment it out, I get no error.  

The error in the LaTeX log is 

! Missing $ inserted.
<inserted text> 
                $
l.26 xtable(table_
                  nzo,caption="Importgüter, die nicht einem NOGA-Sektor zuge...

? 
! Emergency stop.
<inserted text> 
                $
l.26 xtable(table_
                  nzo,caption="Importgüter, die nicht einem NOGA-Sektor zuge...
End of file on the terminal!


Any idea what I am doing wrong?

Renger 



_________________________________________________

ECOPLAN 
Forschung und Beratung in Wirtschaft und Politik
Economic Research and Policy Consultancy

Thunstrasse 22 / CH-3005 Berne (Switzerland)
Phone: +41 31 356 61 61 / Fax: +41 31 356 61 60
mailto:renger at ecoplan.ch  / http://www.ecoplan.ch>



More information about the R-help mailing list