formatP: Format p-value

Description Usage Arguments Value Author(s) See Also Examples

View source: R/formatP.R

Description

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

Usage

1
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

1
2
3
4
5
formatP(0.049865465646)

formatP(0.00000013212354)

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

rmdHelpers documentation built on May 29, 2017, 9:51 a.m.

Search within the rmdHelpers package
Search all R packages, documentation and source code