tidy.sts {surveillance} | R Documentation |
"sts"
Object to a Data Frame in Long (Tidy) Format
The resulting data frame will have a row for each time point and
observational unit, and columns corresponding to the slots of the
"sts"
object (except for populationFrac
,
which is named population
).
Some time variables are added for convenience:
year
, epochInYear
, epochInPeriod
, date
.
tidy.sts(x, ...)
x |
an object of class |
... |
unused. |
Sebastian Meyer
data("momo") momodat <- tidy.sts(momo) head(momodat) ## tidy.sts(stsObj) is the same as as.data.frame(stsObj, tidy = TRUE) stopifnot(identical(as.data.frame(momo, tidy = TRUE), momodat))