O'Reilly logo

R Data Analysis Cookbook by Shanthi Viswanathan, Viswa Viswanathan

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Generating reports of your data analysis with R Markdown and knitr

R Markdown provides a simple syntax to define analysis reports. Based on such a report definition, knitr can generate reports in HTML, PDF, Microsoft Word format, and several presentation formats. R Markdown documents contain regular text, embedded R code chunks, and inline R code. knitr parses the markdown document and inserts the results of executing the R code at specified locations within regular text to produce a well-formatted report.

R Markdown extends the regular markdown format to enable us to embed R code.

We can create R Markdown documents either in RStudio or directly in R using the markdown package. In this recipe, we describe the RStudio approach.

Getting ready

If you ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required