I have data table like this
year value
2010 25
2011 168
2012 48
2010 189
2011 192
2012 38
2010 175
2011 55
2012 48
I want to distinguish my data to be like this
year value
2010 3 (25 189 175: = 33.33% )
2011 3 (168 192 55 : = 33.33%)
2012 3 (48 38 48: = 33.33%)
for further plotting bar graph which have 3 main groups (2010 2011 2012) in X-axis and % of members in each year in Y-axis
What should I do? I'm a beginner in R program. Thank you in advanced :D