Re: [R] Plotting polynomial fit

2009-04-26 Thread David Winsemius
On Apr 26, 2009, at 8:40 PM, Ronnen Levinson wrote: Hi. Is there an analog to abline() that can be used to plot a polynomial fit? For example, I can draw the straight-line fit fit <- lm(y ~ x) via abline(coef=fit$coef) but I'm not sure how to draw the polynomial fit fit <- lm

[R] Plotting polynomial fit

2009-04-26 Thread Ronnen Levinson
Hi. Is there an analog to abline() that can be used to plot a polynomial fit? For example, I can draw the straight-line fit fit <- lm(y ~ x) via abline(coef=fit$coef) but I'm not sure how to draw the polynomial fit fit <- lm(y ~ poly(x,2)) I do see the function curve(), but not