fixed lf_bp function with aes_string and reformulate
This commit is contained in:
parent
92fd905dea
commit
b05f520081
1 changed files with 11 additions and 5 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue