
strrep(x, times)
as.character
.x
.x
and times
will be recycled as
necessary (if one has no elements, and empty character vector is
returned). Missing elements in x
or times
result in
missing elements of the return value.
strrep("ABC", 2)
strrep(c("A", "B", "C"), 1 : 3)
## Create vectors with the given numbers of spaces:
strrep(" ", 1 : 5)
Run the code above in your browser using DataLab