fmt_p: Format p-value in line with APA standard (no leading 0)

View source: R/formatters.R

fmt_pR Documentation

Format p-value in line with APA standard (no leading 0)

Description

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.

Usage

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.


LukasWallrich/timesaveR documentation built on Nov. 29, 2024, 4:47 a.m.