Parse a CSV file's header, if present.
parse_csv_header(obj, filename, header, enforce_requirements = TRUE)
The object to attach attributes to
Fully-qualified filename
A vector of strings comprising the file header
Enforce mandatory fields?
An empty tibble
with appropriate attributes filled in.
Headers are given at the top of files and consist of labels ("Title:", "Units:", etc)
prefixed by comment characters (#). The parser looks for these, and calls add_title
and
similar functions to return an empty data frame with appropriate attribute set.