Re: [R] adding layers in ggplot2 (data and code included)

2008-09-22 Thread hadley wickham
Hi Juliet, On Sun, Sep 21, 2008 at 11:47 PM, Juliet Hannah <[EMAIL PROTECTED]> wrote: > Here is some sample data: > > mydata <- read.table(textConnection("Est GroupTri > 00 4.639644 > 10 4.579189 > 20 4.590714 > 01 4.443696 > 1

Re: [R] adding layers in ggplot2 (data and code included)

2008-09-21 Thread Eric
The way you've attempted to get this result seems to align with the way R "should" work, but it fails in this case. The fix is to break things up a little bit: p <- ggplot(mydata, aes(x=Est, y=Tri)) p <- p + geom_point(aes(colour=factor(Group),shape=factor(Group))) p <- p + geom_smooth(aes(gr

[R] adding layers in ggplot2 (data and code included)

2008-09-21 Thread Juliet Hannah
Here is some sample data: mydata <- read.table(textConnection("Est GroupTri 00 4.639644 10 4.579189 20 4.590714 01 4.443696 11 4.588243 21 4.650505 02 4.296608 12 4.826036