Learn R Programming

yamlet (version 0.6.5)

decorate.list: Decorate List

Description

Decorates a list-like object. Takes metadata in yamlet format and loads it onto corresponding list elements as attributes.

Usage

# S3 method for list
decorate(
  x,
  meta = NULL,
  ...,
  ext = getOption("yamlet_extension", ".yaml"),
  overwrite = getOption("yamlet_overwrite", FALSE)
)

Arguments

x

object inheriting from list

meta

file path for corresponding yaml metadata, or a yamlet or something coercible to yamlet; an attempt will be made to guess the file path if x has a 'source' attribute (as for as.csv)

...

passed to as_yamlet.character (by method dispatch)

ext

file extension for metadata file, if relevant

overwrite

whether to overwrite attributes that are already present (else give warning)

Value

like x but with 'decorated' as first class element

See Also

Other decorate: as_decorated.default(), as_decorated(), decorate.character(), decorate.data.frame(), decorate(), decorations.data.frame(), decorations(), redecorate()

Examples

Run this code
# NOT RUN {
example(decorate.data.frame)

# }

Run the code above in your browser using DataLab