Skip to contents

This function formats a vector of p-values to match the common requirement of 3 decimals with no leading zeros and indicated as "< .001" rather than .000.

Usage

format_p(p)

Arguments

p

A (named) numeric vector of p-values

Value

A (named) character vector of formatted p-values

Examples

format_p(c(0.000007, 0.15))
#> [1] "< .001" ".150"