Skip to contents

Get the number of seasons from an object.

Usage

nSeasons(object)
nSeasons(object, ...) <- value

Arguments

object

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

value

a positive integer number.

...

further arguments for methods.

Details

These are generic functions.

Methods for nSeasons are straightforward when the property makes sense for objects from a class. In contrast, methods for the replacement version, `nSeasons<-`, should be defined carefully and may not even be feasible.

Value

an integer number

Author

Georgi N. Boshnakov

Methods

No methods for `nSeasons<-` are defined in package lagged. The methods defined for nSeasons are given below.

signature(object = "slMatrix")

Examples

m <- slMatrix(matrix(1:12, nrow = 4))
m
#> An object of class "slMatrix"
#> Slot "m":
#>       lag
#> season 0 1  2
#>      1 1 5  9
#>      2 2 6 10
#>      3 3 7 11
#>      4 4 8 12
#> 
nSeasons(m)
#> [1] 4