Description Details Author(s) References Examples
Illustrates how knitr options could be set via the yaml markup using rmarkdown v2.
Package: | provider1 |
Type: | Package |
Version: | 1.0 |
Date: | 2014-03-11 |
License: | GPLv3 |
This package serves as an illustration only and provides no value beyond that.
It accompanies a rmarkdown patch https://github.com/Thell/rmarkdown/commit/0e5e23faafe94f3
Thell Fowler
Maintainer: Thell Fowler <thell@tbfowler.name>
rmarkdown knitr
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 | ## Not run:
---
title: "test"
author: "Thell"
date: "03/10/2014"
output:
html_document:
knitr:
opts_knitr:
verbose: TRUE
opts_chunk:
echo: FALSE
knit_hooks:
myFlag1: provider1::providedHook1
myFlag2: provider1::providedHook2
---
```{r, echo=TRUE}
# Ensure hooks are loaded.
names( knitr::knit_hooks$get() )
```
---
```{r, myFlag1=TRUE}
# Ensure myFLag1 triggers.
```
---
```{r, myFlag2=TRUE}
# Ensure only myFlag2 triggers
```
---
```{r, myFlag1=TRUE, myFlag2=TRUE}
# Ensure both trigger in order 1, 2.
```
```{r, myFlag2=TRUE, myFlag1=TRUE}
# Ensure both trigger in order 2, 1.
```
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.