title: Return highest values in a vector with multiple conditionals
body: <p>I have these example data</p>
  
  <pre><code>Data &lt;- structure(list(IndID = structure(c(1L, 1L, 2L, 2L, 3L, 3L, 4L, 
  4L, 5L, 5L, 6L, 6L, 7L, 7L, 8L, 8L, 9L, 9L, 10L, 10L), .Label = c("1", 
  "2", "3", "4", "5", "56", "58", "59", "60", "63"), class = "factor"), 
      Species = structure(c(1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 1L, 
      1L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L, 2L), .Label = c("BHS", 
      "MTG"), class = "factor"), Season = structure(c(1L, 2L, 1L, 
      2L, 2L, 1L, 1L, 2L, 2L, 1L, 2L, 1L, 1L, 2L, 1L, 2L, 1L, 2L, 
      1L, 2L), .Label = c("Summer", "Winter"), class = "factor"), 
      Percent = c(0.992, 0.992, 0.996, 0.976, 0.995, 0.871, 0.996, 
      0.996, 0.916, 0.875, 0.652, 0.802, 0.964, 0.673, 0.956, 0.879, 
      0.972, 0.782, 0.968, 0.832)), .Names = c("IndID", "Species", 
  "Season", "Percent"), row.names = c(NA, -20L), class = "data.frame")
  </code></pre>
  
  <p>Which look like this</p>
  
  <pre><code>&gt; head(Data)
    IndID Species Season Percent
  1     1     BHS Summer   0.992
  2     1     BHS Winter   0.992
  3     2     BHS Summer   0.996
  4     2     BHS Winter   0.976
  5     3     BHS Winter   0.995
  6     3     BHS Summer   0.871
  </code></pre>
  
  <p>There are 10 unique individuals that belong to one of two species (BHS  or  MTG).  For each individual (IndID), there is a Percent value for each Season (Winter and Summer).</p>
  
  <p>For each Species, I want to select the two individuals that have the highest average Percent value.  </p>
  
  <p><strong>EDIT</strong> Also see my note below.  I did not post a specific outcome because there are multiple that would work for my needs. Because I need a measure Percent for each Season, I thought taking the average of the Percent would be the best approach to select the top individuals.  Percent was measured for each season, but I want to select the highest rank IndID.  I could also rank IndID by the sum of Percent (rather than average).  </p>
  
  <p>In addition to the 2nd chunk of code posted by @akrun, a vector of 4 IndIDs (the two top ranked for each species) would also have been a fine output. </p>
  
  <p>Thanks in advance for your help.</p>