You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Are there any vingnettes/examples of how to use statsExpressions to create labels for customized plots? I am trying to transition to this approach (as is recommended in ggstatsplots) to have more control over aesthetics.
the custom plot geoms are not rendered. It is as if the mappings declared in centrality_description() are not passed along to them? .
My goal is to create something like this:
BUT without having to manually hack the layers
p <- ggbetweenstats(data = df_s, x = pretty_condition, y = test_percent,
plot.type = "box", type = "nonparametric",
centrality.type = "parametric",
package = "RColorBrewer",
palette = "PRGn",
#boxplot.args = DOESN'T EXIST
centrality.point.args = list(color="black", size = 3, shape = 1),
point.args = list(alpha=0), #suppress points
ggplot.component = ## modify further with `{ggplot2}` functions
list(
aes(color = pretty_condition, fill = pretty_condition),
scale_colour_manual(values = paletteer::paletteer_c("viridis::viridis", 3)),
scale_fill_manual(values = paletteer::paletteer_c("viridis::viridis", 3)))
) +
ggdist::stat_halfeye(
alpha = 0.7,
point_colour = NA,
adjust = .5,
width = .5, .width = 0,
justification = -.5) +
geom_boxplot(
alpha = 0.1,
width = .2,
outlier.shape = NA
) +
geom_point(
size = 2,
alpha = .5,
position = position_jitter(
seed = 1, width = .05, height = .02
)
) +
coord_flip() + theme_clean() + theme(legend.position = "blank")
p$layers[[3]]=NULL #remove ggstatsplot boxplot; not customizable via args
e <- statsExpressions::oneway_anova(data = df_s, x = pretty_condition, y = test_percent,
type = "nonparametric") #gen stats test
p + labs(title = "Distribution of Test Phase Accuracy",
y = "Proportion of correct responses in test phase", x = "",
subtitle = "Impasse condition yields higher scores and greater variance",
caption=e$expression[[1]])
[edit] I see there is a mistake in the code above, I should be using two_sample_test rather than oneway_anova in the statsExpressions statement, above.
Thanks for the support, and for this awesome package!
The text was updated successfully, but these errors were encountered:
Are there any vingnettes/examples of how to use statsExpressions to create labels for customized plots? I am trying to transition to this approach (as is recommended in ggstatsplots) to have more control over aesthetics.
I have tried to follow the example provided https://indrajeetpatil.github.io/statsExpressions/ to use centrality_description() for example.
My custom raincloud plot:
renders
However, when I try to adapt this to use statsExpressions via the example:
the custom plot geoms are not rendered. It is as if the mappings declared in centrality_description() are not passed along to them?
.
My goal is to create something like this:
BUT without having to manually hack the layers
[edit] I see there is a mistake in the code above, I should be using two_sample_test rather than oneway_anova in the statsExpressions statement, above.
Thanks for the support, and for this awesome package!
The text was updated successfully, but these errors were encountered: