geocutree: Cut a Geograpĥic Tree into Groups of Data and return an sf...

View source: R/gtclust.R

geocutreeR Documentation

Cut a Geograpĥic Tree into Groups of Data and return an sf data.frame

Description

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).

Usage

geocutree(tree, k = NULL, h = NULL)

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


comeetie/gtclust documentation built on Sept. 17, 2024, 12:45 a.m.