get_yaml_field {teal.reporter}R Documentation

Extract field from yaml text

Description

Parses yaml text, extracting the specified field. Returns list names if it's a list; otherwise, the field itself.

Usage

get_yaml_field(yaml_text, field_name)

Arguments

yaml_text

(rmd_yaml_header or character) vector containing the yaml text.

field_name

(character) the name of the field to extract.

Value

If the field is a list, it returns the names of elements in the list; otherwise, it returns the extracted field.


[Package teal.reporter version 0.4.0 Index]