stochastic round

roundr(x)

Arguments

x

real number to be rounded up or down

Value

integer

Examples

replicate(1000,roundr(1.8)) %>% table()
#> .
#>   1   2 
#> 225 775