Skip to contents

Returns a data frame with the names of the supported time units, the classes that can handle each time unit, and a the threshold used to identify what time units can be used when aggregating a time series.

Usage

utils_time_units(all_columns = FALSE, class = NULL)

Arguments

all_columns

(optional, logical) If TRUE, all columns are returned. Default: FALSE

class

(optional, class name). Used to filter rows and columns. Accepted values are "numeric", "Date", and "POSIXct". Default: NULL

Value

data frame

Examples


df <- utils_time_units()
head(df)
#>   base_units     units Date POSIXct numeric integer
#> 1       days millennia TRUE    TRUE   FALSE   FALSE
#> 2       days centuries TRUE    TRUE   FALSE   FALSE
#> 3       days   decades TRUE    TRUE   FALSE   FALSE
#> 4       days     years TRUE    TRUE   FALSE   FALSE
#> 5       days  quarters TRUE    TRUE   FALSE   FALSE
#> 6       days    months TRUE    TRUE   FALSE   FALSE