View source: R/basefunctions.R
formatP | R Documentation |
formatP
simplifies p-values by rounding to the maximum of p or a
predefined level. Optionally < or = can be added, as well as
symbols according to significance level.
formatP(
pIn,
ndigits = 3,
textout = TRUE,
pretext = FALSE,
mark = FALSE,
german_num = FALSE,
add.surprisal = FALSE,
sprecision = 1
)
pIn |
A numeric vector or matrix with p-values. |
ndigits |
Number of digits (default=3). |
textout |
Cast output to character (default=TRUE)? |
pretext |
Should = or < be added before p (default=FALSE)? |
mark |
Should significance level be added after p (default=FALSE)? |
german_num |
change dot (default) to comma? |
add.surprisal |
Add surprisal aka Shannon information to p-value (default=FALSE)? |
sprecision |
Rounding level for surprisal (default=1). |
vector or matrix (depending on type of pIn) with type character (default) or numeric, depending on parameter textout
formatP(0.012345)
formatP(0.012345, add.surprisal = TRUE)
formatP(0.012345, ndigits = 4)
formatP(0.000122345, ndigits = 3, pretext = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.