I obtain the coefficients of a nonlinear function
thus.
------------------------------------------
m=nls(y ~ a + b*x + c*x^2 + d*x^3 +
e*exp(x)+f*log(x)+g*log2(x), start = list(a = 0, b =
1, c = 1, d=1, e=1, f=1, g=1))

c=coef(m)
-------------------------------------------

However, when I look at c[1], I get something like
a
2.345678

How can I extract 2.345678 as a number?

Thanks very much in advance,
Peter.

______________________________________________
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.

Reply via email to