setTimeUnit: Set the "time.unit" attribute of an existing source_spct...

Description Usage Arguments Value Note See Also Examples

Description

Function to set by reference the "time.unit" attribute

Usage

1
2
setTimeUnit(x, time.unit = c("second", "hour", "day", "exposure", "none"),
  override.ok = FALSE)

Arguments

x

a source_spct object

time.unit

a character string, either "second", "hour", "day", "exposure" or "none", or a lubridate::duration

override.ok

logical Flag that can be used to silence warning when overwritting an existing attribute value (used internally)

Value

x

Note

if x is not a source_spct or response_spct object, x is not modified. The behaviour of this function is 'unusual' in that the default for parameter time.unit is used only if x does not already have this attribute set. time.unit = "hour" is currently not fully supported.

See Also

Other time attribute functions: checkTimeUnit, convertTimeUnit, getTimeUnit

Examples

1
2
3
my.spct <- sun.spct
setTimeUnit(my.spct, time.unit = "second")
setTimeUnit(my.spct, time.unit = lubridate::duration(1, "seconds"))


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.