I have been trying to use the date_breaks function in Rstudio but I have run into some problems. I have tried library(scales). I have also tried the waiver argument but I am getting the error "unused arguments"
coord_x_date(xlim = c("2020-07-02", "2020-07-09"), ylim = c(5,30)) +
scale_x_datetime(breaks = date_breaks("1 day"), minor_breaks = date_breaks("2 hour"))
Error in date_breaks("1 day") : could not find function "date_breaks"