str_dup

0th

Percentile

Duplicate and concatenate strings within a character vector.

Vectorised over string and times.

Usage
str_dup(string, times)
Arguments
string

Input character vector.

times

Number of times to duplicate each string.

Value

A character vector.

Aliases
  • str_dup
Examples
# NOT RUN {
fruit <- c("apple", "pear", "banana")
str_dup(fruit, 2)
str_dup(fruit, 1:3)
str_c("ba", str_dup("na", 0:5))
# }
Documentation reproduced from package stringr, version 1.4.0, License: GPL-2 | file LICENSE

Community examples

Looks like there are no examples yet.