Learn R Programming

monoClust (version 1.2.1)

create_labels: Create Labels for Split Variables

Description

This function prints variable's labels for a MonoClust tree.

Usage

create_labels(x, abbrev, digits = getOption("digits"), ...)

Arguments

x

MonoClust result object.

abbrev

Whether to print the abbreviated versions of variable names. Can be either "no" (default), "short", or "abbreviate". Short forms of them can also be used.

If "no", the labels recorded in x$labels are used.

If "short", variable names will be turned into "V1", "V2", ...

If "abbreviate", abbreviate() function will be used. Use the optional arguments for this function.

digits

Number of significant digits to print.

...

Optional arguments to abbreviate().

Value

A list containing two elements:

  • varnames: A named vector of labels corresponding to variable's names (at vector names).

  • labels: Vector of labels of splitting rules to be displayed.

See Also

abbreviate()