Learn R Programming

pcts (version 0.15.8)

nSeasons-methods: Number of seasons of a periodic object

Description

Number of seasons of a periodic object.

Usage

# S4 method for Cyclic
nSeasons(object)

## same signature for all periodic classes in package "pcts"

Value

an integer number

Arguments

object

an object for which the notion of number of seasons makes sense.

Author

Georgi N. Boshnakov

Methods

signature(object = "DayWeekCycle")

signature(object = "MonthYearCycle")

signature(object = "PeriodicIntegratedArmaSpec")

signature(object = "QuarterYearCycle")

signature(object = "PeriodicMonicFilterSpec")

signature(object = "PeriodicInterceptSpec")

signature(object = "Cyclic")

signature(object = "BareCycle")

signature(object = "OpenCloseCycle")

signature(object = "Every30MinutesCycle")

signature(object = "PartialCycle")

signature(object = "VirtualPeriodicModel")

signature(object = "SarimaFilter")

signature(object = "VirtualArmaFilter")

Details

nSeasons is a generic function. This page gives is for the methods defined in package "pcts" - all periodic classes have (or inherit) a method.

See Also

allSeasons for other functions related to the seasonality of an object;

nCycles for related functions

Examples

Run this code
## scalar time series
ap <- pcts(AirPassengers)
nSeasons(ap) # 12

## multivariate time series
pcfr <- pcts(dataFranses1996)
nSeasons(pcfr) # 4

## five-day-week period
five_day_week <- BuiltinCycle(5)
five_day_week
nSeasons(five_day_week)

Run the code above in your browser using DataLab