Learn R Programming

xfun (version 0.43)

yaml_body: Partition the YAML metadata and the body in a document

Description

Split a document into the YAML metadata (which starts with --- in the beginning of the document) and the body. The YAML metadata will be parsed.

Usage

yaml_body(x, ...)

Value

A list of components yaml and body.

Arguments

x

A character vector of the document content.

...

Arguments to be passed to yaml_load().

Examples

Run this code
xfun::yaml_body(c("---", "title: Hello", "output: markdown::html_document", "---",
    "", "Content."))

Run the code above in your browser using DataLab