randomLetter: Random Letter Generator

Description Usage Arguments Value Examples

View source: R/randomLetter.R

Description

Random Letter Generator

Usage

1
randomLetter(n, letter_probs = rep(1/26, 26), wreplacement = TRUE)

Arguments

n

number of desired random letters

letter_probs

a vector of probabilities for each of the 26 letters (optional)

wreplacement

if you want multiple letters, logical TRUE/FALSE for sampling with replacement

Value

a random letter based on probabilities

Examples

1
2
randomLetter(1) #selecct 1 random letter
randomLetter(2) #select 2 random letters

natehawk2/NateUtils documentation built on Jan. 1, 2021, 11:33 a.m.