Skip to contents

Rounds value and formats it to retain number of decimals in 2nd argument

Usage

round_f(x, digits = 2)

Arguments

x

Numeric value to be rounded

digits

Number of decimal places

Value

Rounded and formatted character value

Examples

round_f(12.31, 3)
#> [1] "12.310"