subset_attributes: Subset the metadata attributes

View source: R/copy.attr.R

subset_attributesR Documentation

Subset 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 each attribute when a generic_spct object with multiple spectra in long form is subset.

Usage

subset_attributes(x, to.keep, ...)

## Default S3 method:
subset_attributes(x, to.keep, ...)

## S3 method for class 'generic_spct'
subset_attributes(
  x,
  to.keep = character(),
  target.attributes = spct_attributes(class(x)[1]),
  ...
)

Arguments

x

a generic_spct object.

to.keep

character vector Indices to the spectra for which attributes are to be extracted and retained.

...

currently ignored

target.attributes

character vector Names of attributes to be subset using which.

Details

The values in which are passed as argument to the extract operator only if the value of the attribute is a list of the same length as the logical vector passed as argument to which.

Value

Named list of attribute values.

Methods (by class)

  • subset_attributes(default): default

  • subset_attributes(generic_spct): generic_spct

See Also

select_spct_attributes

Other measurement metadata functions: add_attr2tb(), getFilterProperties(), getHowMeasured(), getInstrDesc(), getInstrSettings(), getSoluteProperties(), getWhatMeasured(), getWhenMeasured(), getWhereMeasured(), get_attributes(), isValidInstrDesc(), isValidInstrSettings(), select_spct_attributes(), setFilterProperties(), setHowMeasured(), setInstrDesc(), setInstrSettings(), setSoluteProperties(), setWhatMeasured(), setWhenMeasured(), setWhereMeasured(), spct_attr2tb(), spct_metadata(), trimInstrDesc(), trimInstrSettings()


aphalo/photobiology documentation built on April 1, 2024, 6:48 p.m.