p_to_asterisk: Add asterisks to p values

View source: R/modeling.R

p_to_asteriskR Documentation

Add asterisks to p values

Description

Add asterisks to p values

Usage

p_to_asterisk(
  x,
  asterisks = c(0.01, 0.005, 0.001),
  digits = max(count_decimals(asterisks)),
  asterisks_only = F
)

Arguments

x

p values vector

asterisks

Thresholds

digits

Number of digits

asterisks_only

Only print asterisks

Value

character vctor

Examples

c(.123, .009, .004, .0009, .0001) %>% p_to_asterisk()
c(.123, .009, .004, .0009, .0001) %>% p_to_asterisk(asterisks = c(.05, .01))
c(.123, .009, .004, .0009, .0001) %>% p_to_asterisk(asterisks = c(.05))
c(.123, .009, .004, .0009, .0001) %>% p_to_asterisk(asterisks = c())
c(.123, .009, .004, .0009, .0001) %>% p_to_asterisk(asterisks = NULL)
c(.123, .009, .004, .0009, .0001) %>% p_to_asterisk(asterisks_only = T)
p_to_asterisk(NA)

Deleetdk/kirkegaard documentation built on May 2, 2024, 7:12 p.m.