Skip to content

Instantly share code, notes, and snippets.

@multidis
Last active August 29, 2015 14:14
Show Gist options
  • Save multidis/b3749bd6f1bda9adc15b to your computer and use it in GitHub Desktop.
Save multidis/b3749bd6f1bda9adc15b to your computer and use it in GitHub Desktop.
Tufte-style handouts with knitr: quantmod chart options.

Tufte handouts

Tufterhandout package. Knit to html in RStudio, initial example.

Problem

Some charts in quantmod draw multiple chunks. Knitr returns error when it can not find all of the corresponding files. This is of course a wider problem than quantmod.

Solution

Figure chunk option fig.keep='last'. See example R-code.

```{r figcht1, tidy = FALSE, fig.width = 22, fig.height = 3, fig.cap = "Full-width chart", fig.star = TRUE, cache=FALSE, fig.keep='last'}
chart_Series(GBPUSD, theme=myTheme)
```
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment