I have 10 Vectors in my R environment. I want to paste this vectors for create a data frame. I used the rbind
function, but i think that is very inefficient, because i have to type all variables in the function. The question is, can i use the paste0
or paste
function or other function like that, for paste this vectors?, thank you.
#Por ejemplo
x1 <- c(1, 2)
x2 <- c(3, 4)
x3 <- c(5, 6)
x4 <- c(7, 8)
x5 <- c(9, 10)
x6 <- c(11, 12)
x7 <- c(13, 14)
x8 <- c(15, 16)
x9 <- c(17, 18)
x10 <- c(19, 30)
rbind(x1, x2, x3, x4, x5, x6, x7, x8, x9, x10)
I want to paste this vectors, without rbind
, with some function like paste0
or paste
.