Get the rank assigned to a specific item in a set of preferences.
Source:R/pref_tools.R
pref_get_rank.Rd
Get the rank assigned to a specific item in a set of preferences.
Arguments
- x
A vector of
preferences
.- item_name
The name of the item to extract the rank for.
Examples
pref_get_rank(preferences(c("a > b > c", "b > c = a", "")), "a")
#> [1] 1 2 NA