[R] Bug on r-bc?
Paul Smith
phhs80 at gmail.com
Tue Jul 27 11:51:18 CEST 2010
On Tue, Jul 27, 2010 at 5:12 AM, Gabor Grothendieck
<ggrothendieck at gmail.com> wrote:
>>>> The following code should return 1, but it returns 0:
>>>>
>>>> source("http://r-bc.googlecode.com/svn/trunk/R/bc.R")
>>>> bc("9 % 2")
>>>>
>>>
>>> See FAQ 2 on the r-bc package home page:
>>> http://r-bc.googlecode.com
>>
>> Thanks to all respondents for your replies. It seems that there is
>> still a problem:
>>
>>> bc("2 % 50",sample=0)
>> [1] "0"
>
> Its scale=0, not sample=0
>
>> bc("2 % 50", scale=0)
> [1] "2"
>
>> bc("scale=0; 2 % 50")
> [1] "2"
>
>> options(bc.scale=0)
>> bc("2 % 50")
> [1] "2"
>
That is right! Sorry and thanks, Gabor.
Paul
More information about the R-help
mailing list