clean_pval: Clean p-value

Description Usage Arguments Value Examples

View source: R/formatrs.R

Description

This function cleans a p-value by rounding to a certain digit and changing any values less than a certain amount to, e.g., "<.001".

Usage

1
2
3
clean_pval(x, less_than = 0.001, digits = 3, add_stars = FALSE,
  stars = list(pval = c(0.1, 0.05, 0.01, 0.001), symbol = c(".", "*",
  "**", "***")))

Arguments

x

a vector of p-values

less_than

the lower bound for printing complete numbers

digits

the number of digits to round to

add_stars

logical. Add stars to the p-value?

stars

a list of p-values cut-offs and matching symbols

Value

a character vector

Examples

1
clean_pval(1e-10)

malcolmbarrett/mbmisc documentation built on May 17, 2019, 8:16 a.m.