fmt_pvl | R Documentation |
Formatter for p-values, adding a symbol "<" for small p-values. Adapted
directly from scales
package.
fmt_pvl(
x,
accuracy = 0.001,
decimal.mark = ".",
add_p = FALSE,
as_factor = FALSE
)
x |
A numeric vector of p-values. |
accuracy |
Number to round to. |
decimal.mark |
The character to be used to indicate the numeric decimal point. |
add_p |
Add "P =" before the value? |
as_factor |
Logical; if TRUE, a factor is returned |
pvalue_format
returns a function with single parameter
x
, a numeric vector, that returns a character vector.
p <- c(.50, 0.12, .045, .011, .009, .00002, NA)
fmt_pvl(p)
fmt_pvl(p, accuracy = .01)
fmt_pvl(p, add_p = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.