Want to try something new and interesting this week for your homework? There’s a great and not terribly difficult way to integrate your written responses to homework questions with R code and graphs without having to do a lot of copying and pasting. It’s an R library called knitr. Revolutions has a great introduction here with a wonderful 5 minute demo video.
I’ve been using knitr to generate slides as pdfs, but you can use knitr with markdown to make really nice html output that you can then print to pdf and send to me. Or you can get into LaTeX if you really want to jump off the deep end (and, hey, it’s how I’ve been writing your homeworks!
One thing I’ve really enjoyed is writing my code in a single file, then using code externalization to pull it into a document. It makes it easy to go back and forth between code and document.
So, take a chance and try it out. There may be a few extra homework points in it for you!