This function is very much just a wrapper function for insight::format_p() with opinionated defaults.

format_p(
  p,
  name = NULL,
  whitespace = FALSE,
  stars = TRUE,
  lang = c("eng", "ger")[1],
  ...
)

Arguments

p

value or vector of p-values.

name

Name prefixing the text. Default: NULL.

whitespace

Logical, if FALSE (default) all whitespace characters are removed from the returned string.

stars

Add significance stars (e.g., p < .001***). Default: TRUE.

lang

Language for output (which here only determines the decimal separator).

...

other arguments passed to insight::format_p().

Examples

BioMathR::format_p(c(0.04, 0.004, 0.0004, 0.00004, 0.000004))
#> [1] "0.040*"   "0.004**"  "<.001***" "<.001***" "<.001***"