Skip to contents

This function generates crosstables for segment assignments between pairs of consecutive models in the rack, and returns a list of these crosstables.

Usage

rack_extract_pairwise_segment_breakdown(rack)

Arguments

rack

A model rack object for segmentation models.

Examples

rack_extract_pairwise_segment_breakdown(example_seg_rack)
#> Warning: There was 1 warning in `mutate()`.
#> ℹ In argument: `across(-"segment_1", prettyxlsx::xlsx_set_numFmt, "0%")`.
#> Caused by warning:
#> ! The `...` argument of `across()` is deprecated as of dplyr 1.1.0.
#> Supply arguments directly to `.fns` through an anonymous function instead.
#> 
#>   # Previously
#>   across(a:b, mean, na.rm = TRUE)
#> 
#>   # Now
#>   across(a:b, \(x) mean(x, na.rm = TRUE))
#> ℹ The deprecated feature was likely used in the g6tr.segmentation package.
#>   Please report the issue to the authors.
#> $`nmf_3 -> nmf_4`
#> # A tibble: 3 × 2
#>   nmf_3 nmf_4$`1`     $`2`     $`3`     $`4`
#>   <fct>  <p_xlsx> <p_xlsx> <p_xlsx> <p_xlsx>
#> 1 1        [0.11]   [0.02]   [0.01]   [0.09]
#> 2 2           [0]    [0.4]   [0.01]   [0.08]
#> 3 3         [0.1]      [0]   [0.18]   [0.01]
#> 
#> $`nmf_4 -> nmf_5`
#> # A tibble: 4 × 2
#>   nmf_4 nmf_5$`1`     $`2`     $`3`     $`4`     $`5`
#>   <fct>  <p_xlsx> <p_xlsx> <p_xlsx> <p_xlsx> <p_xlsx>
#> 1 1        [0.11]      [0]   [0.01]   [0.09]      [0]
#> 2 2           [0]   [0.26]   [0.08]   [0.06]   [0.01]
#> 3 3        [0.06]   [0.04]   [0.07]   [0.02]   [0.02]
#> 4 4           [0]   [0.01]      [0]    [0.1]   [0.07]
#>