maxLag<- | R Documentation |
Change the maximal lag in a lagged object.
maxLag(object, ...) <- value
object |
an object for which this makes sense. |
... |
currently not used. |
value |
the new value of the maximal lag, a non-negative integer number. |
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.
the object whose maximal lag is modified as described in Details.
signature(object = "Lagged")
signature(object = "FlexibleLagged")
Georgi N. Boshnakov
maxLag
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.