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) names(pv) <- pval_string(pv) pv
#> .9 .2 < .05 < .01 < .001 #> 9.0e-01 2.0e-01 4.9e-02 9.0e-03 3.0e-06