map_partition() fits partition() across a range of minimum information values, specified in the information argument. The output is a tibble with a row for each value of information, a summary of the partition, and a list-col containing the partition object.

map_partition(
  .data,
  partitioner = part_icc(),
  ...,
  information = seq(0.1, 0.5, by = 0.1)
)

Arguments

.data

a data set to partition

partitioner

the partitioner to use. The default is part_icc().

...

arguments passed to partition()

information

a vector of minimum information to fit in partition()

Value

a tibble

Examples

set.seed(123)
df <- simulate_block_data(c(3, 4, 5), lower_corr = .4, upper_corr = .6, n = 100)

map_partition(df, partitioner = part_pc1())
#> # A tibble: 5 × 5
#>   target_info observed_info nclusters nreduced partition 
#>         <dbl>         <dbl>     <int>    <int> <list>    
#> 1         0.1         0.267         1       12 <partitin>
#> 2         0.2         0.267         1       12 <partitin>
#> 3         0.3         0.3           2       12 <partitin>
#> 4         0.4         0.434         3       12 <partitin>
#> 5         0.5         0.561         3       12 <partitin>