From 28288665e97942ce4fe9c2ac7ce6ebf91276d953 Mon Sep 17 00:00:00 2001 From: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com> Date: Fri, 22 Nov 2024 15:58:41 +0100 Subject: [PATCH] fix ae_table_grade grade 5 ordering fixes #33 --- R/ae_table_grade.R | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/R/ae_table_grade.R b/R/ae_table_grade.R index d18418c..bbac49b 100644 --- a/R/ae_table_grade.R +++ b/R/ae_table_grade.R @@ -122,8 +122,8 @@ ae_table_grade = function( .default="ERROR"), .id = str_remove(.id, "_[^_]*$") %>% factor(levels=variant), label = fct_reorder(label, as.numeric(.id)), - variable = suppressWarnings(fct_relevel(variable, "Grade = 5", after=4)), variable = suppressWarnings(fct_relevel(variable, lab_no_ae, after=0)), + variable = suppressWarnings(fct_relevel(variable, "Grade = 5", after=Inf)), variable = suppressWarnings(fct_relevel(variable, ~str_subset(.x, "missing"), after=Inf)), ) %>% arrange(.id, label, variable)