[R] time series analysis for a time series without a regular frequency

Gabor Grothendieck ggrothendieck at gmail.com
Fri Jan 8 21:23:39 CET 2010


The zoo package supports irregularly spaced time series and if your
create a zoo object z from your data then tt <- as.ts(z) will give you
a ts object, tt.  Since a ts object must be regularly spaced this will
add NAs to ensure that it is.

On Fri, Jan 8, 2010 at 3:05 PM, Erin Hestir <elhestir at ucdavis.edu> wrote:
> Hello,
>
> I am trying to conduct a time series analysis on historic hydrologic data,
> but I cannot coerce it into class ts because it does not have regular
> sampling intervals (some years have 20 samples, other have 8). Specifically
> I am trying to perform a CUSUM or or other step change detection, but the
> packages all seem to require data as ts.
>
> Is there a way to coerce my data into ts while maintaining all of my
> samples?
>
> Or alternatively, can someone recommend a package that does not require data
> as ts?
>
> Thanks!
>
>
>
> --
> Erin Hestir
> Center for Spatial Technology and Remote Sensing
> University of California Davis
>
>        [[alternative HTML version deleted]]
>
> ______________________________________________
> R-help at r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-help
> PLEASE do read the posting guide http://www.R-project.org/posting-guide.html
> and provide commented, minimal, self-contained, reproducible code.
>



More information about the R-help mailing list