I have data loaded from a csv file (mydata.csv).
mydata = read.csv('somefile')
The two columns i want to work with(mydata['name'] and mydata['score']) have data like so
name score
sally 5
peter 10
sally 50
peter 25
mandy 100
mandy 0
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.
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.