Skip to contents

Function to set by reference the "what.measured" attribute of an existing generic_spct, generic_mspct, summary_generic_spct, data.frame or a derived-class object.

Usage

setWhatMeasured(x, ...)

what_measured(x) <- value

# Default S3 method
setWhatMeasured(x, what.measured, ...)

# S3 method for class 'generic_spct'
setWhatMeasured(x, what.measured, ...)

# S3 method for class 'summary_generic_spct'
setWhatMeasured(x, what.measured, ...)

# S3 method for class 'data.frame'
setWhatMeasured(x, what.measured, ...)

# S3 method for class 'generic_mspct'
setWhatMeasured(x, what.measured, ...)

Arguments

x

a generic_spct object

...

Allows use of additional arguments in methods for other classes.

what.measured, value

a list

Value

x

Methods (by class)

  • setWhatMeasured(default): default

  • setWhatMeasured(generic_spct): generic_spct

  • setWhatMeasured(summary_generic_spct): summary_generic_spct

  • setWhatMeasured(data.frame): data.frame

  • setWhatMeasured(generic_mspct): generic_mspct

Note

This function alters x itself by reference and in addition returns x invisibly. If x is not a generic_spct object, x is not modified.

Examples

my.spct <- sun.spct
what_measured(my.spct)
#> [1] "sunlight, simulated"
what_measured(my.spct) <- "Sun"
what_measured(my.spct)
#> [1] "Sun"