I have a time series vector (not necessarily ts class) that has NAs in it. How can I omit the NAs when using aggregate.ts() to compute a function on each window? If there is at least one non-NA value in each window, I'd like to proceed with evaluating the function; otherwise, I would like NA returned. I'm not wedded to aggregate.ts and don't need ts class if there is another fast, vectorized way to handle this. Here is what I am trying to do, with the invalid na.rm thrown in: as.vector(aggregate.ts(x, ndeltat=24, FUN=min, na.rm=F)) Thanks, Scott Waichler Pacific Northwest National Laboratory scott.waichler at pnl.gov
Omitting NAs in aggregate.ts()
1 message · Waichler, Scott R