Using knitr in conjunction with Rmarkdown and RStudio one can produce nice html reports and material for long presentations where pagination into customary slides becomes tedious. With the RStudio html report format you can also incorporate caching to improve execution time, and include somewhat interactive plotly and other Javascript-based graphics. You can easily produce a floating table of contents. The usual floating TOC in RStudio puts the TOC in the left margin, which uses a lot of real estate and results in a narrower working space. Tom Stewart has adapted the html styles to place the floating TOC in the right margin where it collides less often with graphics and text in the report, and the TOC can be clicked off and on.
Here is a recommended template for reports and presentations. You'll see in the button id line the text you will click on to expand or contract the TOC (here, "Outline"). To compile into an html document, use knit to html in Rstudio.
title: "Report Title"
author: "Your Name Department of Biostatistics Vanderbilt University School of Medicine"
date: "`r Sys.Date()`"
output:
html_document:
toc: yes
toc_depth: 3
number_sections: true
toc_float:
collapsed
false code_folding: hide theme: cerulean
css: stewarttoc.css
code_folding: hide
description: "some description ..."
```{r setup,echo=FALSE}
require(Hmisc) # provides knitrSet and other functions
knitrSet(lang='markdown', fig.path='png/', fig.align='left', w=6.5, h=4.5, cache=TRUE)
```
Put the attached stewarttoc.css file in your project directory. Ideally this would be placed in a central location on your computer and symbolically linked to from each project.