tsl2year | R Documentation |
Mapping function between time-slices and day of the year
Mapping function between time-slices and hour
Mapping function between time-slices and month
tsl2year(tsl, return.null = TRUE)
tsl2yday(tsl, return.null = TRUE)
tsl2hour(tsl, return.null = TRUE, pattern = "h[0-9]++")
tsl2month(tsl, format = tsl_guess_format(tsl), return.null = TRUE)
tsl |
character vector with time slices |
return.null |
logical, valid for the cased then all values are NA, then NULL will be returned if return.null = TRUE, |
format |
character, the time slices format |
Integer vector of years, the same length as the input vector
Integer vector of days of the year, the same length as the input vector
Integer vector of hours, the same length as the input vector
Integer vector of months, the same length as the input vector
tsl2year()
: Extract year from time-slices
tsl2yday()
: Extract the day of the year from time-slices
tsl2hour()
: Extract hour from time-slices
tsl2month()
: Extract month from time-slices
tsl <- c("y2007_d365_h15", NA, "d151_h22", "d001", "m10_h12")
tsl2year(tsl)
tsl
tsl2yday(tsl)
tsl
tsl2hour(tsl)
tsl2month(c("d001_h00", "d151_h22", "d365_h23"))
tsl2month(c("m01_h12", "m05_h02", "m10_h01"))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.