clsSplit: Split a TURN-RES Cluster into k Parts (kmeans)

Description Usage Arguments Details Value Author(s) Examples

View source: R/clsSplit.R

Description

If there is a giant or nuisance component in the clustering (which may have arisen from numerous narrow bridges in the dataset), this helper function splits it into k smaller clusters using kmeans.

Usage

1
clsSplit(x, cls.spec, k)

Arguments

x

a cTurn object containing the clustering that requires splitting.

cls.spec

a vector enumerating the cluster(s) that require splitting.

k

the number of clusters to split apart the specified into.

Details

This is essentially a wrapper for the kmeans function, but deals with the nuts and bolts of retaining the required structure of the input object, x.

Value

An object of class cTurn. This will be the same object as x, but with the $cluster vector now reflecting the desired split.

Author(s)

Alex Bird, alex.bird@boots.co.uk

Examples

1
2
x = rnorm(30,0,1);
mean(x) #approx 0.5. Nothing to do with this!

ornithos/nectr documentation built on May 24, 2019, 3:57 p.m.