-
-
Notifications
You must be signed in to change notification settings - Fork 40
Open
Labels
3 investigators ❔❓Need to look further into this issueNeed to look further into this issue
Description
get_data.coxph
returns data without labels. As a consequence, when used for parameters::parameters
, the attribute pretty_labels
is not useful at all.
Indeed, in the function
Lines 1827 to 1852 in a95325c
get_data.coxph <- function(x, source = "environment", verbose = TRUE, ...) { | |
# try to recover data from environment | |
model_data <- .get_data_from_environment(x, source = source, verbose = verbose, ...) | |
if (!is.null(model_data)) { | |
return(model_data) | |
} | |
# fall back to extract data from model frame | |
# first try, parent frame | |
dat <- tryCatch( | |
{ | |
mf <- .recover_data_from_environment(x) | |
mf <- .prepare_get_data(x, stats::na.omit(mf), verbose = FALSE) | |
}, | |
error = function(x) NULL | |
) | |
# second try, default extractor. Less good because of coercion to other types | |
if (is.null(dat)) { | |
# second try, global env | |
dat <- get_data.default(x, source = source, verbose = verbose, ...) | |
} | |
dat | |
} |
the issue happens with .prepare_get_data
, where labels are removed from variables.
Metadata
Metadata
Assignees
Labels
3 investigators ❔❓Need to look further into this issueNeed to look further into this issue