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

View source: R/geohclust.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 geohclust. 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::sf like object


comeetie/geohclust documentation built on May 23, 2022, 6:30 a.m.