Re: [R] finding and describing missing data runs in a time series

2012-02-13 Thread Ted Harding
On 13-Feb-2012 Durant, James T. (ATSDR/DTEM/PRMSB) wrote: > Hi - > I am trying to find and describe missing data in a time series. > For instance, in the library openair, there is a data frame > called "mydata": > library(openair) > head(mydata) > > date ws wd nox no2 o3 pm10so2 co

Re: [R] finding and describing missing data runs in a time series

2012-02-12 Thread R. Michael Weylandt
Not at a computer to test this but perhaps rle(is.na(x)) might help. Michael On Feb 12, 2012, at 7:36 PM, "Durant, James T. (ATSDR/DTEM/PRMSB)" wrote: > Hi - > > I am trying to find and describe missing data in a time series. For instance, > in the library openair, there is a data frame c

[R] finding and describing missing data runs in a time series

2012-02-12 Thread Durant, James T. (ATSDR/DTEM/PRMSB)
Hi - I am trying to find and describe missing data in a time series. For instance, in the library openair, there is a data frame called "mydata": library(openair) head(mydata) date ws wd nox no2 o3 pm10so2 co pm25 1 1998-01-01 00:00:00 0.60 280 285 39 1 29 4.7225 3.3725 NA