[R] Sweave, beamer and alert within code chunks

Giovanni Petris gpetris at uark.edu
Wed May 9 23:13:52 CEST 2012


Hi all,

Using Beamer, in order to highlight a piece of R code I do something
like this - note the "\structure" and "\alert" commands:

\begin{semiverbatim}
> mleOut <- \structure{dlmMLE}(Nile,
+                  parm = c(0.2, 120), # initial values for optimizer
+                  lower = c(1e-7, 0)) \alert<2>{# V must be positive}
> mleOut$convergence  \alert<3>{# always check this!!!}
[1] 0
\end{semiverbatim}

How can I get a similar effect using Sweave?

Thank you in advance!

Best,
Giovanni Petris


-- 

Giovanni Petris  <GPetris at uark.edu>
Associate Professor
Department of Mathematical Sciences
University of Arkansas - Fayetteville, AR 72701
Ph: (479) 575-6324, 575-8630 (fax)
http://definetti.uark.edu/~gpetris/



More information about the R-help mailing list