title: r list top values based on average of another column
body: <p>I have data loaded from a csv file (mydata.csv). </p>
  
  <pre><code>mydata = read.csv('somefile')
  </code></pre>
  
  <p>The two columns i want to work with(mydata['name'] and mydata['score']) have data like so</p>
  
  <pre><code>name     score
  sally     5
  peter     10
  sally     50
  peter     25
  mandy     100
  mandy     0
  </code></pre>
  
  <p>The data set has more than 3 names but for example purposes i only gave three names. What i want to do is get the top 10 names with the highest average score and store that information. </p>
  
  <p>Also what data type is best to store the results in (array, list, etc) if i want to graph these points(names, score) in a ggplot using x for name and y for score.</p>