I'm creating a boxplot on r using ggplot. I created 2 different lines of code and want to put into the same graph to compare data from 2019 and 2020. However, with Youtube videos they say to add "~" anyone know what's wrong?
code I'm using
ggplot(covid, aes(x=covid1$oct2019_rent, y=covid1$Depression.2019))+ geom_boxplot()~ ggplot(covid, aes(x=covid1$oct2020_rent, y=covid1$Depression.2020)) + geom_boxplot()