Re: [R] Question concerning ggplot

From: Rainer M Krug <RKrug_at_sun.ac.za>
Date: Tue 24 Oct 2006 - 12:00:04 GMT

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 following:

 > p <- ggplot(cc, . ~ expert, aesthetic=list(y=x0050, x=generation))
 > ggjitter(p)
 > ggsmooth(method=lm)

And I get six columns in the graph, one for each expert and ggsmooth(method=lm) draws the linear regression lines into the graphs. I would like to have the coefficients and the R-square values of the linear regressions to analyse them further and to print them in the graphs.

>
> Hadley

-- 
Rainer M. Krug, Dipl. Phys. (Germany), MSc Conservation
Biology (UCT)

Department of Conservation Ecology and Entomology
University of Stellenbosch
Matieland 7602
South Africa

Tel:		+27 - (0)72 808 2975 (w)
Fax:		+27 - (0)21 808 3304
Cell:		+27 - (0)83 9479 042

email:	RKrug@sun.ac.za
       	Rainer@krugs.de

______________________________________________
R-help@stat.math.ethz.ch 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 Tue Oct 24 21:57:19 2006

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.1.8, at Tue 24 Oct 2006 - 16:30:14 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.