[R] argument "x" is missing in minpack.lm

Luigi Marongiu m@rong|u@|u|g| @end|ng |rom gm@||@com
Tue Jun 30 12:00:47 CEST 2020


Hello,
I am trying to optimize a function with the function nls.lm from the
package minpack.lm. But I can't get it right:
```
A = 3261
B = 10
K = c(8,   24,   39,   63,   89,  115,  153,  196,  242,  287,  344,  408,  473,
      546,  619,  705,  794,  891,  999, 1096, 1242, 1363, 1506, 1648, 1753,
      1851, 1987, 2101, 2219, 2328, 2425, 2575, 2646, 2698, 2727, 2771, 2818,
      2853, 2895, 2926, 2964, 2995, 3025, 3053, 3080, 3102, 3119, 3141, 3152,
      3159, 3172, 3182, 3196, 3209, 3220, 3231, 3239, 3246, 3252, 3261)
O = nls.lm(list(a=A, b=B, x=X), holling,
           lower=NULL, upper=NULL, jac = NULL)
> Error in fn(par, ...) : argument "x" is missing, with no default
```
What am I missing?
Is nls.lm the right function for functions that are not linear?
Thank you
-- 
Best regards,
Luigi



More information about the R-help mailing list