[R] min(NA,"bla") != min("bla", NA)

Rolf Turner rolf.turner at xtra.co.nz
Fri Sep 27 01:05:26 CEST 2013


On 09/27/13 10:34, Duncan Murdoch wrote:
> On 13-09-26 5:32 PM, Rolf Turner wrote:
>>
>> Just to add to the confusion, on my system I get NA --- which I
>> understand to be
>> the correct value --- from all of min(NA,"bla"), min("bla",NA),
>> min(c(NA,"bla")), and
>> min(c("bla",NA)).  When I append the argument na.rm=TRUE to each of the
>> calls,
>> I get "bla" from each.
>>
>> So, no bug in my system.
>
> Very strange.  I suspect it's the fact that you're upside-down :-).

Ah, but we are actually the right way up!!!

Hmm.  I got an email from arun saying that he was using Linux and R 
3.0.2 --- so I
conjecture for a while that perhaps the bug had been introduced in going 
from 3.0.1
to 3.0.2.  (So maybe everybody should downgrade.) But then I got 
messages from
Sarah Goslee and from Don McKenzie saying that they were using Linux and 
R 3.0.1
as well, and the bug showed up for them.   So it is all very mysterious.

Good luck in tracking down the problem.

     cheers,

     Rolf



More information about the R-help mailing list