From 1a513913ce773132300574be674b389907c20d75 Mon Sep 17 00:00:00 2001 From: Tanushree Tunstall Date: Fri, 5 Aug 2022 20:00:04 +0100 Subject: [PATCH] reflected the factor thing as been added as new additon --- scripts/functions/lf_unpaired_stats.R | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/functions/lf_unpaired_stats.R b/scripts/functions/lf_unpaired_stats.R index fefb531..08258c0 100644 --- a/scripts/functions/lf_unpaired_stats.R +++ b/scripts/functions/lf_unpaired_stats.R @@ -7,8 +7,9 @@ lf_unpaired_stats <- function(lf_data , lf_col_statvars = "param_type" , my_paired = FALSE , stat_adj = "none"){ - + # ADDED NEW lf_data[[lf_stat_group]] = as.factor(lf_data[[lf_stat_group]]) + stat_formula = as.formula(paste0(lf_stat_value, "~", lf_stat_group)) my_stat_df = compare_means(stat_formula @@ -19,4 +20,4 @@ lf_unpaired_stats <- function(lf_data return(my_stat_df) -} \ No newline at end of file +}