--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+unsubscribe@googlegroups.com
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Check this discussion on SO: http://stackoverflow.com/questions/7549694/ggplot2-adding-regression-line-equation-and-r2-on-graphVivek
On Wed, Sep 7, 2016 at 8:03 AM, Rosemary Hartman <roseh...@gmail.com> wrote:
For example:Hello all,If I am making a graph using ggplot, I can plot a trendline using geom_smooth()
df = data.frame(x=c(1,2,3,4,5,6,7), y= c(2,4,3,5,8,9,10))
p = ggplot(df, aes(x=x, y=y)) + geom_point() + geom_smooth(method = "lm")
Is there a way of extracting the information on the linear model used to plot the line and standard errors? Coefficients and R2 and such? I can always just use the lm function, but it would seem to save a step if I could make ggplot report it for me.
Thanks!
Rosemary Hartman
--
--
You received this message because you are subscribed to the ggplot2 mailing list.
Please provide a reproducible example: https://github.com/hadley/devtools/wiki/Reproducibility
To post: email ggp...@googlegroups.com
To unsubscribe: email ggplot2+u...@googlegroups.com
More options: http://groups.google.com/group/ggplot2
---
You received this message because you are subscribed to the Google Groups "ggplot2" group.
To unsubscribe from this group and stop receiving emails from it, send an email to ggplot2+u...@googlegroups.com.