I have data with month and year column, how can I subset this to be per year along, here is sample dataset

```
# Libraries
library(ggplot2)
library(reshape2)

# Data
df <- data.frame("Hospital" = c("Buge Hospital", "Buge Hospital", "Greta Hospital", "Greta Hospital",
                                "Makor Hospital", "Makor Hospital"),
                 "Period" = c("Jul-18","Aug-18", "Jul-19","Aug-19", "Jul-20","Aug-20"),
                 "Medical admissions" = c(12,56,0,40,5,56),
                 "Surgical admissions" = c(10,2,0,50,20,56),
                 "Inpatient admissions" = c(9,5,6,0,60,96))

```

I have tried this but I get empty dataset

```
data_18 <- subset(df, format(as.Date(df$Period, format="%b/%Y"),"%Y")== 2018)

```

I want to pull out monthly data for each year so that so that I can observe data trends for that monthly period
Expected result is to subset and get only data for each year individually example is like pull out monthly data for 2018.