In the example below, can I change the line type after certain years, say, starting from year 2000? In other words, colors would remain the same; just line type would change from solid to dotted.
library(tidyverse)
library(gapminder)
gapminder %>%
filter(country %in% c("United States", "United Kingdom", "Australia",
"India", "Pakistan", "Bangladesh")) %>%
ggplot(aes(x = year, y = lifeExp, color = country)) +
geom_line()
Created on 2020-09-26 by the reprex package (v0.3.0)