I have a data frame with grouped datasets, each group has 12 rows and 2 columns with the third column being a categorical variable. I am trying to plot 3 different scatterplots (as a function of the categorical variable) with fitted lines but so far I'm only able to have all data points in one plot. Please help :)
Code:
library(tidyverse)
library(dplyr)
library(readxl)
Data.tibble <- read_excel('')
Graph<-Data.tibble%>%
ggplot(aes(x=x, y=y))+
geom_point(aes(color=factor(Category)))