Re: [R] equation of a line or curve

From: Uwe Ligges <>
Date: Tue, 25 Nov 2008 12:19:17 +0100

Peter Dalgaard wrote:
> Uwe Ligges wrote:
>> CE.KA wrote:
>>> Hi R users
>>> I used the function line(x,y) and line(lowess(x,y)) to see the
>>> correlation
>>> between 2 variables (x,y).
>>> Here is my question:
>>> is there a way to ask R to tell me the equation of
>>> -this line : line(x,y)
>> The equation if line(x,y)? It is given by the n data points directly and
>> consists of n-1 separate linear parts.
> line() not lines()...

Bad thing, I invented some S rather than R.


>> line(cars)
> Call:
> line(cars)
> Coefficients:
> [1] -26.053 4.421
> I'm a bit confused as to how you can avoid finding the equation of the
> line from that output!
> mailing list PLEASE do read the posting guide and provide commented, minimal, self-contained, reproducible code. Received on Tue 25 Nov 2008 - 11:21:51 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 Tue 25 Nov 2008 - 11:30:27 GMT.

Mailing list information is available at Please read the posting guide before posting to the list.

list of date sections of archive