Write R chunk to template
Usage
add_chunk(
x,
label = NULL,
add_option = TRUE,
chunk_option = c("echo: false", "warnings: false", "eval: true"),
rmark_option = NULL
)Arguments
- x
Content to be written within the R chunk. Wrap in quotation marks ("").
- label
The name of the chunk in the 'label:' section of the R code chunk. This should be in snakecase (i.e., in which words are written in lowercase and connected by underscores).
- add_option
TRUE/FALSE; Option to add additional chunk options. Default is false.
- chunk_option
List of chunk options to add. For example: c("output: true", "error: false)
- rmark_option
List of chunk options to add after indicating the language of the chunk as used in Rmarkdown.