Cut a Geograpĥic Tree into Groups of Data and return an sf data.frame
geocutree.Rd
Cuts a tree, e.g., as resulting from geohclust_poly, into several groups either by specifying the desired number(s) of groups or the cut height(s).
Arguments
- tree
a tree as produced by gtclust. cutree() only expects a list with components merge, height, and labels, of appropriate content each.
- k
an integer scalar or vector with the desired number of groups
- h
numeric scalar or vector with heights where the tree should be cut. At least one of k or h must be specified, k overrides h if both are given.
Value
an sf
like object