Description Usage Arguments Value Examples
Calculates chi-square distances between selected rows or columns of the contingency table.
1 | cluster_distance(table, clusters, dimension = 1)
|
table |
object of class "table". |
clusters |
list of integer vectors. Each vector should define a cluster by specifing row or column indices of its memebrs. Clusters must not overalap. |
dimension |
integer. Whether to use rows (1) or columns (2). Default is 1. |
Matrix of size length(clusters) x length(clusters) containing distances between selected clusters of rows or columns.
1 2 3 4 | data(israeli_survey)
cluster_distance(israeli_survey, as.list(seq_len(nrow(israeli_survey))), 1)
cluster_distance(israeli_survey, list(1, 2, c(3, 5), c(4, 6, 7), 8), 1)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.