surveillance (version 1.12.1)

aggregate-methods: Aggregate an "sts" Object Over Time or Across Units

Description

Method to aggregate the matrix slots of an sts object. Either the time series is aggregated so a new sampling frequency of nfreq units per time slot is obtained (i.e as in aggregate.ts) or the aggregation is over all ncol units.

Note: The function is not 100% consistent with what the generic function aggregate does.

Arguments

Warning

Aggregation by unit sets the upperbound slot to NA and the map slot is left as-is, but the object cannot be plotted by unit any longer.

See Also

aggregate

Examples

Run this code
data("ha.sts")
  dim(ha.sts)
  dim(aggregate(ha.sts,by="unit"))
  dim(aggregate(ha.sts,nfreq=13))

Run the code above in your browser using DataLab