hi all --
i've written a series of procedures to annotate nodes in a dendrogram
object.
i'd like to be able to easily pluck out some of these attributes and view
them in tree form.
in a regular list, i'd do something like:
> sapply(my_list, function(x) x$my_entry)
and in a dendrogram, i can use the dendrapply function:
> dendrapply(my_dendr, function(x) attr(x, "my_attribute"))
but this returns the values as a list.
in order to preserve the tree structure, i need to "update" the tree
node
x... but it's already updated with the attribute.
str(my_dendr) is basically what i'd like, but limited to displaying only
selected attributes... yet i don't see this as a str(...) option.
something like str(my_dendr, "my_attribute"), which would display the
attribute value in tree form (if possible).
i realize that some attributes would be problematic for this, e.g. many
multi-line display attributes, such as tables... but here i'd just like to
pluck out a single character string for data browsing...
i can just write up a recursive function to do this, but it seems like a
common-enough task that perhaps there's already a function/package already
handling this that i just don't know about?
cheers,
-m
[[alternative HTML version deleted]]