title: Writing multiple data frames into .csv files using R
body: <p>I have used lapply to apply a function to a number of data frames:</p>
  
  <pre><code>data.cleaned &lt;- lapply(data.list, shooter_cleaning)
  </code></pre>
  
  <p>And then labeled each of the resulting data frames in the list according to their subject number (e.g., 100):</p>
  
  <pre><code>names(data.cleaned) &lt;- subject.names
  </code></pre>
  
  <p>What I want to do is to save each new data frame as an individual .csv file based on its subject number. For example, for subject 100 I'd like the .csv file to be labeled as "100.csv" Normally to do this (for a single data frame) I would just write (where x is the data frame):</p>
  
  <pre><code>write.csv(x, "100.csv", row.names = F)
  </code></pre>
  
  <p>But, obviously using lapply to do this for my list of data frames will just produce many copies of "100.csv" when instead I would like the files to be unique, based on their subject number. How can I (use apply to?) save each of these data frames to their own unique .csv file?  </p>