metadata: metadata of a TransferFunction object

Description Usage Arguments Details Value See Also Examples

View source: R/TransferFunction.R

Description

Retrieve or set the metadata of a TransferFunction object. The user is free to set this as he/she wishes.

Usage

1
2
3
4
5
## S3 method for class 'TransferFunction'
metadata( x, ...)

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

Arguments

x

a TransferFunction 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.

See Also

modifyList

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## Not run: 
# get list of *all* metadata
metadata(TF)

# get just the number 'gamma'
metadata( TF, 'gamma' )

# alternative method to get just the number 'gamma'
metadata( TF )$gamma

# set the 'date'
metadata( TF ) = list( date="2016-04-01" )

## End(Not run)

spacesRGB documentation built on Dec. 11, 2021, 9:58 a.m.