dataWithLagNames | R Documentation |
Get the data from a Lagged object and ensure that the lag dimension is named
dataWithLagNames(object, prefix = "Lag_")
object |
an object inheriting from "Lagged". |
prefix |
a character string. |
dataWithLagNames()
extracts the data part from a lagged object and
gives names to the lag dimension, if it is not already named.
This function is mainly used for programming, particularly in
show()
methods for lagged objects..
The data part with names as described in Details.
Georgi N. Boshnakov
x <- Lagged(drop(acf(ldeaths, plot = FALSE)$acf)) ## there are no names for the lags: names(x) # NULL ## but the print method inserts default "Lag_N" names x ## This sets the names to their defaults: x1 <- dataWithLagNames(x) names(x1) ## ... and this sets non-default prefix: x2 <- dataWithLagNames(x, "L") names(x2) x2
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.