added function for stats from lf data
This commit is contained in:
parent
6e01ef22c0
commit
da9bb67706
4 changed files with 137 additions and 50 deletions
21
scripts/functions/lf_unpaired_stats.R
Normal file
21
scripts/functions/lf_unpaired_stats.R
Normal 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)
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue