Skip to contents

Print formatted p-values. Code re-exported from scales::pvalue.

Usage

pval(x, accuracy = 0.001, decimal.mark = ".", prefix = NULL, add_p = FALSE)

Arguments

x

A numeric vector of p-values.

accuracy

A numeric to round to. Use (e.g.) 0.001 to show 3 decimal places of precision. If NULL, uses a heuristic that should ensure breaks have the minimum number of digits needed to show the difference between adjacent values.

decimal.mark

A string used to indicate the numeric decimal point.

prefix

A character vector of length 3 giving the prefixes to put in front of p-values. The default values are c("<", "", ">") if add_p is FALSE and c("p<", "p=", "p>") if TRUE.

add_p

TRUE or FALSE. If TRUE, adds "p" to prefix.

See also

scales::pvalue