render: render xml from data and template

View source: R/render.R

renderR Documentation

render xml from data and template

Description

create metadata file from input data or yaml file

Usage

render(data, filename, ...)

## S3 method for class 'character'
render(data, filename, ..., template)

## S3 method for class 'list'
render(data, filename, ..., template)

Arguments

data

filepath or list

filename

name of file to write metadata to

...

additional lists or yaml filepaths to include or other arguments passed to methods (e.g., template="metadata.mustache")

template

character template or a filepath to a template to user in rendering the metadata. If missing, a default template will be used.

Methods (by class)

  • character: render text to a file from a yaml file

  • list: render text to a file from a list

See Also

whisker.render

Examples

render(list('dogname'='fred','catname'='midred'),
   filename=NULL, list('dogname'='betty'), template="my dog's name is: {{dogname}}")


USGS-R/meddle documentation built on April 28, 2024, 3:31 a.m.