Skip to contents

Keep only specified items from preferences.

Usage

pref_keep(x, items)

Arguments

x

A vector of preferences.

items

The names of the items which should be kept for preferences in x.

Value

A new vector of preferences, but only containing items from each selection.

Examples

# Keep only 'a' and 'c'
pref_keep(preferences(c("a > b > c", "b > c > a")), c("a", "c"))
#> [1] [a > c] [c > a]