Learn R Programming

surveillance (version 1.5-4)

formatPval: Pretty p-Value Formatting

Description

Just yapf -- yet another p-value formatter... It is implemented as sapply(pv, function(p) format.pval(p, digits = if (p<10*eps) 1="" else="" 2,="" eps="eps).

Usage

formatPval(pv, eps = 1e-4)

Arguments

pv
a numeric vector (of p-values).
eps
a numerical tolerance, see format.pval.

Value

  • The character vector of formatted p-values.

Examples

Run this code
formatPval(c(0.13567, 0.0432, 0.000546, 1e-8))

Run the code above in your browser using DataLab