Re: [Rd] Problem with order() and I()

2014-09-10 Thread MacQueen, Don
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

Re: [Rd] Problem with order() and I()

2014-09-09 Thread Martin Maechler
MacQueen, Don macque...@llnl.gov 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

Re: [Rd] Problem with order() and I()

2014-09-09 Thread peter dalgaard
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

Re: [Rd] Problem with order() and I()

2014-09-09 Thread MacQueen, Don
] Problem with order() and I() MacQueen, Don macque...@llnl.gov 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

Re: [Rd] Problem with order() and I()

2014-09-09 Thread Martin Maechler
peter dalgaard pda...@gmail.com 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 [1]

Re: [Rd] Problem with order() and I()

2014-09-09 Thread peter dalgaard
[This is the note I alluded to earlier today.] On 08 Sep 2014, at 18:06 , MacQueen, Don macque...@llnl.gov 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

[Rd] Problem with order() and I()

2014-09-08 Thread MacQueen, Don
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) Platform: