powered by
Format p-value with modified default settings suitable for publication.
format_pval( p, text_ahead = NULL, digits = 1, nsmall = 2, eps = 0.001, na_empty = TRUE )
A string vector of formatted p values.
The numerical p values to be formatted.
A string to be added before the p value. If not NULL, this string will be connected to the formatted p value with "=" or "<".
NULL
"="
"<"
The number of digits to be used. Same as in base::format.pval.
base::format.pval
The number of digits after the decimal point. Same as in base::format.pval.
The threshold for rounding p values to 0. Same as in base::format.pval.
If TRUE, replace "NA" in result with an empty string.
TRUE
"NA"
format_pval(c(0.001, 0.0001, 0.05, 0.1123456)) format_pval(c(0.001, 0.0001, 0.05, 0.1123456), text_ahead = "p value")
Run the code above in your browser using DataLab