Learn R Programming

bsTools (version 1.0.2)

sampleStr: Generates (pseudo)random strings of the specified char length

Description

Generates (pseudo)random strings of the specified char length

Usage

sampleStr(n_char, sample_chars = c(letters, LETTERS, 0:9))

Value

A string.

Arguments

n_char

A integer, the number of chars to include in the output string.

sample_chars

A vector of characters to sample from. Includes the lowercase and uppercase English alphabet and 0-9 by default.

Examples

Run this code
sampleStr(10)

Run the code above in your browser using DataLab