Learn R Programming

mikropml (version 1.6.1)

get_groups_from_clusters: Assign features to groups

Description

Assign features to groups

Usage

get_groups_from_clusters(cluster_ids)

Value

a vector where each element is a group of correlated features separated by pipes (|)

Arguments

cluster_ids

named vector created by cluster_corr_mat(). Each element is a cluster and the name is a feature in that cluster.

Author

Kelly Sovacool, sovacool@umich.edu

Examples

Run this code
if (FALSE) {
corr_mat <- matrix(
  data = c(1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1, 1, 0, 0, 1, 1),
  nrow = 4,
  dimnames = list(
    c("a", "b", "c", "d"),
    c("a", "b", "c", "d")
  )
)
corr_mat
get_groups_from_clusters(cluster_corr_mat(corr_mat))
}

Run the code above in your browser using DataLab