[R] solve scalar linear equation
Rui Barradas
ruipbarradas at sapo.pt
Thu May 22 14:55:10 CEST 2014
Hello,
See inline.
Em 22-05-2014 13:35, message escreveu:
> On 2014-05-22 11:00, Berend Hasselman wrote:
>>>
>>>> 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
>>
>
> The error states "opposite sign", which suggests to a rudimentary novice
> that end points (0 and 10, or 0 and 20) must give results of the
> function such that one value is negative, another value is positive. Or
> is this interpretation wrong?
No, it's not. This is basic Math.
>
>> See the Details section of the uniroot documentation.
>>
>
> The documentation states that the upper end point (in this example 10,
> or 20) must be strictly larger than the lower point (0). What is being
> mis-understood please?
I believe that Berend was trying to have you read that "The function
values at the endpoints must be of opposite signs (or zero), for
extendInt="no", the default."
>
> ______________________________________________
> 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