code_chunk | R Documentation |
code_chunk()
assembles a knitr code chunk as a character vector.
setup_chunk()
is a wrapper around code_chunk()
to create setup chunks. By
default it uses include = FALSE
and inserts knitr::opts_chunk$set(echo = TRUE)
into the chunk body. These are helper functions to write R Markdown
bodies for use_rmarkdown()
.
code_chunk(chunk_code, chunk_name = NULL, chunk_args = NULL) setup_chunk(chunk_code = NULL, chunk_args = list(include = FALSE))
chunk_code |
An expression. Surround with |
chunk_name |
The name of the chunk |
chunk_args |
A |
a character vector
setup_chunk() code_chunk({ yml() %>% yml_output(pdf_document()) }, chunk_name = "yml_example")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.