https://stackoverflow.com/questions/30255833/convert-four-digit-year-values-to-a-date-type https://stackoverflow.com/questions/49268302/extend-x-axis-with-dates
range = c(as.Date("1998-02-02"), as.Date("2020-01-01"))
class(tab$Year)
tab$Year =as.Date(paste(tab$Year, 1, 1, sep = "-")) # beginning of year
ggplot(tab, aes(x=Year,y= Rate)) +
geom_bar(stat = "identity") +
labs(x = "Year",y = "Rate per 100,000 population", col = "Region") +
scale_x_date(limits = range)
scale_y_continuous(limits = c(0,ymax), expand = c(0,0))+
theme(axis.text.x = element_text(angle = 45, hjust = 1, vjust = 1, size = 11))