nflverse / nflseedR

Functions to Efficiently Simulate and Evaluate NFL Seasons
https://nflseedr.com
Other
21 stars 3 forks source link

feature req: fmt_pct_special should accept a precision arg to round all the way to 0/100 #42

Open tanho63 opened 1 year ago

tanho63 commented 1 year ago

Given:

x <- c(0, 0.00000001, 0.00001, 0.004, 0.009, 0.011, 0.9, 0.98, 0.994, .995, .9989, .999, .9991, .99999999)
nflseedR::fmt_pct_special(x)

I think it would be useful to be able to specify whether the second and third cases are rounded all the way to 0 or to <1%

e.g. nflseedR::fmt_pct_special(x, precision = 3) might return 0%, 0%, <1%