[R] Need help on index for time series object
Megh Dal
megh700004 at yahoo.com
Tue Jul 13 21:58:18 CEST 2010
Dear all,
Please forgive me if there is a duplicate post; my previous mail perhaps didnt reach the list.......
Let say I have following time series
library(zoo)
> dat1 <- zooreg(rnorm(10), start=as.Date("2010-01-01"), frequency=1)
> dat1[c(3, 7,8)] = NA
> dat1
2010-01-01 2010-01-02 2010-01-03 2010-01-04 2010-01-05 2010-01-06 2010-01-07 2010-01-08 2010-01-09 2010-01-10
0.31244288 -2.49383257 NA 0.38975582 -1.23040380 -0.09697926 NA NA -0.63171455 0.15867246
>
Now I want to get the Indies for the non-NA elements of dat1. Means I want to get a vector like: "1,2,4,5,6,9.10"
Having a time series vector like dat1, is there any straightforward approach to get that?
Thanks and regards,
More information about the R-help
mailing list