roundprob: Rounds based on probability

Description Usage Arguments Examples

Description

This will round 'x' probabilistically. For example, 'roundprob(1.5)' will return '1' in roughly half of the cases and will return '2' in the other cases.

Usage

1

Arguments

x

a vector of numbers to be rounded

Examples

1
table(roundprob(rep(1.5,100000)))

remi-daigle/BESTMPA documentation built on May 27, 2019, 4:55 a.m.