[R] solve scalar linear equation
Berend Hasselman
bhh at xs4all.nl
Thu May 22 13:00:57 CEST 2014
On 22-05-2014, at 12:28, message <letter at openmailbox.org> wrote:
> On 2014-05-20 10:00, r-help-request at r-project.org wrote:
>> ------------------------------
>> Message: 32
>> Date: Mon, 19 May 2014 23:04:27 +0100
>> From: Rui Barradas <ruipbarradas at sapo.pt>
>> To: message <letter at openmailbox.org>, r-help at 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 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.
More information about the R-help
mailing list