maxLag | R Documentation |
Give the maximal lag in an object, such as autocorrelations.
maxLag(object, ...)
object |
an object, for which the function makes sense. |
... |
not used? |
maxLag
is a generic function to get the maximal lag for which
information is available in lagged objects.
a non-negative integer
signature(object = "Lagged")
This method applies to all classes inheriting from "Lagged"
.
signature(object = "array")
signature(object = "matrix")
signature(object = "vector")
signature(object = "ANY")
signature(object = "slMatrix")
Georgi N. Boshnakov
"maxLag<-"
## 1d v <- Lagged(2^(0:6)) v maxLag(v) v[c(2,4,6)] v[8] # NA ## reduce the number of lags in place maxLag(v) <- 4 v ## extend the object (with NA's) maxLag(v) <- 6 v ## extend using "[" v[5:8] <- 2^(5:8) v ## 2d m <- Lagged(matrix(1:12, nrow = 4)) m maxLag(m) maxLag(m) <- 1 m ## maxLag(m) <- 4 # extending this way doesn't work currently
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.