Learn R Programming

rapport (version 0.51)

tpl.meta: Header Metadata

Description

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. Current implementation supports following fields:

Usage

tpl.meta(fp, fields = NULL, use.header = FALSE,
    trim.white = TRUE)

Arguments

fp
a template file pointer (see tpl.find for details)
fields
a list of named lists containing key-value pairs of field titles and corresponding regexes
use.header
a logical value indicating if the character vector provided in fp argument contains only header data and not the whole template
trim.white
a logical value indicating if the extra spaces should removed from header fields before extraction

Value

  • a named list with template metadata

Details

  • 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 torapportfunction, 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.