Skip to contents

Basic information about periodic periodic time series objects.

Usage

nCycles(x, ...)

nTicks(x)

nVariables(x, ...)

Arguments

x

an object from a periodic time series class.

...

further arguments for methods.

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.

Value

an integer number

Author

Georgi N. Boshnakov

Examples

ap <- pcts(AirPassengers)
nVariables(ap)
#> [1] 1
nTicks(ap)
#> [1] 144
nCycles(ap)
#> [1] 12
nSeasons(ap)
#> [1] 12

monthplot(ap)

boxplot(ap)