find first and last value within a sequence in r : <p>I have a sequence and then times that are recorded within each sequence. I am trying to find the max value of time that is recorded with its corresponding sequence. Example below:</p>

<pre><code>    Seq    seconds
1    1       1
2    1       2
3    1       3
4    1       4
5    2       1
6    2       2 
7    3       1
8    3       2
9    3       3
10   3       4
11   3       5
</code></pre>

<p>I would like a result that tells me the max time that was recorded in each sequence. </p>

<pre><code>Seq   Time
 1     4
 2     2
 3     5
</code></pre>
