element-wise concatenation of string vectors
r
Solution
You can use `paste` or `paste0`:
> a <- c("a", "b", "c")
> b <- c("1", "2", "3")
> paste0(a, b)
[1] "a1" "b2" "c3"
>
Problem
Say I have two character vectors: ``` a <- c("a", "b", "c") b <- c("1", "2", "3") ``` How do I merge them such that I get: ``` ab <- c("a1", "b2", "c3") ```