Learn R Programming

photobiology (version 0.11.4)

setWhenMeasured: Set the "when.measured" attribute

Description

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

Usage

setWhenMeasured(x, when.measured, ...)

when_measured(x) <- value

# S3 method for default setWhenMeasured(x, when.measured, ...)

# S3 method for generic_spct setWhenMeasured(x, when.measured = lubridate::now(tzone = "UTC"), ...)

# S3 method for summary_generic_spct setWhenMeasured(x, when.measured = lubridate::now(tzone = "UTC"), ...)

# S3 method for data.frame setWhenMeasured(x, when.measured = lubridate::now(tzone = "UTC"), ...)

# S3 method for generic_mspct setWhenMeasured(x, when.measured = lubridate::now(tzone = "UTC"), ...)

Value

x

Arguments

x

a generic_spct object

when.measured, value

POSIXct to add as attribute, or a list of POSIXct.

...

Allows use of additional arguments in methods for other classes.

Methods (by class)

  • setWhenMeasured(default): default

  • setWhenMeasured(generic_spct): generic_spct

  • setWhenMeasured(summary_generic_spct): summary_generic_spct

  • setWhenMeasured(data.frame): data.frame

  • setWhenMeasured(generic_mspct): generic_mspct

See Also

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(), setWhereMeasured(), spct_attr2tb(), spct_metadata(), subset_attributes(), trimInstrDesc(), trimInstrSettings()

Examples

Run this code
my.spct <- sun.spct
when_measured(my.spct)
when_measured(my.spct) <- lubridate::ymd_hms("2020-01-01 08:00:00")
when_measured(my.spct)

Run the code above in your browser using DataLab