[R] obtain linear regression parameters from qplot

ONKELINX, Thierry Thierry.ONKELINX at inbo.be
Tue Aug 11 11:28:26 CEST 2009

It's much easier to extract that info from lm itself. 

Model <- lm(Intensity ~ Time, data = totalD, subset = Name ==



ir. Thierry Onkelinx
Instituut voor natuur- en bosonderzoek / Research Institute for Nature
and Forest
Cel biometrie, methodologie en kwaliteitszorg / Section biometrics,
methodology and quality assurance
Gaverstraat 4
9500 Geraardsbergen
tel. + 32 54/436 185
Thierry.Onkelinx at inbo.be

To call in the statistician after the experiment is done may be no more
than asking him to perform a post-mortem examination: he may be able to
say what the experiment died of.
~ Sir Ronald Aylmer Fisher

The plural of anecdote is not data.
~ Roger Brinner

The combination of some data and an aching desire for an answer does not
ensure that a reasonable answer can be extracted from a given body of
~ John Tukey

-----Oorspronkelijk bericht-----
Van: r-help-bounces at r-project.org [mailto:r-help-bounces at r-project.org]
Namens Jong Hoon Choi
Verzonden: dinsdag 11 augustus 2009 3:26
Aan: r-help at r-project.org
Onderwerp: [R] obtain linear regression parameters from qplot

My question is how to get linear regression parameters (e.g. slope,
y-intercept, etc.) from the fittings in qplot.

My code looks like this,

Fig1 = qplot(data=subset(totalD, (Name=="increase1"), x=Time,
y=Intensity, main="Total Data")
Fig1 + stat_smooth(method="lm")

I can get the linear regression fittings but I am not sure how to get
the parameters out of them.

Thanks for your help in advance.

	[[alternative HTML version deleted]]

R-help at r-project.org mailing list
PLEASE do read the posting guide
and provide commented, minimal, self-contained, reproducible code.

Dit bericht en eventuele bijlagen geven enkel de visie van de schrijver weer 
en binden het INBO onder geen enkel beding, zolang dit bericht niet bevestigd is
door een geldig ondertekend document. The views expressed in  this message 
and any annex are purely those of the writer and may not be regarded as stating 
an official position of INBO, as long as the message is not confirmed by a duly 
signed document.

More information about the R-help mailing list