formatPval | R Documentation |
Function to simplify formatting p-values for easy viewing / publication
formatPval(
x,
d = 3,
sd,
includeP = FALSE,
includeSign = FALSE,
dropLeadingZero = TRUE
)
x |
p values to convert |
d |
number of digits |
sd |
number of scientific digits. Defaults to |
includeP |
logical value whether to include the character “p” itself.
Defaults to |
includeSign |
logical value whether to include the character “=” or “<”.
Defaults to |
dropLeadingZero |
logical value whether to drop leading zeros for p-values.
Defaults to |
A character string with stars
formatPval(c(.00052456, .000000124, .01035, .030489, .534946))
formatPval(c(.00052456, .000000124, .01035, .030489, .534946), 3, 3, FALSE, TRUE)
formatPval(c(.00052456, .000000124, .01035, .030489, .534946), 3, 3, TRUE, TRUE)
formatPval(c(.00052456, .000000124, .01035, .030489, .534946), 5)
formatPval(c(1, .15346, .085463, .05673, .04837, .015353462,
.0089, .00164, .0006589, .0000000053326), 3, 5)
formatPval(c(1, .15346, .085463, .05673, .04837, .015353462,
.0089, .00164, .0006589, .0000000053326), 3, 5, dropLeadingZero = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.