How to find the first and last occurrence in a panel data set in R
<p>I have a table:</p>

<pre><code>id  time
1   1
1   2
1   5
2   3
2   2
2   7
3   8
3   3
3   14
</code></pre>

<p>And I want to convert it to:</p>

<pre><code>id  first last
1      1     5
2      3     7
3      8    14
</code></pre>

<p>Please help!</p>