colorSpec (version 0.5-3)

metadata: metadata of a colorSpec object

Description

Retrieve or set the metadata of a colorSpec object.

Usage

"metadata"(x, ...) metadata(x) <- value

Arguments

x
a colorSpec R object
...
optional names of metadata to return
value
a named list that is appended to the existing list of metadata. Unnamed items are ignored. If a name already exists, its value is updated.

Value

metadata() with no argument returns the complete named list of metadata. If arguments are present, then only those metadata items are returned.

Details

The metadata list is stored as attr(x,'metadata'). Initially this list is empty.

The assignment operator looks like it replaces the internal metadata list of x, but it actually appends to it.

See Also

colorSpec; extradata

Examples

Run this code

## Not run: 
# # get list of *all* metadata
# metadata(x)
# 
# # get just the file 'path'
# metadata( x, 'path' )
# 
# # set the 'date'
# metadata( x ) = list( date="2016-04-01" )
# ## End(Not run)

Run the code above in your browser using DataLab