added function for stats from lf data

This commit is contained in:
Tanushree Tunstall 2021-08-27 13:01:52 +01:00
parent 6e01ef22c0
commit da9bb67706
4 changed files with 137 additions and 50 deletions

View file

@ -0,0 +1,21 @@
library(ggpubr)
###################################################################
lf_unpaired_stats <- function(lf_data
, lf_stat_value = "param_value"
, lf_stat_group = "mutation_info"
, lf_col_statvars = "param_type"
, my_paired = FALSE
, stat_adj = "none"){
stat_formula = as.formula(paste0(lf_stat_value, "~", lf_stat_group))
my_stat_df = compare_means(stat_formula
, group.by = lf_col_statvars
, data = lf_data
, paired = my_paired
, p.adjust.method = stat_adj)
return(my_stat_df)
}