Skip to contents

Converts a vector of p-values to significance stars using standard thresholds.

Usage

pvalue_to_stars(pvalues, na = "")

Arguments

pvalues

Numeric vector of p-values

na

Character string to return for NA values (default: "")

Value

Character vector with significance stars

Details

Significance levels: *** p < 0.001, ** p < 0.01, * p < 0.05

Examples

pvalue_to_stars(c(0.001, 0.01, 0.05, 0.1))
#> [1] "**" "*"  " "  " " 
pvalue_to_stars(c(0.001, NA, 0.05), na = "?")
#> [1] "**" "?"  " "