I have two character objects of different length:
a <- "A"
bc <- c("B","C")
Now I would like to concatenate these in such a manner that I get "ABC"
, but paste()
repeats a
as many times as length(bc)
:
paste("a",c("b","c"),collapse="", sep="")
> "ABAC"
Anyone an idea on how to get "ABC"
instead of "ABAC"
?
Many thanks!