I have founf several close but not quite answers to this problem that I know is probably very simple.
I want to take a list of equal length vectors (could be numeric or character) and paste them together using "." as the separator. the number of columns being passed is unknown.
Here are my attempts:
Thank you in advance!
I want to take a list of equal length vectors (could be numeric or character) and paste them together using "." as the separator. the number of columns being passed is unknown.
Here are my attempts:
Code:
x <- CO2[, 1:3]
y <- CO2[, 1:4]
paste(x, sep=".")
paste(y, sep=".")
paste2 <- function(x) paste(x, sep=".") #attempt with do.call
do.call("paste2", y)