Learn R Programming

pcts (version 0.15.8)

nCycles: Basic information about periodic ts objects

Description

Basic information about periodic periodic time series objects.

Usage

nCycles(x, ...)

nTicks(x)

nVariables(x, ...)

nSeasons(object)

Value

an integer number

Arguments

x,object

an object from a periodic time series class.

...

further arguments for methods.

Author

Georgi N. Boshnakov

Details

nTicks gives the number of time points, i.e. number of rows in the matrix representation.

nVariables gives the number of variables in the time series.

nSeasons gives the number of seasons of time series and other periodic objects.

nCycles gives the number of cycles available in the data, e.g. number of years for monthly data. It always gives an integer number. Currently, if the result is not an integer an error is raised. TODO: There is a case to round up or give the number of full cycles available but this seems somewhat dangerous if done quietly. A good alternative is to provide argument for control of this.

There are further functions to get or set the names of the units of season and the seasons, see allSeasons.

See Also

allSeasons, "nSeasons-methods"

Examples

Run this code
ap <- pcts(AirPassengers)
nVariables(ap)
nTicks(ap)
nCycles(ap)
nSeasons(ap)

monthplot(ap)
boxplot(ap)

Run the code above in your browser using DataLab