get_yaml_field: Extract field from 'yaml' text

View source: R/yaml_utils.R

get_yaml_fieldR 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.


teal.reporter documentation built on April 3, 2025, 7:39 p.m.