random_percents: Return a vector of random proportions/percents that sum to...

Description Usage Arguments Examples

View source: R/random_percents.R

Description

Useful to split a data value into random parts that will sum back to the total.

Usage

1

Arguments

b

numeric; the number of bins to generate.

s

numeric; the seed for randomly generating numbers.

Examples

1
2
3
4
5
6
7
8
# With default seed value (1)
random_percents(b = 2)

# With specific seed value (45)
random_percents(b = 2, s = 45)

# With specific seed value (45) and more bins (9)
random_percents(b = 9, s = 45)

mike-decarlo/caser documentation built on Sept. 23, 2019, 7:15 a.m.