I am having trouble with setting global options in my R Markdown documents. A simple example follows. In this case I've attempted to set global.par = TRUE
. The expectation is that any par()
specifications I make in one chuck are carried into subsequent chunks. However, this is not happening.
```{r package_options, include=FALSE}
knitr::opts_knit$set(global.par = TRUE)
```
```{r}
lambda <- 0.2; n <- 1000
exp <- rexp(n, lambda)
par(cex = 0.7)
hist(exp)
```
```{r}
lambda <- 0.02; n <- 1000
exp <- rexp(n, lambda)
hist(exp)
```
Specs: Max OS 10.11, R version 3.2.0 (2015-04-16), RStudio 0.98.1062, knitr 1.12.3