# From cluster_summary
mat <- matrix(c(0.5, 0.2, 0.3,
0.1, 0.6, 0.3,
0.4, 0.1, 0.5), 3, 3, byrow = TRUE,
dimnames = list(c("A", "B", "C"), c("A", "B", "C")))
clusters <- list(G1 = c("A", "B"), G2 = c("C"))
cs <- csum(mat, clusters, type = "tna")
m <- as_mcml(cs)
m$macro$weights
Run the code above in your browser using DataLab