Set the label for the missing subjects row
Source:R/count_bindings.R
set_missing_subjects_row_label.Rd
Set the label for the missing subjects row
Examples
t <- tplyr_table(mtcars, gear) %>%
add_layer(
group_count(cyl) %>%
add_missing_subjects_row() %>%
set_missing_subjects_row_label("Missing")
)
#> Warning: Population data was not set separately from the target data.
#> Missing subject counts may be misleading in this scenario.
#> Did you mean to use `set_missing_count() instead?
build(t)
#> # A tibble: 4 × 6
#> row_label1 var1_3 var1_4 var1_5 ord_layer_index ord_layer_1
#> <chr> <chr> <chr> <chr> <int> <dbl>
#> 1 4 " 1 ( 6.7%)" " 8 ( 66.7%)" " 2 ( 40.0… 1 1
#> 2 6 " 2 ( 13.3%)" " 4 ( 33.3%)" " 1 ( 20.0… 1 2
#> 3 8 "12 ( 80.0%)" " 0 ( 0.0%)" " 2 ( 40.0… 1 3
#> 4 Missing " ( 0.0%)" " ( 0.0%)" " ( 0.0… 1 4