title: R: determining difference between max and min for certain subgroups within groups
body: <p>Example data field below</p>
  
  <pre><code>Event        Ethnicity        Score
  50 yd dash    Asian             7
  50 yd dash    Afr. Am           8
  50 yd dash    White             5
  Hurdle        Asian             6
  Hurdle        Afr. Am           8
  Hurdle        White             9
  </code></pre>
  
  <p>I am trying to determine the difference between certain ethnicities within each event, hopefully using dplyr or something in tidyverse but will take any answer/help. For example, the difference between the Asian group and the White group in each event, </p>
  
  <p>e.g., Asian (7) - White (5) = Difference (2), </p>
  
  <p>resulting in output similar to below:</p>
  
  <pre><code>Event          Difference
  50 yd dash         2
  Hurdle            -3
  </code></pre>