I\'m writing some R notes with Sweave and would like to show common errors. For example,
<>=
x = 5
#Case matters!
x*X
@
>
This is a non-issue with knitr, the "next generation Sweave", if I may say so. It displays errors and warnings by default, which was difficult or impossible in Sweave, along with a plethora of other nice features (like syntax coloring, PGF integration and plot animation, for starters). It is developed and maintained actively, too.
Sweave code must be converted once using the function Sweave2knitr provided by the same package.