Please help me; I made a plot comprising some red and blue points using ggplot. Now I want to connect the red points to each other with a line and connect the blue points to each other with another line These are my codes
m <- as.factor(c(7,"12 PCA", 21, "24 PCA", "31 PCA", 38, 70))
## Then we plot the points
ggplot(pH, aes(x= m, y=All))+ ylim(60,100)+
scale_x_discrete(limits=c(7,"12 PCA", 21, "24 PCA", "31 PCA", 38, 70))+
geom_point(data=pH, aes(y=All), colour = 'red', size =1)+
geom_point(data=pH, aes(y=Test), colour = 'blue', size=1)
How can I do that? Thanks