Here is my sample:
stringa = c("a","b","c")
stringb = c("high","low","average")
index = c(1,2,3)
data <- data.frame(stringa,stringb,index)
I would like to concatenate stringa and stringb, and attach the corresponding index in another column. For example, the first row of the result should be "a high" with index "1".
Now I have used this function to concatenate the two strings:
c(outer(a, b, paste))