fmt_p_value: Format a _p_-value

View source: R/formatters.R

fmt_p_valueR Documentation

Format a p-value

Description

Format a p-value

Usage

fmt_p_value(xs, digits = 3)

Arguments

xs

a vector of numbers or a character vector representing numbers

digits

number of digits of precision

Value

formatted *-values. Values smaller than the precision 1 / (10 ^ digits) are replaced with a less than statement ⁠< [precision]⁠.

Examples

p <- c(1, 0.1, 0.01, 0.001, 0.0001)
fmt_p_value(p, digits = 2)
fmt_p_value(p, digits = 3)

tjmahr/printy documentation built on March 4, 2024, 1:25 a.m.