Description Usage Arguments Value Author(s) See Also Examples
Format p-values for pretty printing.
1 2 3 4 5 6 7 | FormatPval(
x,
digits = max(1, getOption("digits") - 2),
eps = .Machine$double.eps,
na.form = "NA",
scientific = NA
)
|
x |
'numeric' vector. p-values |
digits |
'integer' count. Number of significant digits to be used. |
eps |
'numeric' number.
Numerical tolerance,
values less than |
na.form |
'character' string. Value used for missing values. |
scientific |
'logical' flag. Whether values should be encoded in scientific format using LaTeX notation. A missing value lets R decide whether fixed or scientific notation is used. |
A 'character' vector of formatted p-values.
J.C. Fisher, U.S. Geological Survey, Idaho Water Science Center
1 2 3 4 5 6 7 | x <- c(stats::runif(5), pi^-100, NA)
FormatPval(x)
format.pval(x)
x <- c(0.1, 0.0001, 1e-27)
FormatPval(x, scientific = TRUE)
FormatPval(x, digits = 3, eps = 0.001)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.