Skip to content

Commit

Permalink
Merge pull request #33 from Merck/show_empty_row_for_categorical_vari…
Browse files Browse the repository at this point in the history
…able

Update collect.R
  • Loading branch information
wangben718 committed Jul 30, 2024
2 parents d6e959b + 4cdfc1f commit c47d53e
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion R/collect.R
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,9 @@ collect_baseline <- function(

# standardize categorical variables
if (any(c("factor", "character") %in% class_var)) {
var <- factor(var, exclude = NULL)
if (any(c("character") %in% class_var)) {
var <- factor(var, exclude = NULL)
}

if (all(is.na(var))) {
levels(var) <- c(levels(var), title["missing"])
Expand Down

0 comments on commit c47d53e

Please sign in to comment.