R: How do I list a family of datasets and then rbind them?

徘徊边缘 提交于 2019-12-12 04:36:27

问题


I'm working on a new function for the OEC package (https://cran.r-project.org/web/packages/oec/index.html) so I can batch download data.

Here's my new function that I want to include in my package https://gist.github.com/pachamaltese/3b585dded0a80c031c65e98b268ebcc7

So, this is a MWE

#install.packages("devtools")
library(devtools)
install_github("pachamaltese/oec/cran")

library(oec)

getdata_interval("chl","chn",2010,2014,6,2)

Now I cannot find a general way to rbind the result of that function. If I have 3 years I can do rbind(year_2010, year_2012, year_2014 but as this is supposed to help people and not to annoy then with a long rbind I wonder is there's a way to put rbind("all the dataframes starting with year_") inside the function getdata_interval.

Is there a quite general approach to do that? thanks in advance.

来源:https://stackoverflow.com/questions/41862046/r-how-do-i-list-a-family-of-datasets-and-then-rbind-them

标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!