A helper function that always prints a specified number of decimals

give_n_digits(x, n = 2)

Arguments

x

a numeric vector

n

the number of decimal places to print

Examples

give_n_digits(0.0293526, n = 2)
#> [1] "0.03"