formatP: Format p-values nicely

View source: R/formatP.r

formatPR Documentation

Format p-values nicely

Description

Format p-values nicely

Usage

formatP(p, digits = 2, label = FALSE)

Arguments

p

Vector of p-values to format

digits

Digits after decimal point to display

label

If label=TRUE, prints p=0.01; otherwise, just returns 0.01

Examples

formatP(0.000003434)
formatP(0.12)
formatP(0.12, label=TRUE)


pbreheny/breheny documentation built on Feb. 18, 2025, 5:07 a.m.