On Tue, Jul 13, 2010 at 3:58 PM, Megh Dal wrote:
> 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)
which(!is.na(dat1))
--
View this message in context:
http://r.789695.n4.nabble.com/Need-help-on-index-for-time-series-object-tp2287926p2287948.html
Sent from the R help mailing list archive at Nabble.com.
__
R-help@r-project.org mailing list
https://s
Megh,
I don't know whether this is the best way, but it works:
> seq(1,length(dat1))[!is.na(dat1)]
[1] 1 2 4 5 6 9 10
Jonathan
On Tue, Jul 13, 2010 at 1:58 PM, Megh Dal wrote:
> Dear all,
>
> Please forgive me if there is a duplicate post; my previous mail perhaps
> didnt reach the lis
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
4 matches
Mail list logo