Cristian Montes wrote:
> Ok, sorry, I misinterpreted the question! Here is the right solution
>
> x <- c("a", "b", "c", "d", "e")
> z <- x[1]
>
> for (i in 2:length(x))
> {
> z<- paste(z, x[i], sep = "+")
> }
>
> print(z)
>
> [1] "a+b+c+d+e"
>
Or
paste(x, collapse = '+')
which was the solution that was in the message you originally replied to.