`summarise()` has grouped output by 'state'. You can override using the
`.groups` argument.
# A tibble: 32 × 4
# Groups: state [16]
state gender count proportion
<chr> <chr> <int> <dbl>
1 Johor Female 2096 0.442
2 Johor Male 2644 0.558
3 Kedah Female 1280 0.464
4 Kedah Male 1476 0.536
5 Kelantan Female 707 0.495
6 Kelantan Male 721 0.505
7 Melaka Female 529 0.436
8 Melaka Male 684 0.564
9 Negeri Sembilan Female 675 0.437
10 Negeri Sembilan Male 871 0.563
# ℹ 22 more rows
Task 3: Determine the total number of deaths by month and year.
Steps:
Convert the date column to Date type if it’s not already.
Use mutate to create new columns year and month using the year and month functions from the lubridate package.