metadata | R Documentation |
Retrieve or set the metadata of a colorSpec object.
## S3 method for class 'colorSpec'
metadata(x, ...)
## S3 replacement method for class 'colorSpec'
metadata(x, add=FALSE ) <- value
x |
a colorSpec R object |
... |
optional names of metadata to return |
value |
a named |
add |
if |
The metadata list is stored as attr(x,'metadata')
.
After construction this list is empty.
metadata(x)
with no additional arguments returns the complete named list of metadata.
If arguments are present, then only those metadata
items are returned.
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.
extradata
,
modifyList
## 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.