Skip to contents

The features whose links changed most between two versions: where to start explaining a big change.

Usage

vp_top_movers(
  old,
  new,
  graph = c("requires", "excludes", "atleastone"),
  n = 10
)

Arguments

old

The older version of a model (from vp_generate() or vp_read()).

new

The newer version of the same model.

graph

Which graph: "requires", "excludes" or "atleastone" (the last one needs or_graph = TRUE in vp_generate()).

n

How many rows to return.

Value

A tibble with feature, gained, lost and total, the largest changes first.

Examples

old <- vp_generate(vp_example("miband3_planned.uvl"), or_graph = TRUE)
new <- vp_generate(vp_example("miband3_realized.uvl"), or_graph = TRUE)
vp_top_movers(old, new, "excludes", n = 5)
#> # A tibble: 5 × 4
#>   feature         gained  lost total
#>   <chr>            <int> <int> <int>
#> 1 BT40                 5     0     5
#> 2 MovementFilter       3     0     3
#> 3 BLEv42               1     0     1
#> 4 CapacityButton       1     0     1
#> 5 HeartRateSensor      1     0     1