a weird beamer feature…

[This article was first published on Xi'an's Og » R, and kindly contributed to R-bloggers]. (You can report issue about the content on this page here)
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

As I was preparing my slides for my third year undergraduate stat course, I got a weird error that got a search on the Web to unravel:

! Extra }, or forgotten endgroup.
endframe ->egroup
  begingroup def @currenvir {frame}
l.23 end{frame}

which was related with a fragile environment

frametitle{simulation in practice}
item For a given distribution $F$, call the corresponding 
pseudo-random generator in an arbitrary computer language
> x=rnorm(10)
> x
 [1] -0.021573 -1.134735  1.359812 -0.887579
 [7] -0.749418  0.506298  0.835791  0.472144
item use the sample as a statistician would
> mean(x)
[1] 0.004892123
> var(x)
[1] 0.8034657
to approximate quantities related with $F$

but not directly the verbatim part: the reason for the bug was that the end{frame} command did not have a line by itself! Which is one rare occurrence where the carriage return has an impact in LaTeX, as far as I know… (The same bug appears when there is an indentation at the beginning of the line. Weird!) [Another annoying feature is wordpress turning > into > in the sourcecode environment…]

Filed under: Books, Kids, Linux, R, Statistics, University life Tagged: Beamer, bootstrap, course, fragile environment, LaTeX, R, random number generation, rnorm(), slides, Statistics, Université Paris Dauphine, verbatim, end{frame}

To leave a comment for the author, please follow the link and comment on their blog: Xi'an's Og » R.

R-bloggers.com offers daily e-mail updates about R news and tutorials about learning R and many other topics. Click here if you're looking to post or find an R/data-science job.
Want to share your content on R-bloggers? click here if you have a blog, or here if you don't.

Never miss an update!
Subscribe to R-bloggers to receive
e-mails with the latest R posts.
(You will not see this message again.)

Click here to close (This popup will not appear again)