stri_dup {stringi} | R Documentation |
Duplicates each string times
times
and concatenates the results.
stri_dup(str, times)
str |
a character vector of strings to be duplicated |
times |
an integer vector with the numbers of times to duplicate each string |
Vectorized over str
and times
.
Returns a character vector of the same length as str
.
Other join:
%s+%()
,
stri_flatten()
,
stri_join_list()
,
stri_join()
stri_dup("a", 1:5) stri_dup(c("a", NA, "ba"), 4) stri_dup(c("abc", "pqrst"), c(4, 2))