maxLag<- {lagged}R Documentation

Change the maximal lag in a lagged object

Description

Change the maximal lag in a lagged object.

Usage

maxLag(object, ...) <- value

Arguments

object

an object for which this makes sense.

...

currently not used.

value

the new value of the maximal lag, a non-negative integer number.

Details

The replacement version of maxLag() changes the maximal lag in an object to value. It is a generic function with no default method.

For the core Lagged classes this is done by simply extending or shrinking the data part to the requested value. Subclasses of "Lagged" and other classes, in general, may need more elaborate changes. If so, they should define their own methods.

When value is larger than the current maxLag(object), the entries for the new lags are filled with NA's.

Value

the object whose maximal lag is modified as described in Details.

Methods

signature(object = "Lagged")
signature(object = "FlexibleLagged")

Author(s)

Georgi N. Boshnakov

See Also

maxLag

Examples

la1 <- Lagged(drop(acf(ldeaths)$acf))
la3 <- la1
la3
## shrink la3
maxLag(la3) # 18
maxLag(la3) <- 5
la3
maxLag(la3) # 5

## extend la3, new entries are filled with NA's
maxLag(la3) <- 10
la3

## alternatively, use "[<-" which accepts any replacement values
la3[11:13] <- 0
la3

[Package lagged version 0.3.2 Index]