prob_label: Format numeric probabilities as text labels

View source: R/main.R

prob_labelR Documentation

Format numeric probabilities as text labels

Description

Format numeric probabilities as text labels

Usage

prob_label(
  p,
  accuracy = 0.01,
  digits = NULL,
  max_digits = NULL,
  remove_leading_zero = TRUE,
  round_zero_one = TRUE
)

Arguments

p

numeric vector of probabilities

accuracy

accuracy of rounding

digits

Optional. Number of digits to round. Overrides accuracy parameter

max_digits

Optional. Maximum zeros or nines before rounding to 0 or 1

remove_leading_zero

Removes leading zero from probability

round_zero_one

Apply rounding to 0 and 1

Value

character vector

Examples

prob_label(seq(0,1, 0.1))

wjschne/WJSmisc documentation built on June 29, 2023, 8:04 a.m.