round_preserve_sum: Round values preserving total sums

View source: R/waffle_charts.R

round_preserve_sumR Documentation

Round values preserving total sums

Description

The function rounds values preserving total sums

Usage

round_preserve_sum(x, digits = 0)

Arguments

x

numeric vector of values to be rounded

digits

integer indicating the number of decimal places. See round.

Value

Returns a numeric vector.

Author(s)

The function is written as a communal effort. Main authors are josliber and BioStatMatt.

See Also

Other waffle: waffle_chart(), waffleize()


MikkoVihtakari/PlotSvalbard documentation built on May 20, 2024, 5:18 p.m.