[R] Trendline for a subset of data
Mark Difford
mark_difford at yahoo.co.uk
Fri Oct 9 16:17:48 CEST 2009
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
reg.line
Regards, Mark.
smurray444 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, the line continues to run beyond this data segment and
> continues until it intersects the vertical axes at each side of the plot.
>
> How do I display the line so that it only runs between point 36 and 45 (as
> shown in the example above) as doesn't continue to display a line
> throughout the rest of the plot space?
>
> Many thanks,
>
> Steve
>
> _________________________________________________________________
> View your other email accounts from your Hotmail inbox. Add them now.
> http://clk.atdmt.com/UKM/go/167688463/direct/01/
> ______________________________________________
> R-help at r-project.org 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.
>
>
--
View this message in context: http://www.nabble.com/Trendline-for-a-subset-of-data-tp25818425p25821972.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list