f_pval {numform}R Documentation

Format P-Values

Description

Format p-values for reporting using a < or = sign if greater than alpha level.

Usage

f_pval(
  x,
  alpha = getOption("numformalpha"),
  digits = getOption("numformdigits"),
  ...
)

ff_pval(...)

Arguments

x

A p-value.

alpha

The alpha cut off to use. Defaults to .05. Can be set globally via: options(numformalpha = n) where n is the alpha level.

digits

The number of digits to use. Defaults to 3. Can be set globally via: options(numformdigits = n) where n is the number of digits beyond the decimal point to include.

...

Other values passed to f_num.

Value

Returns a string of publication ready p-values.

See Also

f_num

Examples

f_pval(.05)
f_pval(.04999999999999999)
f_pval(.0002)
f_pval(.0002, .001)

mod1 <- t.test(1:10, y = c(7:20))
f_pval(mod1$p.value)

mod2 <- t.test(1:10, y = c(7:20, 200))
f_pval(mod2$p.value)

[Package numform version 0.7.0 Index]