Specify a decimal

specify_decimal(x, k)

Arguments

x

a number to be rounded

k

round to which position after the comma

Examples

## specify 2 decimals of a number specify_decimal(1.0434, 2)
#> [1] "1.04"