uniqueness_max_size {keyToEnglish} | R Documentation |
Uniqueness Max Size
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
uniqueness_max_size(N, p)
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
# 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
[Package keyToEnglish version 0.2.1 Index]