Description Usage Arguments Details Value
View source: R/agent-to-aggregate.R
This internal function specifically takes a data frame the contains rows that provide the an integer time, a state and the number of agents that entered that state at that time (this data frame only contains counts > 0).
1 | expanding_info(df, t_min, t_max, K)
|
df |
data frame with |
t_min |
minimum integer time |
t_max |
maximum integer time |
K |
(number of stages - 1) (e.g.: SIR has K = 2) |
This function then outputs a "pivot_longer
" data frame, that has 1 row
per integer time period between (and including) t_min and t_max. Even if 0
agents change their state at that given time. The columns (beyond t
)
relate to each state.
expanded data frame: a data frame with columns t
and a set of
the unique states
as columns. For each row, it contains the number
of agents to change to said state at specified time.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.