improved import ui and redcap import with status messages

This commit is contained in:
Andreas Gammelgaard Damsbo 2025-04-03 13:11:02 +02:00
commit 2800177fc5
No known key found for this signature in database
13 changed files with 427 additions and 165 deletions

View file

@ -645,10 +645,10 @@ convert_to <- function(data,
setNames(list(expr(as.character(!!sym(variable)))), variable)
)
} else if (identical(new_class, "factor")) {
data[[variable]] <- as.factor(x = data[[variable]])
data[[variable]] <- REDCapCAST::as_factor(x = data[[variable]])
attr(data, "code_03_convert") <- c(
attr(data, "code_03_convert"),
setNames(list(expr(as.factor(!!sym(variable)))), variable)
setNames(list(expr(REDCapCAST::as_factor(!!sym(variable)))), variable)
)
} else if (identical(new_class, "numeric")) {
data[[variable]] <- as.numeric(data[[variable]], ...)