mapping_key {partition} | R Documentation |
Return partition mapping key
Description
mapping_key()
returns a data frame with each reduced variable and its
mapping and information loss; the mapping and indices are represented as
list-cols
(so there is one row per variable in the reduced data set).
unnest_mappings()
unnests the list columns to return a tidy data frame.
mapping_groups()
returns a list of mappings (either the variable names or
their column position).
Usage
mapping_key(.partition)
unnest_mappings(.partition)
mapping_groups(.partition, indices = FALSE)
Arguments
.partition |
a |
indices |
logical. Return just the indices instead of the names? Default is |
Value
a tibble
Examples
set.seed(123)
df <- simulate_block_data(c(3, 4, 5), lower_corr = .4, upper_corr = .6, n = 100)
# fit partition
prt <- partition(df, threshold = .6)
# tibble: 6 x 4
mapping_key(prt)
# tibble: 12 x 4
unnest_mappings(prt)
# list: length 6
mapping_groups(prt)
[Package partition version 0.2.1 Index]