Dear meng, Re:
> Hi all: > I met a question about "lines". > > > attach(cars) > > > plot(dist ~ speed) > #add the regression line to the plot > lines(fitted(lm(dist~speed)) ~ speed) > > > plot(dist ~ speed) > #what kind of curve does the following command add to the plot? > lines(fitted(lm(dist~speed))) (etc..) I guess you need the function abline(), not lines() to add a regression line. Hoping this helps, I remain, With best wishes, Franklin -- Dr. Franklin Bretschneider Dept of Biology Utrecht Unversity Padualaan 8 3584 CH Utrecht The Netherlands f.bretschnei...@uu.nl [[alternative HTML version deleted]] ______________________________________________ R-help@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.