| get_attr_history | R Documentation |
Extract the Attributes History from Network Simulations
get_attr_history(sims)
sims |
An |
A list of data.frames, one for each "measure" recorded in the
simulation by the record_attr_history function.
nw <- network_initialize(n = 100)
est <- netest(nw, formation = ~edges, target.stats = 50,
coef.diss = dissolution_coefs(~offset(edges), 10),
verbose = FALSE)
control <- control.net(type = "SI", nsteps = 20, nsims = 1,
tracked.attributes = "status", verbose = FALSE)
sim <- netsim(est, param.net(inf.prob = 0.3, act.rate = 1),
init.net(i.num = 10), control)
# One data frame per tracked attribute, with the changes at each step
hist <- get_attr_history(sim)
names(hist)
head(hist$status)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.