From the Blogosphere
Creating Beautiful Reports from R with knitr
People use the R language every day
By: David Smith
Aug. 21, 2012 07:36 PM
People use the R language every day to create the elements of reports: tables, charts, analyses, and forecasts. But assembling all of that information into a print-ready document laid out with text can a hassle. You can cut-and-paste all of the elements into Word, but then what do you do when the data file gets updated at the last minute? (Answer: you have to re-run all the R code and go through the whole cut-and-paste process again. What a pain.)
An alternative is to Sweave, but that requires having a working TeX installation, and learning how to use LaTeX. Now there's an easier-way: Yihui Xie's knitr package. It's a similar to Sweave in that it automates the process of combining text with images, data and code generated by R, but it's easier to learn and use because you structure the document with MarkDown instead of LaTeX. RStudio has great knitr support and the ability to publish generated documents to the cloud for sharing. Take a look at the RStudio RPubs site (and also here) for some stunning examples of documents created with knitr, like the report on integrating R and Google visualizations excerpted below.
For a primer on getting started with knitr and Markdown, see the tutorial from Jeromy Anglim linked below. Jeromy Anglim's Blog: Psychology and Statistics: Getting Started with R Markdown, knitr, and Rstudio 0.96
Latest Cloud Developer Stories
Subscribe to the World's Most Powerful Newsletters
Subscribe to Our Rss Feeds & Get Your SYS-CON News Live!
SYS-CON Featured Whitepapers
Most Read This Week