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

Description Usage Arguments Value Note See Also Examples

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

1
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

Note

if x is not a source_spct or a response_spct object, or time.unit is NULL x is returned unchanged, if the existing or new time.unit cannot be converted to a duration, then the returned spectrum will contain NAs.

See Also

Other time attribute functions: checkTimeUnit, getTimeUnit, setTimeUnit

Examples

1
2
3
my.spct <- sun.spct
my.spct
convertTimeUnit(my.spct, "day")


Search within the photobiology package
Search all R packages, documentation and source code

Questions? Problems? Suggestions? or email at ian@mutexlabs.com.

Please suggest features or report bugs with the GitHub issue tracker.

All documentation is copyright its authors; we didn't write any of that.