Description Usage Details Examples
View the code chunk "asis" along with the chunk output.
1 |
To run this hook, call the source_verbatim()
function and then you can
either print all source code as verbatim chunks
knitr::opts_chunk$set(source_verbatim = TRUE)
or you can print it on a chunk by chunk basis
1 2 3 | ```{r source_verbatim = TRUE}
print(mtcars)
```
|
If you would like to only print the source code as verbatim and not have the
code evaluated, use eval = FALSE
, i.e.
1 2 3 | ```{r, eval = FALSE, source_verbatim = TRUE}
print(mtcars)
```
|
The resulting output will look like this.
1 2 3 | ```{r}
print(mtcars)
```
|
1 |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.