[R] Sweave and \Sexpr{}

Dieter Menne dieter.menne at menne-biomed.de
Thu Feb 5 09:55:48 CET 2009


Felipe Carrillo <mazatlanmexico <at> yahoo.com> writes:

> I am trying to create a dynamic latex table using \Sexpr{} but it's 
> not evaluating it. I also tried the
> example below without Sweave and also fails. I have also copied the 
> Sweave.sty to my working directory but
> nothing seems to work. Do I need to have certain package in order to 
> run \Sexpr{}?

> \documentclass[a4paper]{article}
> \usepackage{C:/R/R-2.8.1/share/texmf/Sweave}
> \begin{document}
> 
... rest removed

Your example works well in my setting when I replace the usepackage by

\usepackage{Sweave}

which is on my file name database path of latex. Make sure you run "update file
name database".

Maybe better start with a tiny example, such as

\documentclass[a4paper]{article}
\usepackage{Sweave}
\begin{document}
\Sexpr{"Hello"}
\end{document}

to locate the problem more precisely.

Dieter



More information about the R-help mailing list