So I have a data with dates and hospital admissions. data is for everyday for two years. Data looks somewhat like this: 

```
Date        cardioadmission   respiratoryadmission
2001-01-01        12                   06
2001-01-02        10                   5
2001-01-03        08                   4
2001-01-04        04                   6

```

I want to make a table of results like this 

```
year    cvdadmissions   respiratoryadmissions

```

So i want to aggregate dates yearwise and then divide year by summer and winter. Let's say i want to see the results look like this: 

```
year         cvdadmissions   respiratoryadmissions
2001            21                 22

```

so i want to report the admissions by months, not by each day. some sort of aggregate thing. Can someone please guide me about this

update: 

```
summary <- data %>%
mutate(month = month(Date),  # what should i write in month and also in 
date
year = year(Date)) %>%  #same here what should i write in year and 
year(date)
group_by(month, year) %>%   # which month and by year which year. 
summarise(cvdadmission = sum(cvdadmission),
respiratoryadmission = sum(respiratoryadmission) # i have understood this part. 

```

Can you please explain the logic behind these in a little more detail. 

Thanks