sample_strings: Sample a set of strings, each string of a given length

View source: R/base.R

sample_stringsR Documentation

Sample a set of strings, each string of a given length

Description

Sample a set of strings, each string of a given length

Usage

sample_strings(nchar = 3, size = 1, upper = FALSE)

Arguments

nchar

The length of each string.

size

The number of strings.

upper

Should the strings be upper case?

Value

A random vector of size strings of length nchar.

Examples

set.seed(42)
sample_strings()
d <- data.frame(key = sample_strings(7,9), value=1:9)
d[order(d$key),]


torfason/zulutils documentation built on Aug. 21, 2023, 5:46 p.m.