diff --git a/main/coverage-report/index.html b/main/coverage-report/index.html index 951ec40d1b..8b2b552a0f 100644 --- a/main/coverage-report/index.html +++ b/main/coverage-report/index.html @@ -106,8 +106,8 @@
make_split_fun(
post = list(
function(splret, spl, fulldf) {
if (!"ref_group_value" %in% methods::slotNames(spl)) {
spl_var <- rtables:::spl_payload(spl)
fulldf[[spl_var]] <- factor(fulldf[[spl_var]])
init_lvls <- levels(fulldf[[spl_var]])
if (!all(names(splret$values) %in% init_lvls)) {
ref_group_pos <- which(init_lvls == rtables:::spl_ref_group(spl))
pos_choices <- c("first", "last")
if (checkmate::test_choice(position, pos_choices) && position == "first") {
pos <- 0
reord_lvls <- append(init_lvls[-ref_group_pos], init_lvls[ref_group_pos], after = pos)
ord <- match(reord_lvls, names(splret$values))
make_split_result(
splret$values[ord],
splret$datasplit[ord],
splret$labels[ord]