Screenshot: raw data-frame organization of COVID-Cases in Germany
I downloaded the notified COVID-Cases in Germany from an official website. This raw data-frame is organized by the following columns (see also screenshot): "IdCounty", "NameCounty", "DateNotification", "AgeGroup", "Gender", "FreqCases".
What is a clever way in R to collapse/re-arrange/sum-up this raw data-frame by all categories in "AgeGroup" and "Gender", i.e. so this two subpopulation-breakdown variables will disappear, i.e. are collapsed ? Reason: I want to do analyses of the COVID-Cases by counties and time-points, but I don't want to differentiate further by age nor gender, i.e. just take all ages and all genders as sums together.
I struggled with various functions to achieve this, but I am pretty sure there is a smart & clever way to do this quite easily.