## rep2 is the same like rep:
rep(x = "ha", 3)
#> "ha" "ha" "ha"
rep2(x = "ha", 3)
#> "ha" "ha" "ha"
## ... but you can also use the arguments from `paste`:
rep2(x = "ha", n = 3, collapse = "")
#> "hahaha"
Run the code above in your browser using DataLab