Learn R Programming

Hmisc (version 5.3-0)

nstr: Creates a string of arbitry length

Description

Creates a vector of strings which consists of the string segment given in each element of the string vector repeated times.

Usage

nstr(string, times)

Arguments

Value

returns a character vector the same length as the longest of the two arguments.

See Also

Examples

Run this code
nstr(c("a"), c(0,3,4))

nstr(c("a", "b", "c"), c(1,2,3))

nstr(c("a", "b", "c"), 4)

Run the code above in your browser using DataLab