pvalr-deprecated | R Documentation |
Similar to the base R function format.pval()
but does things the way that I
want them. Inspiration and lots of help with this one owed to
https://github.com/raredd/rawr.
pvalr(pvals, sig_limit, d, html)
pvals |
A numeric value or vector of p-values |
sig_limit |
Lower bound for precisions |
d |
Integer indicating the number of decimal places (round) |
html |
Logical; if |
A character value or vector of formatted p-values
lamisc-deprecated
library(dplyr)
pvals <- c(.133213, .06023, .004233, .000000134234, 1.0)
pvals_2 <- c(.133213, .06023, .004233, .000000134234, NA)
pvalr(pvals)
pvalr(pvals_2)
df <- tibble::tibble(p = pvals,
p_2 = pvals_2)
df %>%
mutate(p_formatted = pvalr(p),
p_2_formatted = pvalr(p_2)
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.