Currently only supports conversion of rmd_tibble objects back to rmd_ast.

as_ast(x, ...)

Arguments

x

Object to convert

...

Unused, for extensibility.

Value

Returns an rmd_ast object.

Examples

parse_rmd(system.file("hw01.Rmd", package="parsermd")) %>% as_tibble() %>% as_ast()
#> ├── YAML [2 lines] #> ├── Heading [h3] - Load packages #> │ └── Chunk [r, 1 opt, 2 lines] - load-packages #> ├── Heading [h3] - Exercise 1 #> │ ├── Markdown [2 lines] #> │ └── Heading [h4] - Solution #> │ └── Markdown [2 lines] #> ├── Heading [h3] - Exercise 2 #> │ ├── Markdown [2 lines] #> │ └── Heading [h4] - Solution #> │ ├── Markdown [4 lines] #> │ ├── Chunk [r, 2 opts, 5 lines] - plot-dino #> │ ├── Markdown [2 lines] #> │ └── Chunk [r, 2 lines] - cor-dino #> └── Heading [h3] - Exercise 3 #> ├── Markdown [2 lines] #> └── Heading [h4] - Solution #> ├── Markdown [4 lines] #> ├── Chunk [r, 1 lines] - plot-star #> ├── Markdown [2 lines] #> └── Chunk [r, 1 lines] - cor-star