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.