Re: [R] tree class in R?

From: Martin Maechler <>
Date: Mon 06 Dec 2004 - 22:24:24 EST

>>>>> "DFARRAR" == DFARRAR <>
>>>>> on Sun, 5 Dec 2004 22:09:02 -0500 writes:

    DFARRAR> I am trying to store a couple numbers for each
    DFARRAR> partition, in a subset of the partitions of my data
    DFARRAR> set.  Of course, one can accomplish this using a
    DFARRAR> binary tree.  (The first split is on
    DFARRAR> inclusion/exclusion of the first object, and so
    DFARRAR> on.)  I can probably simulate a tree using vectors.
    DFARRAR> (One vector gives the index of left child node,
    DFARRAR> another the index of the right child node.)
    DFARRAR> However, it seems like there must be a useful class
    DFARRAR> associated with the clustering or recursive
    DFARRAR> partitioning procedures, perhaps not out there for
    DFARRAR> everyone to see.  I poked around on the R page and
    DFARRAR> didn't see anything that clearly met my needs very
    DFARRAR> directly.

but maybe indirectly?

There's the "dendrogram" class in R, --> "?dendrogram", which had been created with the aim to be a class that would allow both regression/classification trees and hierarchical cluster dendrograms to be represented. It's not just for binary trees, and definitely much nicer to use than a "vector simulation" version.

    DFARRAR> I hope I would not have to learn     DFARRAR> recursive partitioning in R to find what I need.

(well, it may be worth your time to learn something about rpart  anyway; but you won't want to use it's representation of trees,  I think)

Martin Maechler, ETH Zurich mailing list PLEASE do read the posting guide! Received on Mon Dec 06 22:34:43 2004

This archive was generated by hypermail 2.1.8 : Mon 06 Dec 2004 - 23:18:38 EST