title: If/Then statement in R based on duplicate values
body: <p>I am looking to return a value in a new column based on what I have below.  I am looking to say &quot;if ANY value repeats 5 times in columns 2-9, then return that specific value in a new column 10.&quot;  If no value repeats 5 times, then return NA.  Data example is below.</p>
  <pre><code>              EntryName Team1 Team2 Team3 Team4 Team5 Team6 Team7 Team8
  1                a   MIN    SF    SF    SF   ATL   TOR    SF    SF
  2                b   MIN    SF    SF    SF    SF    SF   DET   MIA
  3                c   MIN   CWS    SF   MIA   ATL   MIA   TOR    SF
  4                d    SF    SF    SF    SF   TOR   TOR    SF   MIN
  5                e   MIN   TOR   ATL   ATL    SF   CIN   DET    TB
  
  </code></pre>