pval: p-values formatter and significance stars

Description Usage Arguments Value Examples

Description

Formatter for p-values, adding a symbol "<" for very small p-values and, optionally, significance stars

Usage

1
2
3
4
pval(x, accuracy = 0.001, stars = FALSE, three = 0.001, two = 0.01,
  one = 0.05)

signifStars(x, three = 0.001, two = 0.01, one = 0.05)

Arguments

x

A numeric vector of p-values

accuracy

Number to round to [Default = 0.001]

stars

If TRUE then add significance stars [Default = FALSE]

three

Number indicating level below which to display three stars '***' [Default = 0.001]

two

Number indicating level below which to display two stars '**' [Default = 0.01]

one

Number indicating level below which to display one star '*' [Default = 0.05]

Value

A character vector

Examples

1
2
3
4
5
6
p <- c(.50, 0.12, .09, .045, .011, .009, .00002, NA)
pval(p)
pval(p, accuracy = .01)
pval(p, stars = TRUE)
signifStars(p)
signifStars(p, one = .15)

anilchalisey/juggleR documentation built on May 9, 2019, 4 a.m.