Applies a function to every version of a history and binds the answers, one
block per version. The function takes a model and returns a number (one
column value), a named vector (one column per name) or a tibble (its rows).
Arguments
- history
A history: the versions of a model, from
vp_read_history()orvp_history(), oldest first.- f
A function of a model, such as vp_depth, or function(m) vp_gini(vp_feature_table(m)$required_by).
- ...
More arguments for
f.
See also
Other evolution:
vp_attachment(),
vp_auc(),
vp_changed_links(),
vp_co_change(),
vp_community_history(),
vp_compare(),
vp_disruptions(),
vp_edit_type(),
vp_eras(),
vp_feature_churn(),
vp_feature_states(),
vp_flip_flops(),
vp_forecast_size(),
vp_growth(),
vp_history_changes(),
vp_history_sizes(),
vp_hub_stability(),
vp_interaction_changes(),
vp_life_cycle(),
vp_link_lifetime(),
vp_prediction_table(),
vp_rename(),
vp_rename_candidates(),
vp_ripple(),
vp_state_moves(),
vp_top_movers(),
vp_version_distance()
Examples
gens <- c("miband1", "miband2", "miband3", "miband4", "miband6")
history <- vp_history(
vp_example(paste0(gens, "_realized.uvl")),
versions = gens,
or_graph = TRUE
)
vp_history_apply(history, vp_depth)
#> # A tibble: 5 × 2
#> version value
#> <fct> <int>
#> 1 miband1 0
#> 2 miband2 1
#> 3 miband3 3
#> 4 miband4 4
#> 5 miband6 5
vp_history_apply(
history,
function(m) vp_gini(vp_feature_table(m)$required_by)
)
#> # A tibble: 5 × 2
#> version value
#> <fct> <dbl>
#> 1 miband1 0
#> 2 miband2 0.625
#> 3 miband3 0.649
#> 4 miband4 0.676
#> 5 miband6 0.498