Skip to content

Commit

Permalink
Update remove_row_type.R (#1859)
Browse files Browse the repository at this point in the history
  • Loading branch information
ddsjoberg authored Jul 20, 2024
1 parent 0076d67 commit 0a5136e
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions R/remove_row_type.R
Original file line number Diff line number Diff line change
Expand Up @@ -51,16 +51,17 @@ remove_row_type <- function(x, variables = everything(),
variables = "reference_row",
expr = expr(.data$reference_row %in% TRUE)
)
} else if (type == "header" && inherits(x, c("tbl_summary", "tbl_svysummary", "tbl_survfit"))) {
lst_expr <- list(
variables = c("var_type", "row_type"),
expr = expr(.data$var_type %in% c("categorical", "continuous2") & .data$row_type == "label")
)
} else if (type == "header" && "header_row" %in% names(x$table_body)) {
lst_expr <- list(
variables = "header_row",
expr = expr(.data$header_row %in% TRUE)
)
} else if (type == "header") {
lst_expr <- list(
variables = c("var_type", "row_type"),
expr = expr(.data$var_type %in% c("categorical", "continuous2") & .data$row_type == "label")
)

} else if (type == "missing") {
lst_expr <- list(
variables = "row_type",
Expand Down

0 comments on commit 0a5136e

Please sign in to comment.