Formats p-value in line with APA standard, returning it without leading 0 and as < .001 (or below the smallest value expressible with the given number of significant digits) and > .99 when it is extremely small or large.

fmt_p(p_value, digits = 3, equal_sign = TRUE)

Arguments

p_value

Numeric, or a vector of numbers

digits

Number of significant digits, defaults to 3

equal_sign

Logical. Should p-values be prefixed with = unless they are reported as < Defaults to TRUE, for use in text that reports result, FALSE is particularly useful for tables.