pval.xtable: Convert p-values into strings with inequalities.

Description Usage Arguments Value Author(s) Examples

Description

Often times the p values are so small they must either be expressed with bajillions of digits, or in scientific notation. It is common to simply state that p<.0001, or something of the sort. This function takes a vector of p-values and converts them into characters so they can be expressed with inequalities.

Usage

1
pval.xtable(p.values, round.digits = 4, threshold = 1e-04, scipen = FALSE)

Arguments

p.values

A vector (or scalar) of p-values.

round.digits

How many digits should the decimals be rounded to during display?

threshold

The threshold for the inequalities. This value with then be joined with the inequality via paste. (e.g., threshold = .01 becomes "<.01")

scipen

Should scientific notation be used? Defaults to zero. (Note: it will not entirely suppress scientific notation, but will make it so extreme it will likely never happen).

Value

A vector of strings yielding the formatted p-values

Author(s)

Dustin Fife

Examples

1
2
3
p.values = runif(100,0,1)
pval.xtable(p.values, round.digits=2, threshold=.01)
pval.xtable

vagnerfonseca/fifer documentation built on May 3, 2019, 4:06 p.m.