@NSS wrote:
Hi,
So, I was doing a quick anaysis on a data set and I plotted a scatter plot between two variables and a regression line using geom_smooth(method="lm") to see the degree of relationship between the two variables. I was wondering if there is a direct way that i can extract the coefficients of that linear model directly out of ggplot.
Here is what I did.
g2<-ggplot(data1,aes(HousePrice,CrimeRate))+geom_point()+geom_smooth(method = "lm")
Thanks
Neeraj
Posts: 1
Participants: 1