I'm new to R and I would like to know how to apply a calculation on a R table named "table" with two columns "number" & "ageRange". In this table I numbers (in the "number" column) which are associated with an age range ("ageRange") [0,9,19,29,39,49,59,69,79,89,90].
But there is multiple numbers for each age range, ex :
[number, ageRange ;
255, 0 ;
351, 0 ;
145, 9 ;
...]
What I wanted to do is to additionate every number with a same "ageRange". So I would like to know if there is a way in R to apply this comparative function on the entire table ?
Thanks for your help ^^.