parse_csv_header: parse_csv_header

Description Usage Arguments Details Value

Description

Parse a CSV file's header, if present.

Usage

1
parse_csv_header(obj, filename, header, enforce_requirements = TRUE)

Arguments

obj

The object to attach attributes to

filename

Fully-qualified filename

header

A vector of strings comprising the file header

enforce_requirements

Enforce mandatory fields?

Details

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.

Value

An empty tibble with appropriate attributes filled in.


rohmin9122/gcam-korea-release documentation built on Nov. 26, 2020, 8:11 a.m.