Consider the following data:
df <- data.frame(sex = c("MALE","FEMALE","MALE","FEMALE"),
time = c("2018","2018","2019","2019"),
country = c("USA","USA","USA","USA"),
value = c(10,10,10,10))
How do I aggregate the "sex" axis, so I get the following data:
TIME Country Value
1 2018 USA 20
2 2019 USA 20
How do I do that in R (I know that it is probably a simple question)?