Clean up R code blocks