Learn R Programming

discoveR (version 3.1.2)

WP: Calculate intra-class inertia

Description

Calculate intra-class inertia

Usage

WP(DF, clusters)

Value

numeric

Arguments

DF

a data.frame object.

clusters

a vector specifying the cluster of each individual.

Author

Diego Jimenez <diego.jimenez@promidat.com>

Examples

Run this code
m <- hclust(dist(iris[, -5]))
WP(iris[, -5], cutree(m, 3))

Run the code above in your browser using DataLab