Skip to contents

Repeated Substring

Usage

repeated(x, n)

Arguments

x

substring to be repeated and pasted together to a new string

n

number of times to repeat the substring

Value

vector of character of length one

Examples

repeated("no ", 2)
#> [1] "no no "
repeated("yes ", 3)
#> [1] "yes yes yes "
repeated("yes no ", 3)
#> [1] "yes no yes no yes no "