Gets the upper part of the tree when you cut at height h (or alternately to have k leaves). Returns a valid protoclust object. This new tree has a different indexing from the original tree. i.original can be used to recover the old indexing and merge.id indicates for each leaf of new tree that had been an interior node, the merge.id of it.
upper(hc, h = NULL, k = NULL)
protoclust object
cut height
number of leaves that upper cut should have
protoclust object representing the upper cut
index of each element in original tree
merge.id from original tree of each leaf
merge.id from original tree of each interior node
cut height
number of objects in original tree