p_values | R Documentation |
Rounds a p-value by decimal places and reports with sig figs
p_round(x, n = 3, sig = n) p_value_sig(x, cutoffs = c(`***` = 0.001, `**` = 0.01, `*` = 0.05, . = 0.1))
x |
A vector of p-values |
n |
Number of digits to round by (if NULL - no rounding occurs) |
sig |
Number of significant figures (if NULL - not used) |
cutoffs |
A named vector for significant cutoffs |
set.seed(42) x <- stats::pchisq(abs(runif(25)), 4) print(data.frame(x = x, p = p_round(x), sigs = p_value_sig(x)), digits = 3, right = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.