Learn R Programming

Hmisc (version 5.1-0)

makeNstr: creates a string that is a repeat of a substring

Description

Takes a character and creates a string that is the character repeated len times.

Usage

makeNstr(char, len)

Value

A string that is char repeated len times.

Arguments

char

character to be repeated

len

number of times to repeat char.

Author

Charles Dupont

See Also

Examples

Run this code
makeNstr(" ", 5)

# \dontshow{
if(makeNstr(" ", 5) != "     ") stop("makeNstr failed test")
# }

Run the code above in your browser using DataLab