I need help!
I guess I can't attach the photo of the graph... but here's the deal.
"FRPM.x" is drawing from a data set, and "FRPM.y" is drawing from a different data set, but they're both being used to create geom_smooth and geom_point plots for 2 counties. I want the two datasets AND the two counties to have different colors, and to specify the difference in the legend, but I don't know how to separate them. Right now, both the lines for "Marin" have the same color, and both the lines for "Sonoma" have the same color, so it's hard to tell what is what.
I'm also very new to R and this is my first time using this forum, so pardon any lack of clarity!
Big thanks!
bigTabs <-left_join(tabs,tabs2,by=c("year","County.Name"))
bigTabs <- bigTabs[bigTabs$County.Name %in% countyList,]
bigplot <- ggplot(bigTabs, aes(x=year))+
geom_point(aes(color=County.Name,y=FRPM.x))+
geom_smooth(method="lm", aes(color=County.Name,y=FRPM.x))+
geom_point(aes(color=County.Name,y=FRPM.y))+
geom_smooth(method="lm", aes(color=County.Name,y=FRPM.y))+
scale_x_continuous(breaks=seq(2010, 2019), limits=c(2010,2019))+
ggtitle("FRPM by Year")+
labs(x="Year", y="FRPM")+
theme_classic()