title: How to combine a lot of csv files horizontally (not stack data by column) in r
body: <p>I have a lot of csv files with same rownames and colnames, I want combine them by row names, however, all of the examples I found just did it like stacking the data vertically. </p>
  
  <p>for example what I can do now:</p>
  
  <pre><code>filenames &lt;- list.files("C:/Users/Desktop/GCMS_experiment/Raw TIC_GCMS_experi", pattern=".csv", full.names=TRUE)
  data &lt;- rbindlist(lapply(filenames,fread))
  </code></pre>
  
  <p>then output this "Read 93.0% of 4323116 rows
  Read 4323116 rows and 5 (of 5) columns",  this stacking my data, because for one csv file, I have 5 columns and 20684 rows (209 csv files in total).</p>
  
  <p>what I want is combine them by rows,i.e gave me a final csv file containing 20684 rows, 209*5 columns. i.e combine data horizontally not stacking data vertically. </p>
  
  <p>what should I do for the code? thank you </p>