fixed lf_bp function with aes_string and reformulate
This commit is contained in:
parent
e2d7a6567e
commit
e115c3636c
1 changed files with 11 additions and 5 deletions
|
@ -29,11 +29,17 @@ lf_bp <- function(lf_df
|
||||||
, stat_method = "wilcox.test"
|
, stat_method = "wilcox.test"
|
||||||
, my_paired = FALSE
|
, my_paired = FALSE
|
||||||
, stat_label = c("p.format", "p.signif") ){
|
, stat_label = c("p.format", "p.signif") ){
|
||||||
|
|
||||||
p1 <- ggplot(lf_df, aes(x = eval(parse(text = x_grp))
|
fwv = as.formula(paste0("~", facet_var))
|
||||||
, y = eval(parse(text = y_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
|
, nrow = n_facet_row
|
||||||
, scales = y_scales) +
|
, scales = y_scales) +
|
||||||
|
|
||||||
|
@ -73,7 +79,7 @@ lf_bp <- function(lf_df
|
||||||
, cex = 0.8
|
, cex = 0.8
|
||||||
, aes(colour = factor(eval(parse(text = colour_categ))) ))
|
, aes(colour = factor(eval(parse(text = colour_categ))) ))
|
||||||
}
|
}
|
||||||
|
|
||||||
# Add foramtting to graph
|
# Add foramtting to graph
|
||||||
OutPlot = p2 + theme(axis.text.x = element_text(size = my_ats)
|
OutPlot = p2 + theme(axis.text.x = element_text(size = my_ats)
|
||||||
, axis.text.y = element_text(size = my_ats
|
, axis.text.y = element_text(size = my_ats
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue