R/fortify-aggregate-epimodel-dcm.R
fortify_aggregate.dcm.Rd
Take external aggregate data and put it in a format used in this package
# S3 method for dcm fortify_aggregate(data, states, package_source = NULL)
data | output from external source package. See details |
---|---|
states | names of states we want aggregate totals of at each time |
package_source | optional argument to include the package from which the output is derived from, which helps with the fortify function when outputs are of generic classes such as list or data.frame |
a data frame with the following columns
time
columns X0, ..., X_K. which are numeric
This function converts external data sources (we currently support output from the EpiModel and pomp R packages), which is already aggregated and puts it in a format that can be used by our exploring functions.
#>#> #> #>head(out)#> # A tibble: 6 x 6 #> t orig_t sim X0 X1 X2 #> <int> <dbl> <fct> <dbl> <dbl> <dbl> #> 1 1 1 run1 900 100 0 #> 2 2 2 run1 885. 113. 2.13 #> 3 3 3 run1 868. 128. 4.53 #> 4 4 4 run1 849. 143. 7.24 #> 5 5 5 run1 829. 161. 10.3 #> 6 6 6 run1 807. 180. 13.7