Learn R Programming

prefio (version 0.2.0)

pref_omit: Remove specified items from preferences.

Description

Remove specified items from preferences.

Usage

pref_omit(x, items)

Value

A new vector of preferences, but with items removed from each selection.

Arguments

x

A vector of preferences.

items

The names of the items which should be removed from the preferences in x.

Examples

Run this code
# Remove 'b'
pref_omit(preferences(c("a > b > c", "b > c > a")), "b")
# Remove 'b' and 'd'
pref_omit(preferences(c("a > b > c > d", "b > c > a > d")), c("b", "d"))

Run the code above in your browser using DataLab