title: reading multiple csv files in s3 and combined them as a single file when the name of files are different using R
body: <p>In each day I have multiple csv files with different names and I want to combine all CSVs in each day asa single file and put it in a loop for the other days as well. </p>
  
  <pre><code>   path= 's3://data/ y= 2017 /m= 05'
  </code></pre>
  
  <p>In m=05 I have multiple csv files (around 200) with different names and also in other days such as m=06 I have 120 csv files . </p>
  
  <pre><code>dates&lt;- seq(as.Date('2017-05-05'), as.Date('2017-06-10'), "days")
  for (i in 1:length(dates)){
  dateofgen&lt;-dates
  filepath &lt;- paste(path, "y=", format(as.Date(dateofgen), '%Y'), "/m=", format(as.Date(dateofgen), '%m'),"/d=",format(as.Date(dateofgen),'%d'), "/part-00012-e731138c-232c-48b0-958f-55f2c72f3327-c000.csv", sep='')
  data &lt;- s3read_using(read.csv, object=filepath, stringsAsFactors = F, bucket=gsub("/.*", '', gsub("s3://", '', filepath)))
  }
  </code></pre>
  
  <p>How can I read and combine all files of a day into a single file using rbind or any merge function.</p>