see ?curve e.g.
qftn <- function(x) 1 + 2*x - .1*x^2 curve(qftn, 0, 10) hth, Kingsford On Mon, Oct 5, 2009 at 9:42 AM, Juliano van Melis <jvme...@gmail.com> wrote: > Good day for all, > > I'm a beginner aRgonaut, thus I'm having a problem to plot a quadratic model > of regression in a plot. > First I wrote: > >>plot(Y~X) > > and then I tried: > >>abline(lm(Y~X+I(X^2)) > > but "abline" only uses the first two of three regression coefficients, thus > I tried: > >>line(lm(Y~X+I(X^2)) > > but a message error is showed ("insufficient observations"). > > Therefore, I want to know: how could I plot a quadratic line in my plot > graph? > > thanks! > > [[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. > ______________________________________________ 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.