get_yaml_header {csvy}R Documentation

Retrieve YAML header from file

Description

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

Usage

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.


[Package csvy version 0.3.0 Index]