Early on I had been wondering if deprecating I() and the AsIs class would
be a way to get the problem to go away. I imagine (based on no data at
all!) that they are rarely used. If I were writing the same code today, I
would use options(stringsAsFactors=FALSE) instead of sprinkling I() here
and the
[This is the note I alluded to earlier today.]
On 08 Sep 2014, at 18:06 , MacQueen, Don wrote:
> I have found that order() fails in a rather arcane circumstance, as in
> this example:
>
>> foo <- I( c('x','\265g') )
>> order(foo)
> Error in if (xi > xj) 1L else -1L : missing value where TRUE/FA
> peter dalgaard
> on Tue, 9 Sep 2014 16:36:19 +0200 writes:
> It's actually a little more complicated. I wrote a note, but it seems to
be stuck in the outbox on my home machine (I probably forgot to click Send...).
> One important aspect is that
>> "x" < "\265g"
>
e: [Rd] Problem with order() and I()
>>>>> MacQueen, Don
>>>>> on Mon, 8 Sep 2014 16:06:21 + writes:
> I have found that order() fails in a rather arcane circumstance, as in
> this example:
>> foo <- I( c('x','\
It's actually a little more complicated. I wrote a note, but it seems to be
stuck in the outbox on my home machine (I probably forgot to click Send...).
One important aspect is that
> "x" < "\265g"
[1] NA
which makes me wonder if the bug really is in the case that "works". It seems
that it is
> MacQueen, Don
> on Mon, 8 Sep 2014 16:06:21 + writes:
> I have found that order() fails in a rather arcane circumstance, as in
> this example:
>> foo <- I( c('x','\265g') )
>> order(foo)
> Error in if (xi > xj) 1L else -1L : missing value where TRUE/FALSE ne
I have found that order() fails in a rather arcane circumstance, as in
this example:
> foo <- I( c('x','\265g') )
> order(foo)
Error in if (xi > xj) 1L else -1L : missing value where TRUE/FALSE needed
> foo <-c('x','\265g')
> order(foo)
[1] 1 2
> sessionInfo()
R version 3.1.1 (2014-07-10)
Platf