On 22-05-2014, at 12:28, message <let...@openmailbox.org> wrote: > On 2014-05-20 10:00, r-help-requ...@r-project.org wrote: >> ------------------------------ >> Message: 32 >> Date: Mon, 19 May 2014 23:04:27 +0100 >> From: Rui Barradas <ruipbarra...@sapo.pt> >> To: message <let...@openmailbox.org>, r-help@r-project.org >> uniroot(function(x) 5*x - 55, c(0, 20)) > > Why does this instruction fail if the interval is changed? > >> uniroot(function(x) 5*x - 55, c(0, 10)) > Error in uniroot(function(x) 5 * x - 55, c(0, 10)) : > f() values at end points not of opposite sign >
I don’t believe this. The error message says it all. 5*0-55 ==> -55 5*10-55 ==> -5 See the Details section of the uniroot documentation. Berend > ______________________________________________ > 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. ______________________________________________ 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.