Re: [R] Question concerning ggplot

2006-10-24 Thread Rainer M Krug
hadley wickham wrote: >> > rsqs <- as.data.frame(stamp(mtcars, cyl ~ ., function(df) >> > summary(lm(mpg ~ wt, data=df))$r.squared)) >> > rsqs$wt <- 4 >> > rsqs$mpg <- 32 >> > ggtext(p, data=rsqs, aes=list(label=value)) >> > >> > But that doesn't work for some reason I don't understand yet (but I'm

Re: [R] Question concerning ggplot

2006-10-24 Thread hadley wickham
> > rsqs <- as.data.frame(stamp(mtcars, cyl ~ ., function(df) > > summary(lm(mpg ~ wt, data=df))$r.squared)) > > rsqs$wt <- 4 > > rsqs$mpg <- 32 > > ggtext(p, data=rsqs, aes=list(label=value)) > > > > But that doesn't work for some reason I don't understand yet (but I'm > > working on it) Ooops -

Re: [R] Question concerning ggplot

2006-10-24 Thread Rainer M Krug
hadley wickham wrote: >> > Do you mean doing a seperate linear regression for each group in your >> > data? If so, have a look at ?gggroup for some examples of exactly >> > that. >> >> No. >> >> I do the following: >> >> > p <- ggplot(cc, . ~ expert, aesthetic=list(y=x0050, x=generation)) >> > g

Re: [R] Question concerning ggplot

2006-10-24 Thread hadley wickham
> > Do you mean doing a seperate linear regression for each group in your > > data? If so, have a look at ?gggroup for some examples of exactly > > that. > > No. > > I do the following: > > > p <- ggplot(cc, . ~ expert, aesthetic=list(y=x0050, x=generation)) > > ggjitter(p) > > ggsmooth(method=

Re: [R] Question concerning ggplot

2006-10-24 Thread Rainer M Krug
hadley wickham wrote: >> When using >> ggsmooth(method=lm) >> is there a way to show the results of the separate linear regressions? > > Do you mean doing a seperate linear regression for each group in your > data? If so, have a look at ?gggroup for some examples of exactly > that. No. I do the

Re: [R] Question concerning ggplot

2006-10-24 Thread hadley wickham
> When using > ggsmooth(method=lm) > is there a way to show the results of the separate linear regressions? Do you mean doing a seperate linear regression for each group in your data? If so, have a look at ?gggroup for some examples of exactly that. Hadley __

[R] Question concerning ggplot

2006-10-24 Thread Rainer M Krug
Hi I am using ggplot under R 2.4 / Linux. When using ggsmooth(method=lm) is there a way to show the results of the separate linear regressions? Thanks Rainer -- Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation Biology (UCT) Department of Conservation Ecology and Entomology Universit