Skip to content

Commit

Permalink
add a few more examples
Browse files Browse the repository at this point in the history
  • Loading branch information
yihui committed Aug 27, 2014
1 parent 382a029 commit 1ea57a9
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions inst/rmarkdown/templates/html_vignette/skeleton/skeleton.Rmd
Original file line number Diff line number Diff line change
Expand Up @@ -35,3 +35,24 @@ The figure sizes have been customised so that you can easily put two images side
plot(1:10)
plot(10:1)
```

You can enable figure captions by `fig_caption: yes` in YAML:

output:
rmarkdown::html_vignette:
fig_caption: yes

Then you can use the chunk option `fig.cap = "Your figure caption."` in **knitr**.

## More Examples

You can write math expressions, e.g. $Y = X\beta + \epsilon$, footnotes^[A footnote here.], and tables, e.g. using `knitr::kable()`.

```{r, echo=FALSE, results='asis'}
knitr::kable(head(mtcars, 10))
```

Also a quote using `>`:

> "He who gives up [code] safety for [code] speed deserves neither."
([via](https://twitter.com/hadleywickham/status/504368538874703872))

0 comments on commit 1ea57a9

Please sign in to comment.