Just to set things straight: The error message "Error in nleqslv(xstart, fun) : Length of fn result <> length of x!" is issued by the underlying nleqslv C function.
<fn> refers to the second argument of function nleqslv which is named fn. It is not issued by R itself. Other have already pointed out how to resolve the error. Berend Hasselman ______________________________________________ R-help@r-project.org mailing list -- To UNSUBSCRIBE and more, see 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.