Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

metadata

metadata of a colorSpec object


Description

Retrieve or set the metadata of a colorSpec object.

Usage

## S3 method for class 'colorSpec'
metadata(x, ...)

## S3 replacement method for class 'colorSpec'
metadata(x, add=FALSE ) <- value

Arguments

x

a colorSpec R object

...

optional names of metadata to return

value

a named list. If add is FALSE, value replaces any existing metadata. If add is TRUE, value is appended to the existing list of metadata. If a name already exists, its value is updated using modifyList(). Unnamed items in value are ignored.

add

if add=FALSE, any existing metadata is discarded. If add=TRUE then existing metadata is preserved, using modifyList().

Details

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

Value

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

Note

Do not confuse extradata and metadata.
metadata is unstructured data that is attached to the entire colorSpec object. extradata is structured data, with a row of data for each spectrum in the object.

See Also

Examples

## 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)

colorSpec

Color Calculations with Emphasis on Spectral Data

v1.2-1
GPL (>= 3)
Authors
Glenn Davis [aut, cre]
Initial release
2020-04-01

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.