fixed lf_bp function with aes_string and reformulate

This commit is contained in:
Tanushree Tunstall 2021-09-17 13:33:19 +01:00
parent e2d7a6567e
commit e115c3636c

View file

@ -30,10 +30,16 @@ lf_bp <- function(lf_df
, 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) +