Learn R Programming

photobiology (version 0.9.6)

convertTimeUnit: Convert the "time.unit" attribute of an existing source_spct object

Description

Function to set the "time.unit" attribute and simultaneously rescaling the spectral data to be expressed in the new time unit. The change is done by reference ('in place')

Usage

convertTimeUnit(x, time.unit = NULL, byref = FALSE)

Arguments

x
a source_spct object
time.unit
a character string, either "second", "hour", "day", "exposure" or "none", or a lubridate::duration
byref
logical indicating if new object will be created by reference or by copy of x (currently ignored)

Value

  • x possibly with the time.unit attribute modified

See Also

Other time attribute functions: checkTimeUnit, getTimeUnit, setTimeUnit

Examples

Run this code
my.spct <- sun.spct
my.spct
convertTimeUnit(my.spct, "day")

Run the code above in your browser using DataLab