[R] Trouble with Sweave and Beamer

From: Lorenzo Isella <lorenzo.isella_at_gmail.com>
Date: Sat, 09 Apr 2011 14:25:38 +0200


Dear All,
I am running Debian testing on my box and I installed latex and R from the standard repositories.
I am trying my hands at sweave, but somehow I am experiencing problems
(I am trying to use beamer and Sweave). Please see the snippet at the end of the email and saved as report.Rnw. When I run the command

$ R CMD Sweave report.Rnw
Writing to file report.tex
Processing code chunks ...
  1 : echo term verbatim

You can now run LaTeX on 'report.tex'

It looks like everything is ok, but when I pdflatex it, I get an error (I am pasting only the end of the console output)

no file report.nav.
(/usr/share/texmf-texlive/tex/latex/ae/t1aett.fd) Runaway argument?
> x <- rnorm(100) > xm <- mean(x) > xm \end {Sinput} \begin {Soutput}\ETC.
! Paragraph ended before \FV_at_BeginScanning was complete. <to be read again>

                    \par

l.42 \end{frame}

?

Can anyone tell me what is going wrong?
Many thanks

Lorenzo

%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
\documentclass{beamer}
\usetheme{Darmstadt}
\usefonttheme[onlylarge]{structurebold}
\setbeamerfont*{frametitle}{size=\normalsize,series=\bfseries}
\setbeamertemplate{navigation symbols}{}


% Standard packages

\usepackage[english]{babel}
\usepackage[latin1]{inputenc}
\usepackage[T1]{fontenc}
\usepackage{Sweave}


% The main document

\begin{document}

\setlength{\unitlength}{\textwidth} % measure in textwidths

\begin{frame}[t]{Data Representation and Analysis}

<<echo=TRUE>>=
x <- rnorm(100)
xm <- mean(x)
xm

@

\end{frame}



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. Received on Sat 09 Apr 2011 - 12:29:11 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sat 09 Apr 2011 - 13:30:28 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive