[R] Trouble with Sweave and Beamer
Lorenzo Isella
lorenzo.isella at gmail.com
Sat Apr 9 14:25:38 CEST 2011
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}
More information about the R-help
mailing list