Re: [R] Weird behaviour of order() when having multiple ties

2022-01-31 Thread Stefan Fleck
-w64-mingw32/x64 (64-bit) > > Consider restarting your R cleanly with no variables in place before > reporting an error. > > -Original Message----- > From: Stefan Fleck > To: r-help@r-project.org > Sent: Sun, Jan 30, 2022 4:16 am > Subject: [R] Weird behaviour of order

Re: [R] Weird behaviour of order() when having multiple ties

2022-01-30 Thread Jeff Newmiller
Why should 6,5 be more correct than 5,6? How is R supposed to reach that conclusion based on comparing values? On January 30, 2022 1:16:44 AM PST, Stefan Fleck wrote: >I am experiencing a weird behavior of `order()` for numeric vectors. I >tested on 3.6.2 and 4.1.2 for windows and R 4.0.2 on u

Re: [R] Weird behaviour of order() when having multiple ties

2022-01-30 Thread Rui Barradas
Hello, I am not seeing an error, the order is right: x <- c( 0.6, 0.5, 0.3, 0.2, 0.1, 0.1 ) (i <- order(x)) #> [1] 5 6 4 3 2 1 x[i] #> [1] 0.1 0.1 0.2 0.3 0.5 0.6 Hope this helps, Rui Barradas Às 09:16 de 30/01/2022, Stefan Fleck escreveu: I am experiencing a weird behavior of `