So I have a folder of excel files all identical in format. Here's a simplified version of what I'm working with:
country count year
USA 23232 2019
USA 3993 2019
RUSSIA 67574 2019
JAPAN 31 2019
JAPAN 535 2019
So I would like to do the following to every file in my folder
df %>%
group_by(country, year) %>%
summarize(count = sum(count))
In one file this will look like:
country year count
1 JAPAN 2019 566
2 RUSSIA 2019 67574
3 USA 2019 27225
So how can I do this for every file in my folder, again they are identical. The end goal would be one dataframe with all the file's count data in it. Tidyverse preferred