title: Using array in R for reading data with read.csv from multiple sources
body: <p>So I am trying to load multiple csv files into a project and figured I could use one array, say data_in, for all my csv files so I can reference them with say </p>
  
  <pre><code>data_in[,,1] ##first csv file
  data_in[1,,2] ## first row of second csv file
  </code></pre>
  
  <p>And so on. To read the files I have this loop. </p>
  
  <pre><code>for (i in seq_along(names)) {
      file_name &lt;- paste(names[i],".csv", sep = "")
      data_in[,,i] &lt;- read.csv(file_name, header=T, sep= ",")
      }
  </code></pre>
  
  <p>But obviously I wouldn't be here if it worked. I'm not used to R so do I need to declare the dimensions of data_in before I load in data? Is there a way to read the data in by only using index for the csv file or do I have to use a 3D array? Sorry if this is sort of basic. </p>
  
  <p>Any help is much appreciated. Have a nice day. </p>