Calculate number of cluster-subject singletons for the purposes of permutation testing

purity(cluster_idx, subject)

Arguments

cluster_idx

factor-like cluster variable

subject

factor-like subject

Value

average number of singletons

Examples

message("see example(cluster_permute_test)")
#> see example(cluster_permute_test)