How to convert data.frame to a list of polygon? : <p>I have a data frame like following:</p>

<pre><code>long   lat   group  
1.0    1.0   1  
1.0    2.0   1  
2.0    2.0   1  
5.0    5.0   2  
5.0    6.0   2
6.0    6.0   2
</code></pre>

<p>How can I convert it into a list of polygon objs?</p>

<p>Thanks!</p>
