Skip to contents

Check the length (number of rankings) of a preference.

Usage

pref_length(x)

Arguments

x

A vector of preferences.

Value

The number of items listed on each of the preferences.

Examples

pref_length(preferences(c("a > b > c", "", "b > c")))
#> [1] 3 0 2