Learn R Programming

CrossClustering (version 4.1.2)

reverse_table: Reverse the process of create a contingency table

Description

Reverse the process of create a contingency table

Usage

reverse_table(x)

Value

a list of 2 vector corresponding to the unrolled table

Arguments

x

a contingency table

Examples

Run this code
clust_1 <- iris[, 1:4] |>
  dist() |>
  hclust() |>
  cutree(k = 3)
clust_2 <- iris[, 1:4] |>
  dist() |>
  hclust() |>
  cutree(k = 4)
cont_table <- table(clust_1, clust_2)

reverse_table(cont_table)

Run the code above in your browser using DataLab