Description Usage Arguments Value Examples
This function is implemented using tidyselect::eval_select()
which enables
a variety of useful syntax for selecting nodes from the ast.
Additionally, a number of additional parsermd
specific selection helpers are available:
by_section()
, has_type()
, has_label()
, and has_option()
.
1 | rmd_select(x, ...)
|
x |
Rmd object, e.g. |
... |
One or more unquoted expressions separated by commas. Chunk labels can be used as if they were positions in the data frame, so expressions like x:y can be used to select a range of nodes. |
Returns a subset Rmd object (either rmd_ast
or rmd_tibble
depending on input).
1 2 3 4 5 6 7 8 9 | rmd = parse_rmd(system.file("hw01.Rmd", package = "parsermd"))
rmd_select(rmd, "plot-dino", "cor-dino")
rmd_select(rmd, "plot-dino":"cor-dino")
rmd_select(rmd, `plot-dino`:`cor-dino`)
rmd_select(rmd, has_type("rmd_chunk"))
rmd_select(rmd, by_section(c("Exercise *", "Solution")))
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.