title: Loop over subsets
body: <p>I am very new to R ,
  I have a DataFrame with :</p>
  <pre><code>df &lt;- data.frame (id  = c(&quot;1&quot;, &quot;1&quot;, &quot;2&quot; ,&quot;2&quot; , &quot;3&quot; , &quot;3&quot; ),
                    second_column = c(&quot;1.2&quot;, &quot;1.5&quot;, &quot;2.1&quot; ,&quot;2.2&quot; , &quot;3.3&quot; , &quot;3.4&quot;)
                    )
  </code></pre>
  <p>I would like to loop over the subsets of df</p>
  <p>like this :</p>
  <pre><code>df_sub &lt;- split(df, df$id)
  
  </code></pre>
  <p>How do I run one similar code to the lists that I find?</p>
  <p>Thank you for your help!</p>