formatP.Rd
Format p-values nicely
formatP(p, digits = 2, label = FALSE)
Vector of p-values to format
Digits after decimal point to display
If label=TRUE, prints p=0.01; otherwise, just returns 0.01
label=TRUE
p=0.01
0.01
formatP(0.000003434) #> [1] "< 0.0001" formatP(0.12) #> [1] "0.12" formatP(0.12, label=TRUE) #> [1] "p = 0.12"