Features are matched by name when two versions are compared, so a feature
that changed its name looks like one removed and one added, and its links
drop out of the comparison. vp_rename() gives the features of a version the
names they have in the other one, before comparing (it does what the option
--rename of the command strong4vm diff does). vp_rename_candidates()
suggests the renames.
Arguments
- model
A model, from
vp_generate()orvp_read().- renames
The renames: a named character vector (
c(old = "new")), a data frame with the columnsoldandnew(such as the answer ofvp_rename_candidates()), or the path of a file with one rename per line (the old name, a space, the new name; a tab instead of the space when a name has spaces; lines that start with#and empty lines are ignored), such as the file thatvp_rename_candidates()writes.
Value
The model with the features renamed in its features, graphs and atomic sets. A rename whose old name is not a feature of the model changes nothing, with a warning.
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_apply(),
vp_history_changes(),
vp_history_sizes(),
vp_hub_stability(),
vp_interaction_changes(),
vp_life_cycle(),
vp_link_lifetime(),
vp_prediction_table(),
vp_rename_candidates(),
vp_ripple(),
vp_state_moves(),
vp_top_movers(),
vp_version_distance()
Examples
old <- vp_generate(vp_example("miband3_planned_old.uvl"), or_graph = TRUE)
new <- vp_generate(vp_example("miband3_realized.uvl"), or_graph = TRUE)
vp_compare(old, new) # BLEv40Old and BLEv40 look different
#> # A tibble: 3 × 10
#> graph kept added removed old_links new_links gained lost jaccard spearman
#> <chr> <int> <int> <int> <int> <int> <int> <int> <dbl> <dbl>
#> 1 requires 10 1 1 10 17 7 0 0.588 0.922
#> 2 excludes 10 1 1 1 8 7 0 0.125 NA
#> 3 atleast… 10 1 1 0 3 3 0 0 NA
vp_compare(vp_rename(old, c(BLEv40Old = "BLEv40")), new)
#> # A tibble: 3 × 10
#> graph kept added removed old_links new_links gained lost jaccard spearman
#> <chr> <int> <int> <int> <int> <int> <int> <int> <dbl> <dbl>
#> 1 requires 11 0 0 10 21 11 0 0.476 0.867
#> 2 excludes 11 0 0 3 10 7 0 0.3 NA
#> 3 atleast… 11 0 0 0 3 3 0 0 NA