Displays summary of template metadata stored in a header section. This part of template header consists of several YAML key: value
pairs, which contain some basic information about the template, just much like the DESCRIPTION
file in R
packages does.
rapport.meta(fp, fields = NULL, use.header = FALSE, trim.white = TRUE)
a template file pointer (see rapport:::rapport.read
for details)
a list of named lists containing key-value pairs of field titles and corresponding regexes
a logical value indicating if the character vector provided in fp
argument contains only the header data (not the whole template)
a logical value indicating if the extra spaces should removed from header fields before extraction
a named list with template metadata
Current implementation supports following fields:
title
- a template title (required)
author
- author's (nick)name (required)
description
- template description (required)
email
- author's email address
packages
- YAML list of packages required by the template (if any)
example
- example calls to rapport
function, including template data and inputs
As of version 0.5
, dataRequired
field is deprecated. rapport
function will automatically detect if the template requires a dataset based on the presence of standalone inputs.