Skip to contents

Returns a human-readable label for use in tree plot annotations. When var_labels contains a named entry matching var_name, that label is used. Otherwise, the function falls back to .tree_default_name().

Usage

tree_pretty_var_name(var_name, var_labels = NULL)

Arguments

var_name

A character scalar naming the variable to label.

var_labels

An optional named character vector of display labels.

Value

A length-one character vector used in plot labels.