Get and modify the Time Scale Template
Source:R/get-tk_get_time_scale_template.R
tk_time_scale_template.Rd
Get and modify the Time Scale Template
Value
get_tk_time_scale_template()
: Returnstibble
containing the time scale template information.set_tk_time_scale_template()
: Returns nothing.
Details
Used to get and set the time scale template, which is used by tk_get_frequency()
and tk_get_trend()
when period = "auto"
.
The predefined template is stored in a function tk_time_scale_template()
.
This is the default used by timetk
.
Changing the Default Template
You can access the current template with
get_tk_time_scale_template()
.You can modify the current template with
set_tk_time_scale_template()
.
See also
Automated Frequency and Trend Calculation:
tk_get_frequency()
,tk_get_trend()
Examples
get_tk_time_scale_template()
#> # A tibble: 8 × 3
#> time_scale frequency trend
#> <chr> <chr> <chr>
#> 1 second 1 hour 12 hours
#> 2 minute 1 day 14 days
#> 3 hour 1 day 1 month
#> 4 day 1 week 3 months
#> 5 week 1 quarter 1 year
#> 6 month 1 year 5 years
#> 7 quarter 1 year 10 years
#> 8 year 5 years 30 years
set_tk_time_scale_template(tk_time_scale_template())