-
> project.org] On Behalf Of Steve Murray
> Sent: Friday, October 09, 2009 3:51 AM
> To: r-help@r-project.org
> Subject: [R] Trendline for a subset of data
>
>
> Dear all,
>
> I am using abline(lm ...) to insert a linear trendline through a
> portion of my data (e.g
Content-Type: text/plain; charset="iso-8859-1"
Content-Transfer-Encoding: quoted-printable
MIME-Version: 1.0
Thanks Mark=2C the reg.line trick seemed to work really well.
David - hopefully the hex-text will have gone now - if not=2C please accept=
my apologies as=2C this is=2C as far as I kn
the =
entire length of the x-axis).
The basic strategy would be to calculate the x and y coordinates of
the two points at the end of the desired segment and then "say"
segments( x[1], y[1], x[2], y[2] )
Many thanks again=2C
Steve
----------------
CC: r
to create a =
linear trendline which only extends through points 36:45? (and overshoots a=
t either end very slightly=2C if possible=2C rather than running along the =
entire length of the x-axis).
Many thanks again=2C
Steve
> CC: r-help@r-project.org
>
Hi Steve,
>> However, I am finding that ... the trendline ... continues to run beyond
>> this data segment
>> and continues until it intersects the vertical axes at each side of the
>> plot.
Your "best" option is probably Prof. Fox's reg.line function in package car.
##
library(car)
?reg.line
On Oct 9, 2009, at 5:50 AM, Steve Murray wrote:
Dear all,
I am using abline(lm ...) to insert a linear trendline through a
portion of my data (e.g. dataset[,36:45]). However, I am finding
that whilst the trendline is correctly displayed and representative
of the data portion I've chosen
Dear all,
I am using abline(lm ...) to insert a linear trendline through a portion of my
data (e.g. dataset[,36:45]). However, I am finding that whilst the trendline is
correctly displayed and representative of the data portion I've chosen, the
line continues to run beyond this data segment an
7 matches
Mail list logo