| bcat_fmt_pvalue | R Documentation |
A wrapper for scales::label_pvalue to format a numeric vector to
p-values, using "<" and ">" for p-values close to 0 and 1.
bcat_fmt_pvalue(x, accuracy = 0.001, add_p = FALSE, ...)
x |
a numeric vector |
accuracy |
A number to round to. Use (e.g.) |
add_p |
logical. Add "p=" before the value? |
... |
other arguments passed to label_pvalue |
A character vector of formatted p-value labels with the same length as
x.
Other formatting:
bcat_fmt_comma(),
bcat_fmt_date(),
bcat_fmt_dollar(),
bcat_fmt_percent(),
bcat_fmt_scientific()
bcat_fmt_pvalue(c(0.01, 0.05, 0.02))
bcat_fmt_pvalue(c(0.000001, 0.999115, 0.022141))
bcat_fmt_pvalue(c(0.000001, 0.999115, 0.022141), add_p = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.