Convert Sweave code to LaTeX listings

This commit switches from Sweave to using the listings package
with basic R code.