Function to set by reference the "time.unit" attribute
setTimeUnit(
x,
time.unit = c("second", "hour", "day", "exposure", "none"),
override.ok = FALSE
)
x
a source_spct object
character string indicating the time unit used for spectral irradiance or exposure ("second" , "day" or "exposure") or an object of class duration as defined in package lubridate.
logical Flag that can be used to silence warning when overwriting an existing attribute value (used internally)
Other time attribute functions:
checkTimeUnit()
,
convertThickness()
,
convertTimeUnit()
,
getTimeUnit()
my.spct <- sun.spct
setTimeUnit(my.spct, time.unit = "second")
setTimeUnit(my.spct, time.unit = lubridate::duration(1, "seconds"))
Run the code above in your browser using DataLab