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] "0.9" "0.2" "< 0.05" "< 0.01" "< 0.001"