csv_options: Parse comma-separated chunk options

View source: R/knitr.R

csv_optionsR Documentation

Parse comma-separated chunk options

Description

For knitr and R Markdown documents, code chunk options can be written using the comma-separated syntax (e.g., ⁠opt1=value1, opt2=value2⁠). This function parses these options and returns a list. If an option is not named, it will be treated as the chunk label.

Usage

csv_options(x)

Arguments

x

The chunk options as a string.

Value

A list of chunk options.

Examples

xfun::csv_options("foo, eval=TRUE, fig.width=5, echo=if (TRUE) FALSE")

yihui/xfun documentation built on April 29, 2024, 12:16 p.m.