Is there an elegant/fastR way to combine all pairs of columns in a data.frame?
For example, using mapply() and paste() we can turn this data.fr
mapply()
paste()
I'm not sure this is the best approach. See if the below code gives any speed improvement
require(dplyr) transmute(mydf,x1=paste0( a.1,'.', a.2),x2=paste0( b.1,'.', b.2))
Answer updated based on comment :-)