Beamer

Using knitr in beamer slides

It is straightforward to use Sweave or knitr with beamer; the only thing you need to be careful of is you have to add the fragile option to the frames that contain verbatim code. For LyX users, it is not that easy at the moment but is possible anyway; see FAQ 1 in the official LyX manual for Sweave.

One note on the Rnw source for users who came before knitr 0.6 -- in the past I used this in the preamble:

\ifdefined\knitrout
  \renewenvironment{knitrout}{\begin{footnotesize}}{\end{footnotesize}}
\else
\fi

It will wrap the knitr output in a footnotesize environment, but since knitr 0.6, a single global option size will control the font size of the whole chunk, and this trick is no longer needed.

How about HTML5 slides?

You can actually also try HTML slides, which smell fancy and modern. I have a rough tutorial here.