Default text for caption: "p-value stars: (blank): not sig.; -: p > 0.10; *: p <= 0.05; **: p <= 0.01; ***: p <= 0.001; ****: p <= 0.0001"

e_pval_stars(
  p_values = NULL,
  cutpoints = c(0, 1e-04, 0.001, 0.01, 0.05, 0.1, 1),
  symbols = c("****", "***", "**", "*", "-", " ")
)

Arguments

p_values

list of p-values

cutpoints

list of p-value cutpoints, should include 0 and 1 at extremes

symbols

list of symbols with length one fewer than cutpoints to indicate which two cutpoints the p-value was between

Value

a list of symbols of the same length as p_values

Examples

e_pval_stars(c(0.049, 0.050, 0.051, NA))
#> [1] "*" "*" "-" "" 
#> attr(,"legend")
#> [1] "0 '****' 1e-04 '***' 0.001 '**' 0.01 '*' 0.05 '-' 0.1 ' ' 1"