Skip to contents

General purpose meta parsing function. parse_meta attempts to parse a file based on its file extension.

Usage

parse_meta(file, ..., simplify_meta = FALSE)

Arguments

file

String, file path.

...

Additional arguments passed to a parsing function based on file extension. See below.

simplify_meta

Logical, attempt to simplify the metadata output. This uses simplify_list. This can be useful if metadata is not tabular.

Details

Function supports xls, xlsx, csv, tsv, excel, json, and xlm extensions. #' Extension-specific notes:

txt:
sep Field separator character. defaults to comment = "#".
comment The comment character used to separate (or "comment-out") the metadata from the data. Only text that has been commented-out will be read.
d_list Logical, is metadata stored as a description list (i.e. Field: value, value format). If a colon (":") is used after the field name set this to TRUE.

xls, xlsx:
range The cell range to read from (e.g. "A1:C5"). See read_excel for more details.