I have used ggplot to the below dataframe(cars dataset) for 2 categories. I need to have 2 regression equations for 2 categories. Below is the code I have executed to plot the graph
cars$cat <- ifelse(cars$speed>10,"greater than 10","less than 10")
ggplot(cars,aes(x=dist,y=speed,color=cat))+geom_point()+geom_smooth(method = lm)
Can you help me in putting the 2 regression equations