parse_mkm: Parse

Description Usage Arguments Details Value

View source: R/parse.R

Description

Parse

Usage

1
parse_mkm(x, definition = NULL, .default = "to_df")

Arguments

x

A named list, similar to that produced by read_mkm

definition

A named vector, specifying functions or things that can be coerced to functions (see Details).

.default

The default parsing function to use, if none is specified.

Details

This function takes a list containing the raw (internal) MKM data objects produced by read_mkm and applies a function to each section. The purpose is to provide a flexible way to coerce the raw data (and possibly formatting information) into a usable data structure.

Parsing functions are applied based on name. If no function is specified for a given section, then the function specified by .default is used. A number of in-built functions are provided (see ff)

Value

A named list with length(sections) items, each containing the output of the running the function against the named section, or the default function, if none is supplied.


tmk-nz/mkm documentation built on Feb. 2, 2021, 11:45 a.m.