Displaying 1 result from an estimated 1 matches for "dat_zoo".
Did you mean:
dat_pol
2013 Jun 08
1
Need help on window() function of the 'zoo' package
...portion of my times series and if that time series data is stored in some 'zoo' object with only 1 column, then the resulting zoo object is becoming vector.
Here is my observation:
> library(zoo)
> Dat <- matrix(1:3, nc = 1)
> Dat
[,1]
[1,] 1
[2,] 2
[3,] 3
> Dat_zoo <- zooreg(Dat, start = as.Date("2001-01-01"), frequency = 1)
> Dat_zoo
2001-01-01 1
2001-01-02 2
2001-01-03 3
> window(Dat_zoo, start = as.Date("2001-01-02")) ### why it is becoming vector? I want to retain it as matrix only
2001-01-02 2001-01-03
...