Finding the 2nd Max value in R data table
<p>I have a data table that has a int column that is counting the iteration of a test that I've preformed. So the first time I preformed the test, <code>Table$Column == 1</code> and the second time <code>Table$Column == 2</code> and so on and so forth.</p>

<p>However, there are times when a test breaks or I don't want to use the results from a particular test run. I have code that compares the current run vs. the previous run that looks like this.</p>

<pre><code>vLatest&lt;-max(Table$Column)
vPrevious&lt;-max(Table$Column)-1
</code></pre>

<p>But since I sometimes omit results, it breaks vPrevious. How could I replace the "-1" with a function that finds the "2nd" max value?</p>