Skip to contents

p-values in a human-readable string

Usage

pretty_p_value(x, minval = 1e-04)

Arguments

x

A numeric vector.

minval

The minimum p-value to show (lower values will show as paste0("<", minval)).

Value

A character vector of p-value representations.

Examples

pretty_p_value(c(1, 0, NA, 0.01, 0.0000001))
#> [1] "1.0000"  "<0.0001" NA        "0.0100"  "<0.0001"
pretty_p_value(c(1, 0, NA, 0.01, 0.0000001), minval = 0.05)
#> [1] "1.00"  "<0.05" NA      "<0.05" "<0.05"