generate characters
Usage
gen_char(
from = NULL,
to = NULL,
n = NULL,
random = FALSE,
allow_dup = TRUE,
add = NULL,
seed = NULL
)
Arguments
- from
left bound, lower case letter
- to
right bound, lower case letter
- n
number of characters to generate
- random
random generation
- allow_dup
allow duplication when random generation
- add
add extra characters other than
base::letters
- seed
random seed
Examples
gen_char(from = "g", n = 5)
#> [1] "g" "h" "i" "j" "k"
gen_char(to = "g", n = 5)
#> [1] "c" "d" "e" "f" "g"
gen_char(from = "g", to = "j")
#> [1] "g" "h" "i" "j"
gen_char(from = "t", n = 5, random = TRUE)
#> [1] "y" "w" "t" "y" "z"
gen_char(
from = "x", n = 5, random = TRUE,
allow_dup = FALSE, add = c("+", "-")
)
#> [1] "y" "-" "z" "+" "x"