powered by
Get the rank assigned to a specific item in a set of preferences.
pref_get_rank(x, item_name)
The rank of item_name for each of the preferences in x.
item_name
x
A vector of preferences.
preferences
The name of the item to extract the rank for.
pref_get_rank(preferences(c("a > b > c", "b > c = a", "")), "a")
Run the code above in your browser using DataLab