smart_round: Round a vector of numerics while preserving their sum

Description Usage Arguments Note

Description

Round a vector of numerics while preserving their sum

Usage

1
smart_round(x, digits = 0)

Arguments

x

a vector of numeric values

digits

the number of digits to round each value to

Note

This function comes from a post on Stack Overflow.


tiernanmartin/miscgis documentation built on May 31, 2019, 1:19 p.m.