child_labels = "hidden" works with split_rows_by(), but is ignored by split_rows_by_cutfun().
Works as expected with split_rows_by()
dat <- DM
dat$AGEGRMED <- ifelse(DM$AGE <= median(DM$AGE), "Younger", "Older")
lyt <- basic_table() |>
split_rows_by("AGEGRMED", child_labels = "hidden") |>
analyze("BMRKR1", mean, format = "xx.xx")
tbl <- build_table(lyt, dat)
tbl
all obs
——————————————
mean 6.09
mean 5.65
child_labels is ignored by split_rows_by_cutfun()
cutfun <- function(x) {
cutpoints <- c(min(x), mean(x), max(x))
names(cutpoints) <- c("", "Younger", "Older")
cutpoints
}
lyt2 <- basic_table() |>
split_rows_by_cutfun("AGE", cutfun = cutfun, child_labels = "hidden") |>
analyze("BMRKR1", mean, format = "xx.xx")
tbl2 <- build_table(lyt2, dat)
tbl2
all obs
———————————————————
AGE
Younger
mean 5.83
Older
mean 5.88
It is important that child_labels = "hidden" is not ignored, particularly when the afun creates the row label.
The label_pos = "hidden" is also ignored by split_rows_by_cutfun()....
child_labels = "hidden"works withsplit_rows_by(), but is ignored bysplit_rows_by_cutfun().Works as expected with
split_rows_by()child_labelsis ignored bysplit_rows_by_cutfun()It is important that
child_labels = "hidden"is not ignored, particularly when theafuncreates the row label.The
label_pos = "hidden"is also ignored bysplit_rows_by_cutfun()....