pvalue | R Documentation |
Formatter for p-values, adding a symbol "<" for small p-values.
pvalue(x, accuracy = 0.001, decimal.mark = ".", prefix = NULL, add_p = FALSE)
label_pvalue(
accuracy = 0.001,
decimal.mark = ".",
prefix = NULL,
add_p = FALSE
)
accuracy |
A number to round to. Use (e.g.) Applied to rescaled data. |
decimal.mark |
The character to be used to indicate the numeric decimal point. |
prefix |
A character vector of length 3 giving the prefixes to
put in front of numbers. The default values are |
add_p |
Add "p=" before the value? |
label_pvalue
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)
pvalue(p)
pvalue(p, accuracy = .01)
pvalue(p, add_p = TRUE)
custom_function <- label_pvalue(accuracy = .1, decimal.mark = ",")
custom_function(p)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.