0

I wish to combine multiple vectors into one vector; however, I do not wish to simply concatenate them together. I want them to merge for the same elements as such:

vector1 <- c(1, 2, 3)
vector2 <- c("a", "b", "c")

vector1 and vector2 combined would return:

vector3 <- c("1a", "2b", "2c")

And not:

vector3 <- c(1, 2, 3, "a", "b", "c")

This result is the only information I can find online, but is not what I want.

Michael
  • 85
  • 8

0 Answers0