gforce.clust2mat {GFORCE}R Documentation

Convert a clustering or grouping to partnership matrix.

Description

Takes a clustering G and constructs B(G).

Usage

gforce.clust2mat(clusters)

Arguments

clusters

length d vector. Assigns each variable or data point to a cluster. Cluster names can be numbers or strings.

Value

a d x d numeric array that contains the partnership matrix corresponding to clusters.

Examples

clusters <- c(1,1,1,2,2,2,3,3)
B_clust <- gforce.clust2mat(clusters)

[Package GFORCE version 0.1.4 Index]