convertTimeUnit | R Documentation |
Function to set the "time.unit" attribute and simultaneously rescaling the spectral data to be expressed using the new time unit as basis of expression. The change is done by reference ('in place').
convertTimeUnit(x, time.unit = NULL, ...)
x |
source_spct or response_spct object |
time.unit |
a character string, either "second", "hour", "day", "exposure" or "none", or a lubridate::duration |
... |
(currently ignored) |
x possibly with the time.unit
attribute modified
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.
Other time attribute functions:
checkTimeUnit()
,
convertTfrType()
,
convertThickness()
,
getTimeUnit()
,
setTimeUnit()
my.spct <- sun.spct
my.spct
convertTimeUnit(my.spct, "day")
my.spct
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.