formatP {rmdHelpers}R Documentation

Format p-value

Description

A wrapper to sensibly control the printing of p-values because I was frustrated with playing with round. Calls format instead now.

Usage

formatP(p, digits = 3, scientific = FALSE, ...)

Arguments

p

Numeric vector of values to be displayed

digits

Numeric of length one giving the number of digits to display. Note that if p is longer than 1, all returned values will be to the same level of precision.

scientific

Logical, should scientific notation be used?

...

Further arguments passed to format

Value

Character vector of the p-value(s) formatted

Author(s)

Mark Peterson

See Also

format

Examples

formatP(0.049865465646)

formatP(0.00000013212354)

formatP(c(0.01564643131,.0003456463131, .45643131564), 2)


[Package rmdHelpers version 1.2 Index]