Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

getTimeUnit

Get the "time.unit" attribute of an existing source_spct object


Description

Function to read the "time.unit" attribute

Usage

getTimeUnit(x, force.duration = FALSE)

Arguments

x

a source_spct object

force.duration

logical If TRUE a lubridate::duration is returned even if the object attribute is a character string, if no conversion is possible NA is returned.

Value

character string or a lubridate::duration

Note

if x is not a source_spct or a response_spct object, NA is returned

See Also

Other time attribute functions: checkTimeUnit(), convertTfrType(), convertThickness(), convertTimeUnit(), setTimeUnit()

Examples

getTimeUnit(sun.spct)

photobiology

Photobiological Calculations

v0.10.10
GPL (>= 2)
Authors
Pedro J. Aphalo [aut, cre] (<https://orcid.org/0000-0003-3385-972X>), Titta K. Kotilainen [ctb] (<https://orcid.org/0000-0002-2822-9734>), Glenn Davis [ctb], Agnese Fazio [ctb]
Initial release
2022-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.