From 8e3feb54d718a108783698c4347b3774b9fbd5d0 Mon Sep 17 00:00:00 2001 From: MHaringa Date: Wed, 2 Oct 2024 12:30:17 +0200 Subject: [PATCH] multiple object in rating factors --- R/model_rating_factors.R | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/R/model_rating_factors.R b/R/model_rating_factors.R index 168c095..281804c 100644 --- a/R/model_rating_factors.R +++ b/R/model_rating_factors.R @@ -194,6 +194,7 @@ rating_factors2 <- function(model, model_data = NULL, exposure = NULL, uit$pvalues <- ifelse(uit$pvalues < 0, NA, uit$pvalues) uit$pvalues <- vapply(uit$pvalues, function(x) make_stars(x), FUN.VALUE = character(1)) + uit$risk_factor <- sub("_rst99$", "", uit$risk_factor) uit } @@ -334,7 +335,7 @@ rating_factors <- function(..., model_data = NULL, exposure = NULL, paste0("signif_", cols))] } - rf_fj$risk_factor <- sub("_rst99$", "", rf_fj$risk_factor) + return(structure(list(df = rf_fj, df_stars = rf_fj_stars,