cbind a long list in R using list

Viewed 43

i have a huge number of vectors in R, all with the same length, say: x1,x2,...,x1000000 and i want to cbind some of into one single dataframe. I have the list of the names of vectors that i want to combine, say name_list <- c("x3","x47847","x930233") of vectors x3,x47847,x930233 So normally we would just use cbind(x3,x47847,x930233). But since the number of vectors is huge, and all i have is the name list, is there any way i can just do the cbind with name_list?

Thank you so much for your help in advance.

0 Answers
Related