round_trailing_zeros: Round a value and indicate how precise zeros are

Description Usage Arguments Value Examples

Description

This function will take a value and round it. If the rounded value becomes zero, trailing zeros are added to indicate how precise the 0 value is.

Usage

1
round_trailing_zeros(x, digits = 2)

Arguments

x

Numeric values to be rounded.

Value

Returns a character vector of rounded values including accurate zero values. Note that this rounds .5 to 1 (janitor::round_half_up) unlike base::round()

Examples

1
# round_trailing_zeros(0.005, digits = 2)

Sorenson-Impact/sorensonimpact documentation built on Nov. 6, 2021, 4:25 a.m.