From 7f6556288bf268155db35dccd1b5dd0e8e0a6dc9 Mon Sep 17 00:00:00 2001 From: Dan Chaltiel <15105152+DanChaltiel@users.noreply.github.com> Date: Thu, 21 Nov 2024 16:04:55 +0100 Subject: [PATCH] better checks --- R/ae_table_soc.R | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/R/ae_table_soc.R b/R/ae_table_soc.R index 6995d6a..1acd811 100644 --- a/R/ae_table_soc.R +++ b/R/ae_table_soc.R @@ -294,11 +294,10 @@ butterfly_plot = function( arm="ARM", subjid="SUBJID", soc="AESOC" ){ check_dots_empty() - sort_by = arg_match(sort_by) - + assert_not_null(df_ae, df_enrol, sort_by, subjid, soc) assert_names_exists(df_ae, lst(subjid, soc, severe)) assert_names_exists(df_enrol, lst(subjid, arm)) - assert_not_null(df_ae, df_enrol, sort_by, subjid, soc) + sort_by = arg_match(sort_by) df_ae = df_ae %>% select(subjid_=any_of2(subjid), soc_=any_of2(soc),