add_significance: Add P-value Significance Symbols

View source: R/add_significance.R

add_significanceR Documentation

Add P-value Significance Symbols

Description

Add p-value significance symbols into a data frame.

Usage

add_significance(
  data,
  p.col = NULL,
  output.col = NULL,
  cutpoints = c(0, 1e-04, 0.001, 0.01, 0.05, 1),
  symbols = c("****", "***", "**", "*", "ns")
)

Arguments

data

a data frame containing a p-value column.

p.col

column name containing p-values.

output.col

the output column name to hold the adjusted p-values.

cutpoints

numeric vector used for intervals.

symbols

character vector, one shorter than cutpoints, used as significance symbols.

Value

a data frame

Examples

# Perform pairwise comparisons and adjust p-values
ToothGrowth %>%
 t_test(len ~ dose) %>%
 adjust_pvalue() %>%
 add_significance("p.adj")


kassambara/rstatix documentation built on Feb. 6, 2023, 3:36 a.m.