Learn R Programming

fabletools (version 0.5.0)

common_periods: Extract frequencies for common seasonal periods

Description

Extract frequencies for common seasonal periods

Usage

common_periods(x)

# S3 method for default common_periods(x)

# S3 method for tbl_ts common_periods(x)

# S3 method for interval common_periods(x)

get_frequencies(period, ...)

# S3 method for numeric get_frequencies(period, ...)

# S3 method for `NULL` get_frequencies(period, data, ..., .auto = c("smallest", "largest", "all"))

# S3 method for character get_frequencies(period, data, ...)

# S3 method for Period get_frequencies(period, data, ...)

Value

A named vector of frequencies appropriate for the provided data.

Arguments

x

An object containing temporal data (such as a tsibble, interval, datetime and others.)

period

Specification of the time-series period

...

Other arguments to be passed on to methods

data

A tsibble

.auto

The method used to automatically select the appropriate seasonal periods

References

https://robjhyndman.com/hyndsight/seasonal-periods/

Examples

Run this code
common_periods(tsibble::pedestrian)

Run the code above in your browser using DataLab