kmeans1: kmeans for 1D data with ordered clusters

Description Usage Arguments Value Examples

View source: R/scripts.R

Description

Uses kmeans and then renames the clusters so that they are arranged in the increasing order of means

Usage

1
kmeans1(x, centers, ...)

Arguments

x

vector of 1D data

centers

number of clusters

...

other arguments passed to kmeans

Value

a list returned by kmeans with clusters arranged in the order of their means in the following list elements: cluster, withinss, size, centers. Additional elements are also addded to the list: frac is the cluster size as a fraction of the total, cluster_sd is the standard deviations of clusters and centers_se is the standard error of the cluster centers.

Examples

1
#

rushkin/bitsandends documentation built on Oct. 21, 2020, 11:43 a.m.