Learn R Programming

redoc (version 0.1.0.9000)

pandoc_ast: Convert a document to Pandoc's abstract syntax tree format

Description

This is a convenience function for testing and development.

Usage

pandoc_ast(file, from = NULL, tolist = TRUE)

Arguments

file

the file to convert using pandoc.

from

the format to convert from. If NULL (default) File type will be auto-detected by extension. .Rmd files will be treated as .md.

tolist

whether to return the AST as an R list. If FALSE, will return length-1 character vector of raw JSON.

Value

A list containing the structured document

Examples

Run this code
# NOT RUN {
ast <- pandoc_ast(redoc_example_docx())
# }

Run the code above in your browser using DataLab