[R] newbie nls question

From: Ranney, Steven <steven.ranney_at_montana.edu>
Date: Tue, 10 Jun 2008 16:56:19 -0600

I'm tyring to fit a relatively simple nls model to some data, but keep coming up against the same error (code follows):

Oto=nls(Otolith ~ Linf*(1-exp(-k(AGE-to))),

    data = ages,
    start = list(Linf=1000, k=0.1, to=0.1),     trace = TRUE)

The error message I keep getting is "Error in eval(expr, envir, enclos) : could not find function "k"". I've used this line of code for other nls models (with different data, parameter estimates, etc.), but have never gotten this error. The data is




Are the missing values (e.g., no value for Otolith, AGE 9) having an effect? I am using Tinn-R as an editor

I'm new to R, trying to get away from Rcmdr (though it has been helpful), and still trying to learn the language with the aid of several books on the R. A search of the R Archive did not prove fruitful.

Thanks in advance,


Steven H. Ranney
Graduate Research Assistant (Ph.D)
USGS Montana Cooperative Fishery Research Unit
Montana State University
PO Box 173460
Bozeman, MT 59717-3460

phone: (406) 994-6643
fax: (406) 994-7479

        [[alternative HTML version deleted]]

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. Received on Tue 10 Jun 2008 - 23:26:17 GMT

Archive maintained by Robert King, hosted by the discipline of statistics at the University of Newcastle, Australia.
Archive generated by hypermail 2.2.0, at Wed 11 Jun 2008 - 11:30:40 GMT.

Mailing list information is available at https://stat.ethz.ch/mailman/listinfo/r-help. Please read the posting guide before posting to the list.

list of date sections of archive