I have 13 dataframes in my list. Each dataframe shares the same columns as others do. I would to create a new column called b which will contain all the columns called x from my 13 dataframes.Each dataframe has a column called x.
Asked
Active
Viewed 27 times
-3
-
1Please read the info about [how to ask a good question](http://stackoverflow.com/help/how-to-ask) and how to give a [reproducible example](http://stackoverflow.com/questions/5963269/how-to-make-a-great-r-reproducible-example/5963610). This will make it much easier for others to help you. – Jaap Sep 27 '16 at 12:39
-
Some questions are straightforward enough not to need that. – ddunn801 Sep 27 '16 at 15:03
1 Answers
0
Here you go:
dflist <- list(iris, iris, iris)
b <- vector()
for(i in length(dflist)) b <- c(b,dflist[[i]]$Species)

ddunn801
- 1,900
- 1
- 15
- 20