Previous chapter
CommunicateRMarkdown Reports
Next chapter

Changing Output Format and Knit

  1. Open FirstRMarkdownDoc.Rmd and add code chunks (STRG-Alt-I)
  2. Change the Ouptut format to pdf_document or word_document and see how the output looks like (knit using STRG-Shift-K)1. Note that pdf_document requires Latex.

Creating Parametrized Report

Generate one Report for each quantile of wt using SecondRMarkdownDoc.Rmd and rmarkdown::render() specifying parameters weight.min and weight.max.

Hint: You can easily test some example output using Knit with Parameters...

Creating Parametrized Report

Generate a dynamic HTML Report using DT::datatable() and plotly.

  • Load Votes vote17 data from 06-plotting-07.rda
  • Create datatables using DT::datatable() with vote17 data.
    • Use first column as Row Names in source data.frame
    • Add caption using parameter caption.
    • Add datatables with relative percentage number using formatPercentage for formatting.
    • Remove Search box, paging buttons and Info line, see parameter options.
  • Create barchart plot using ggplot2 and ggplot() for
  • Absolute numbers
  • Relative percentages

  1. See also http://rmarkdown.rstudio.com/gallery.html for further output formats