Round using conventional rounding, where .5 always gets rounded up.

round2(x, n)

Arguments

x

vector

n

digits to round to

Value

Examples

round2(0.05, 1)
#> [1] 0.1