Exercise

More YAML hacks

There are many more customizations for RMarkdown reports, and most of them can be configured via the YAML header.

Before you dig deeper into custom stylesheets, let's enable code folding with the code_folding option. This will allow your readers to completely hide all code chunks or show them.

Instructions

100 XP
  • Hide all the code chunks by default by specifying the appropriate key-value-pair in the YAML header.
    • Use code_folding for this, together with either hide or show, whatever makes sense here.
  • Try out another setting: Add numbers to all sections with the number_sections option.
  • Remember: All these settings hierarchically belong to the html_document key.