diff --git a/scripts/functions/lf_bp.R b/scripts/functions/lf_bp.R index 608247d..71b0472 100644 --- a/scripts/functions/lf_bp.R +++ b/scripts/functions/lf_bp.R @@ -29,11 +29,17 @@ lf_bp <- function(lf_df , stat_method = "wilcox.test" , my_paired = FALSE , stat_label = c("p.format", "p.signif") ){ - - p1 <- ggplot(lf_df, aes(x = eval(parse(text = x_grp)) - , y = eval(parse(text = y_var)) )) + + + fwv = as.formula(paste0("~", facet_var)) + p1 <- ggplot(lf_df, aes_string(x = x_grp, y = y_var)) + - facet_wrap(~ eval(parse(text = facet_var)) + #fwv = eval(parse(text = facet_var)) + # facet_wrap(~ fwv + # , nrow = n_facet_row + # , scales = y_scales) + + # + # fwv = as.formula(paste0("~", facet_var)) + facet_wrap( fwv , nrow = n_facet_row , scales = y_scales) + @@ -73,7 +79,7 @@ lf_bp <- function(lf_df , cex = 0.8 , aes(colour = factor(eval(parse(text = colour_categ))) )) } - + # Add foramtting to graph OutPlot = p2 + theme(axis.text.x = element_text(size = my_ats) , axis.text.y = element_text(size = my_ats