title: Split many dataframes by a column, and save as different dataframes
body: <p>I have many dataframes. I would like to split them based on the values in a column (a factor). Then I would like to store the result of the split in separate data frame that have a specific name.</p>
  <p>For the sake of a mrp, consider some generated data,</p>
  <pre><code>for (i in 1:10) {
  assign(paste(&quot;df_&quot;,i,sep = &quot;&quot;), data.frame(x = rep(1,12), y  = c(rep(&quot;a&quot;,4),rep(&quot;b&quot;,4),rep(&quot;c&quot;,4))))
  }
  </code></pre>
  <p>here we have 10 dfs, df_1, df_2... to df_10. (real data is similar to generated data, but in real data column z is different for each df).</p>
  <p>Now, I want to split the dfs by 'y' (column 2).</p>
  <p>For 1 df, I can do the following;</p>
  <pre><code>splitdf &lt;- split(df_1,df_1$y)
  namessplit &lt;- c(&quot;a&quot;,&quot;b&quot;,&quot;c&quot;)
  for (i in 1:length(splitdf)) {
    assign(paste(&quot;df_1_&quot;,namessplit[[i]],sep = &quot;&quot;),splitdf[[i]])
  }
  </code></pre>
  <p><strong>While this works for 1 df, how can I do it for all the dfs?</strong></p>
  <p>Big thanks in advance!</p>