Easy p-value formatting

pval_string(pv)

Arguments

pv

A p-value in numeric form.

Value

A formatted character representation of the input value.

Note

Simplified version of pixiedust::pvalString which considers < 0.05.

Examples

pv <- c(.9, .2, .049, .009, .000003) pval_string(pv)
#> [1] ".9" ".2" "< .05" "< .01" "< .001"