I need to assign populations (denominators) to a data frame in R. For each age group and each year, the populations are different. My data frame is
Year agegroup count
2000 0-4 24
2000 5-9 36
....
2021 0-4 42
2021 95+ 132
How can I assign each year and age group (row) a different population?
I don't know how to do it, can someone help me? Thanks
Thank you, I have this data frame:
And I want to put in the populations column the data that I have in another dataframe, so that the result is this: