This function builds one tree, as part of a treeClust analysis. It will not normally be called by users.
treeClust.rpart(i, dfx, d.num, control, rcontrol)
Index of column number (in dfx) of response variable.
Data set used to build tree
Distance number, 1-4, describing measurement for clustering.
List of controls for treeClust, often output of treeClust.control().
List of controls for rpart, often output of rpart.control().
List containing some of these elements (below). Size and DevRatio are always present.
Deviance ratio (decrease in dev. / original dev.) for this tree; always present
Size of pruned tree. If no tree is grown, Size is 1.
The pruned tree, if needed
Vector of leaf membership indices, if Size > 1
It is useful to encapsulate some of the tree-building code so that it can be used either in a loop or in parallel.