My approach towards this problem is fairly simple. Against our dataset merge the sequence of dates (1st day of the month) by year & month as full join, so that will get the missing month with 1st day of the month. Once done that next step is fairly simple, just use if-else approach to choose the between the column. Detail code is given below.
To generate the test data I wrote the below code;
library(data.table)
a <- c('2016','2017','2018')
b <- c('1','2','4','5','6','7','10','11')
c <- c(seq(1,4),seq(14,17),seq(22,25))
d <- sample(100:300, 6, replace = FALSE)
d <- expand.grid(a,b,c,d)
e <- sample(nrow(d), size = 15, replace = FALSE)
f <- d[e,]
setDT(f)
f[ ,Var1 := as.character(Var1)]
f[ ,Var2 := as.character(Var2)]
f[ ,date := paste0(Var1, "-",
ifelse(nchar(Var2)<2,paste0("0",Var2),Var2), "-",
ifelse(as.numeric(Var3)<10,paste0("0",Var3),Var3))]
f[ ,date := as.Date(date)]
colnames(f)[match("Var4",colnames(f))] <- "frequencies"
my_data <- f[,.(date,frequencies)]
my_data[, year_month := substr(my_data$date,1,7)]
head(my_data)
Finally we come up with 15 random dates between year 2016 to 2018, with frequency between 100 to 300 taken at random.

Next create the sequence of starting day (1st day) of the month between the dates needed.
date_df <- as.data.table(seq(as.Date("2016-01-01"), as.Date("2018-12-01"), by =
"months"))
colnames(date_df) <- "date"
date_df[, year_month := substr(date_df$date,1,7)]
head(date_df)
This will generate the sequence between all the 1st days of the months falling between the date range

Next merge the two data frames as a full join by using year & month only. Then choose between the two date columns & finally keep only required column of date & frequency.
my_data2 <- merge(my_data, date_df, by = "year_month", all = TRUE)
my_data2[is.na(date.x), date := date.y]
my_data2[!is.na(date.x), date := date.x]
final_my_data <- my_data2[,.(date,frequencies)]
By choosing the date where it's missing (as NA) for original column of date.x & replacing it with date from new column date.y coming from our sequence will give us result needed.

Like & up vote if the solution is use full. Enjoy coding !