Re: [R] plotEst

From: sigalit mangut-leiba <smangut_at_gmail.com>
Date: Sun, 24 Feb 2008 00:18:38 +0200

Thank you for your suggestion,
now I get 2 lines but confidence limits just for the first one.. do you know what I'm doing wrong?!
Thanks again,
Sigalit.

On 2/23/08, hadley wickham <h.wickham_at_gmail.com> wrote:
>
> On Tue, Feb 19, 2008 at 3:53 PM, sigalit mangut-leiba <smangut@gmail.com>
> wrote:
> > Sorry to disturb,
> > I managed to plot 2 together with 'layer' like this:
> >
> >
> >
> > qplot(se, or, min=lcl1, max=ucl1, data=df1,
> geom="pointrange")+layer(data =
> > df2, mapping = *aes*(x = se, y = OR2,min=lcl2,max=ucl2), geom =
> > "pointrange")+geom_line()
>
> An easier way would be to do something like this:
>
> df1$id <- 1
> df2$id <- 2
> df <- rbind(df1, df2)
>
> qplot(se, or, min=lcl1, max=ucl1, colour=factor(id), data=df,
> geom="pointrange") +
> geom_line()
>
> That way you get a nice legend too.
>
> Hadley
> --
> http://had.co.nz/
>

        [[alternative HTML version deleted]]



R-help_at_r-project.org mailing list
https://stat.ethz.ch/mailman/listinfo/r-help PLEASE do read the posting guide http://www.R-project.org/posting-guide.html and provide commented, minimal, self-contained, reproducible code. Received on Sat 23 Feb 2008 - 22:29:17 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Sun 24 Feb 2008 - 00:30:16 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive