photobiology (version 0.9.30)

get_attributes: Get the metadata attributes

Description

Method returning attributes of an object of class generic_spct or derived, or of class waveband. Only attributes defined and/or set by package 'photobiology' for objects of the corresponding class are returned. Parameter which can be used to subset the list of attributes.

Usage

get_attributes(x, which, ...)

# S3 method for generic_spct get_attributes(x, which = NULL, allowed = all.attributes, ...)

# S3 method for source_spct get_attributes(x, which = NULL, ...)

# S3 method for filter_spct get_attributes(x, which = NULL, ...)

# S3 method for reflector_spct get_attributes(x, which = NULL, ...)

# S3 method for object_spct get_attributes(x, which = NULL, ...)

# S3 method for waveband get_attributes(x, which = NULL, ...)

Arguments

x

a generic_spct object.

which

character vector Names of attributes to retrieve.

...

currently ignored

allowed

character vector Names of attributes accepted by which.

Value

Named list of attribute values.

Methods (by class)

  • generic_spct: generic_spct

  • source_spct: source_spct

  • filter_spct: filter_spct

  • reflector_spct: reflector_spct

  • object_spct: object_spct

  • waveband: waveband

Details

Vectors of character strings passed as argument to which are parsed so that if the first member string is "-" the remaining members are removed from the allowed; and if it is "=" the remaining members are used if in allowed. If the first member is none of these three strings, the behaviour is the same as if the first string is "=". If which is NULL all the attributes in allowed are used. The string "" means no attributes, and has precedence over any other values in the character vector. The order of the names of annotations has no meaning: the vector is interpreted as a set except for the three possible "operators" at position 1.

See Also

select_spct_attributes

Other measurement metadata functions: getHowMeasured(), getInstrDesc(), getInstrSettings(), getWhatMeasured(), getWhenMeasured(), getWhereMeasured(), isValidInstrDesc(), isValidInstrSettings(), select_spct_attributes(), setHowMeasured(), setInstrDesc(), setInstrSettings(), setWhatMeasured(), setWhenMeasured(), setWhereMeasured(), spct_attr2tb(), trimInstrDesc(), trimInstrSettings()