round_100: Round with a sum 100 (avoid round errors)

Description Usage Arguments Value Examples

View source: R/helpers.R

Description

Round with a sum 100 (avoid round errors)

Usage

1

Arguments

x

A numeric vector

Value

A round numeric vector

Examples

1
2
3
4
5
6
7
x <- c(81.808219, 6.575342, 11.616438)

sum(x)
sum(round(x))

graphr::round_100(x)
sum(graphr::round_100(x))

stephLH/graphr documentation built on May 18, 2020, 2:11 p.m.