Learn R Programming

discoveR (version 3.1.2)

calc.centros: Calculation of the center of clusters

Description

Calculation of the center of clusters

Usage

calc.centros(data, clusters)

Value

list

Arguments

data

a data.frame object.

clusters

a vector specifying the cluster of each individual.

Author

Diego Jimenez <diego.jimenez@promidat.com>

Examples

Run this code
clusters <- factor(kmeans(iris[, -5], 3)$cluster)
calc.centros(iris[, -5], clusters)

Run the code above in your browser using DataLab