Learn R Programming

prefio (version 0.2.0)

pref_get_rank: Get the rank assigned to a specific item in a set of preferences.

Description

Get the rank assigned to a specific item in a set of preferences.

Usage

pref_get_rank(x, item_name)

Value

The rank of item_name for each of the preferences in x.

Arguments

x

A vector of preferences.

item_name

The name of the item to extract the rank for.

Examples

Run this code
pref_get_rank(preferences(c("a > b > c", "b > c = a", "")), "a")

Run the code above in your browser using DataLab