roundp | R Documentation |
Following conventions of many medical journals, this function rounds a p-value to two digits (if p > 0.05) or three digits (if 0.001 <= p < 0.05), or returns an inequality of "< 0.001" (if p < 0.001).
roundp(pee, equal = FALSE)
pee |
Numeric p-vale |
equal |
Show equal sign if p > 0.001? Defaults to |
String: rounded number, preceded by equal sign (unless equal = FALSE
)
or less-than sign.
roundp(0.1138)
roundp(c(0.01138, 0.0000138))
# Include equal sign
roundp(0.01138, equal = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.