Keep only specified items from preferences.
Arguments
- x
A vector of
preferences
.- items
The names of the items which should be kept for preferences in
x
.
Examples
# Keep only 'a' and 'c'
pref_keep(preferences(c("a > b > c", "b > c > a")), c("a", "c"))
#> [1] [a > c] [c > a]