get_yaml_header: Retrieve YAML header from file

Description Usage Arguments Value

View source: R/get_yaml_header.R

Description

Note that this assumes only one Yaml header, starting on the first line of the file.

Usage

1
get_yaml_header(file, yaml_rxp = "^\\#*---[[:space:]]*$", verbose = TRUE)

Arguments

file

A character string or R connection specifying a file.

yaml_rxp

Regular expression for parsing YAML header

verbose

Logical. If TRUE, print warning if no header found.

Value

Character vector of lines containing YAML header, or 'NULL' if no YAML header found.


csvy documentation built on May 2, 2019, 2:09 a.m.