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.
csv_options(x)
A list of chunk options.
xfun::csv_options("foo, eval=TRUE, fig.width=5, echo=if (TRUE) FALSE")
#> $label
#> [1] "foo"
#>
#> $eval
#> [1] TRUE
#>
#> $fig.width
#> [1] 5
#>
#> $echo
#> if (TRUE) FALSE
#>