From ab24408e0e4268a46ff8b1d819c0621a5e1829c1 Mon Sep 17 00:00:00 2001 From: James Azam Date: Fri, 15 Dec 2023 23:12:21 +0000 Subject: [PATCH] Fix aggregate arg --- vignettes/epichains.Rmd | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/vignettes/epichains.Rmd b/vignettes/epichains.Rmd index 53e97e60..89045ee9 100644 --- a/vignettes/epichains.Rmd +++ b/vignettes/epichains.Rmd @@ -300,7 +300,7 @@ summary(simulate_summary_eg) ### Aggregating -You can aggregate `` objects returned by the `simulate_*()` functions into a time series, which is a `` with columns "cases" and either "generation" or "time", depending on the value of `grouping_var`. +You can aggregate `` objects returned by the `simulate_*()` functions into a time series, which is a `` with columns "cases" and either "generation" or "time", depending on the value of `by`. To aggregate over "time", you must have specified a generation time distribution in the simulation step. ```{r include=TRUE,echo=TRUE} @@ -322,7 +322,7 @@ sim_tree_eg <- simulate_tree( lambda = 0.9 ) -aggregate(sim_tree_eg, grouping_var = "time") +aggregate(sim_tree_eg, by = "time") ``` ### Plotting @@ -349,7 +349,7 @@ sim_tree_eg <- simulate_tree( ) # Aggregate cases over time -sim_aggreg <- aggregate(sim_tree_eg, grouping_var = "time") +sim_aggreg <- aggregate(sim_tree_eg, by = "time") # Plot cases over time plot(sim_aggreg, type = "b")