Internal function to obtain valid aggregation keywords from a zoo object or a time series list.
See also
Other internal_time_handling:
utils_as_time()
,
utils_coerce_time_class()
,
utils_is_time()
,
utils_new_time()
,
utils_time_keywords_dictionary()
,
utils_time_keywords_translate()
,
utils_time_units()
Examples
#one minute time series
#-----------------------------------
tsl <- tsl_simulate(
time_range = c(
Sys.time() - 60,
Sys.time()
)
)
#valid keywords for aggregation and/or resampling
utils_time_keywords(
tsl = tsl
)
#> [1] "seconds"
#10 minutes time series
#-----------------------------------
tsl <- tsl_simulate(
time_range = c(
Sys.time() - 600,
Sys.time()
)
)
utils_time_keywords(
tsl = tsl
)
#> [1] "minutes" "seconds"
#10 hours time series
#-----------------------------------
tsl <- tsl_simulate(
time_range = c(
Sys.time() - 6000,
Sys.time()
)
)
utils_time_keywords(
tsl = tsl
)
#> [1] "hours" "minutes" "seconds"
#10 days time series
#-----------------------------------
tsl <- tsl_simulate(
time_range = c(
Sys.Date() - 10,
Sys.Date()
)
)
utils_time_keywords(
tsl = tsl
)
#> [1] "weeks" "days"
#10 years time series
#-----------------------------------
tsl <- tsl_simulate(
time_range = c(
Sys.Date() - 3650,
Sys.Date()
)
)
utils_time_keywords(
tsl = tsl
)
#> [1] "years" "quarters" "months" "weeks"