csh_from_digits | R Documentation |
Derive a collapsing scheme where group labels collapse to their parents in the hierarchy.
csh_from_digits(x, levels = max(nchar(x)) - 1)
x |
|
levels |
|
A data frame where each consecitive pair of columns represents
one collapsing step induced by the hierarchical classification
encoded by the digits in x
.
# balanced hierarchical classification
csh_from_digits(c("111","112","121","122","123"))
csh_from_digits(c("111","112","121","122","123"),levels=1)
# unbalanced hierarchical classification
csh_from_digits(c("111","112","121","122","1221","1222"))
csh_from_digits(c("111","112","121","122","1221","1222"),levels=2)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.