Format p-values

Description

Format p-values

Usage

1
 formatPValue(x, digits=3, ...) 

Arguments

x

p-value

digits

number of decimal-digits

...

arguments passed to further functions

Details

utility function for formating

Value

formatted string

Note

under continuous developement

Author(s)

Roland Rapold

References

none

See Also

other utility-functions in this R-package

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
    formatPValue(0.23478,     digits=3)
    formatPValue(0.023478,    digits=3)
    formatPValue(0.0023478,   digits=3)
    formatPValue(0.00023478,  digits=3)
    formatPValue(0.000023478, digits=3)
    formatPValue(0.000023478, digits=4)
    formatPValue(0.000023478, digits=5)
    formatPValue(0.000023478, digits=6)

    x <- c(seq(0.0001, 0.6, 0.01), NA, seq(0.6001, 1.0, 0.01))
    formatPValue(x, digits=3)