Learn R Programming

xfun (version 0.48)

csv_options: 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)

Value

A list of chunk options.

Arguments

x

The chunk options as a string.

Examples

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

Run the code above in your browser using DataLab