Re: [R] nls() and lines()

2011-07-18 Thread Peter Ehlers
On 2011-07-17 17:37, Steven Ranney wrote: All - I'm having an issue with trying to plot a model derived from nls() onto a simple plot. I have included a sample data set and the code that I've been using. year month day date location mileage cost gallon cpg mpg x

Re: [R] nls() and lines()

2011-07-18 Thread Peter Ehlers
On 2011-07-18 06:38, Steven Ranney wrote: Provided, of course, that I alter the lines for different data sets and data frames, the code to plot a line derived from nls() onto a plot works with no problems. Here's an example: Year NOP 2002 6 2003 8 2004 11 2005 19 2006 26 2007 25 mod1-

Re: [R] nls() and lines()

2011-07-18 Thread Steven Ranney
Provided, of course, that I alter the lines for different data sets and data frames, the code to plot a line derived from nls() onto a plot works with no problems. Here's an example: Year NOP 2002 6 2003 8 2004 11 2005 19 2006 26 2007 25 mod1 - nls(NOP~alpha*exp(beta*Year), data=aic,

Re: [R] nls() and lines()

2011-07-18 Thread Steven Ranney
Unfortunately, the transposition of lines and list was a typo on my part. Now that I look like a fool and have corrected the issue, I'm still faced with the same dilemma. With the original data set I posted in this thread, plot(mpg~x, data=mileage[year==2009,], ylab=Miles per gallon, xlab=2009,

Re: [R] nls() and lines()

2011-07-18 Thread David Winsemius
On Jul 18, 2011, at 10:13 AM, Steven Ranney wrote: Unfortunately, the transposition of lines and list was a typo on my part. Now that I look like a fool and have corrected the issue, I'm still faced with the same dilemma. With the original data set I posted in this thread, No. You did not

[R] nls() and lines()

2011-07-17 Thread Steven Ranney
All - I'm having an issue with trying to plot a model derived from nls() onto a simple plot.  I have included a sample data set and the code that I've been using.    year month day   date location mileage  cost gallon  cpg   mpg  x 2009 1   4   1/4/2009  BZN  124585 19.39