data("ha.sts")
dim(ha.sts)
dim(aggregate(ha.sts, by = "unit"))
dim(aggregate(ha.sts, nfreq = 13))
# \dontshow{
## population(ha.sts) are trivial fractions, aggregate() should keep them
stopifnot(population(aggregate(ha.sts)) == 1/ncol(ha.sts))
## failed in surveillance <= 1.16.2
# }
Run the code above in your browser using DataLab