Skip to content
Prev 163657 / 398503 Next

alternative way to replicate()

have a look at ?paste(), e.g.,

paste(rep(2, 3), collapse = ",")

and if you need a comma at the end, then you can again use paste(),

paste(paste(rep(2, 3), collapse = ","), ",", sep = "")


I hope it helps.

Best,
Dimitris
Liviu Andronic wrote: