ggsignif_adder

0th

Percentile

Adding geom_signif to the plot.

Adding geom_signif to the plot.

Keywords
internal
Usage
ggsignif_adder(plot, df_pairwise, data, pairwise.annotation = "asterisk",
  pairwise.display = "significant")
Arguments
plot

A ggplot object on which geom_signif needed to be added.

data

A dataframe (or a tibble) from which variables specified are to be taken. A matrix or tables will not be accepted.

pairwise.annotation

Character that decides the annotations to use for pairwise comparisons. Either "p.value" or "asterisk" (default).

pairwise.display

Decides which pairwise comparisons to display. Available options are "significant" (abbreviation accepted: "s") or "non-significant" (abbreviation accepted: "ns") or "everything"/"all". The default is "significant". You can use this argument to make sure that your plot is not uber-cluttered when you have multiple groups being compared and scores of pairwise comparisons being displayed.

Aliases
  • ggsignif_adder
Examples
# NOT RUN {
library(ggplot2)

# data
df <- data.frame(x = iris$Species, y = iris$Sepal.Length)

# plot
p <- ggplot(df, aes(x, y)) + geom_boxplot()

# dataframe with pairwise comparison test results
df_pair <- ggstatsplot::pairwise_p(df, x, y)

# adding plot with
ggstatsplot:::ggsignif_adder(
  plot = p,
  df_pairwise = df_pair,
  data = df
)
# }
# NOT RUN {
# }
Documentation reproduced from package ggstatsplot, version 0.0.11, License: GPL-3 | file LICENSE

Community examples

Looks like there are no examples yet.