You've given each woman a unique identifier so there is only one data
point per person. It's hard to fit a line to one point ;)
Hadley
On Thu, Jan 26, 2017 at 12:56 PM, Timothy Lau <
timoth...@gmail.com> wrote:
> Hi,
>
> I'm trying to make a single plot with multiple regression lines.
> This code example doesn't work.
>
>
> women2 <- data.frame(id = 1:nrow(women), women)
> ggplot(data = women2, mapping = aes(x = height, y = weight, group = id)) +
> geom_smooth(method = lm, se = F)
>
> What should I change?
>
> --
> --
> 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.
> For more options, visit
https://groups.google.com/d/optout.
--
http://hadley.nz