Say I have two character vectors:
a <- c("a", "b", "c") b <- c("1", "2", "3")
How to combine them to get:
ab <- c("a1", "b2", "c3")
You can use paste or paste0 :
paste
paste0
> a <- c("a", "b", "c") > b <- c("1", "2", "3") > paste0(a, b) [1] "a1" "b2" "c3" >