uniqueness_max_size: Uniqueness Max Size

Description Usage Arguments Value Examples

View source: R/keyToEnglish.R

Description

Returns approximate number of elements that you can select out of a set of size 'N' if the probability of there being any duplicates is less than or equal to 'p'

Usage

1

Arguments

N

'numeric' size of set elements are selected from, or a 'list' of 'list's of 'character' vectors (e.g., 'wml_animals')

p

'numeric' probability that there are any duplicate elements

Value

'numeric' value indicating size. Value will most likely be non-integer

Examples

1
2
3
4
5
# how many values from 1-1,000 can I randomly select before
# I have a 10% chance of having at least one duplicate?

uniqueness_max_size(1000,0.1)
# 14.51

keyToEnglish documentation built on Feb. 14, 2021, 1:05 a.m.