Skip to contents

Arrange unique level values in default order of priority

Usage

prioritize_level(data)

Arguments

data

A data frame, commonly the output of match_name().

Value

A character vector of the default level priority per loan.

See also

Other helpers: crucial_lbk()

Examples

matched <- tibble::tibble(
  level = c(
    "intermediate_parent_1",
    "direct_loantaker",
    "direct_loantaker",
    "direct_loantaker",
    "ultimate_parent",
    "intermediate_parent_2"
  )
)
prioritize_level(matched)
#> [1] "direct_loantaker"      "intermediate_parent_1" "intermediate_parent_2"
#> [4] "ultimate_parent"