photobiology (version 0.9.25)

setWhenMeasured: Set the "when.measured" attribute

Description

Function to set by reference the "when" attribute of an existing generic_spct or an object of a class derived from generic_spct.

Usage

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

# 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 generic_mspct setWhenMeasured(x, when.measured = lubridate::now(tzone = "UTC"), ...)

Arguments

x

a generic_spct object

when.measured

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

...

Allows use of additional arguments in methods for other classes.

Value

x

Methods (by class)

  • default: default

  • generic_spct: generic_spct

  • summary_generic_spct: summary_generic_spct

  • generic_mspct: generic_mspct

See Also

Other measurement metadata functions: getInstrDesc, getInstrSettings, getWhatMeasured, getWhenMeasured, getWhereMeasured, get_attributes, isValidInstrDesc, isValidInstrSettings, setInstrDesc, setInstrSettings, setWhatMeasured, setWhereMeasured, trimInstrDesc, trimInstrSettings

Examples

Run this code
# NOT RUN {
my.spct <- sun.spct
getWhenMeasured(my.spct)
setWhenMeasured(my.spct, lubridate::ymd_hms("2015-12-12 08:00:00"))
getWhenMeasured(my.spct)

# }

Run the code above in your browser using DataCamp Workspace