Learn R Programming

TraMineR (version 2.2-10)

disstree.get.rules: Tree classification rules

Description

Tree classification rules.

Usage

disstree.get.rules(tree, collapse="; ")

Value

Character vector with the rules as R commands and an attribute covariates providing the names of the variables involved in the rules.

Arguments

tree

A tree (disstree or DissTreeNode object).

collapse

Character string. Separator between categories in class of categorical values.

Author

Gilbert Ritschard)

Details

disstree.get.rules extracts the classification rules defined by a tree grown from a dissimilarity matrix and returns them as a vector of character strings. The rules are expressed as R commands and the i-th rule, for example, can be applied using eval(parse(text=rule[i])). Rules are built through a call to disstreeleaf.

See Also

disstree, disstreeleaf, disstree.assign