r4ds/rmarkdown-demos/12-website/3-inline.Rmd

18 lines
347 B
Plaintext
Raw Normal View History

2016-08-19 01:40:09 +08:00
---
title: "More colors"
output: html_document
---
```{r include = FALSE}
colorFunc <- "terrain.colors"
```
2016-08-23 04:27:54 +08:00
Base R comes with many functions for generating colors. The code
below demonstrates the `r colorFunc` function.
2016-08-19 01:40:09 +08:00
## `r colorFunc`
```{r fig.cap = "The Maunga Whau volcano.", echo = FALSE}
image(volcano, col = get(colorFunc)(200))
```