Skip to contents

timesteps are stored as colnames(Y), but column names cannot be Date objects. Instead, we use strings. If they are strings convertible to dates, return that

Usage

timesteps(Y)

Arguments

Y

a matrix

Value

its column names interpreted as Dates if possible

Examples

# \donttest{
data(california_prop99)
setup <- panel.matrices(california_prop99)
timesteps(setup$Y)
#>  [1] "1970" "1971" "1972" "1973" "1974" "1975" "1976" "1977" "1978" "1979"
#> [11] "1980" "1981" "1982" "1983" "1984" "1985" "1986" "1987" "1988" "1989"
#> [21] "1990" "1991" "1992" "1993" "1994" "1995" "1996" "1997" "1998" "1999"
#> [31] "2000"
# }