title: How do I rename a data-frame in a for-loop
body: <p>I am very new to programming with R, but I am trying to read in multiple files for a directory and give them each a unique name.  I am reading the files in using the Dendrochronology Program Library in R (package dpIR) and the <code>read.tucson</code> function.  Although I'm using a specific package, I think my question is fairly general:</p>
  
  <p>Within the loop, I want to create files by concatenating a <code>"t"</code> with each individual files name.  So, if I have a file named <code>"2503"</code> in my directory, I want to create a dataframe in R called <code>"t2503"</code>.  Next, I want to read the data in using the <code>r.tucson</code> function to each dataframe. Rather than assigning the read-in data to the dataframe, I'm just overwriting the concatenation with the data.  Can someone help me figure out what step I am missing?</p>
  
  <p>Here is the code I am trying to use:</p>
  
  <pre><code>#set to appropriate directory
  setwd("C:/work")
  
  #get a list of files in the directory
  files &lt;- list.files()
  numfiles &lt;- length(files)
  
  for (i in 1:numfiles)
  {
      name&lt;-paste("t",files[i],sep="")
      name&lt;-read.tucson(files[i],header=NULL)
  }
  </code></pre>