[R] Weird behaviour of order() when having multiple ties
@te|@n@b@||eck @end|ng |rom gm@||@com
Sun Jan 30 21:29:58 CET 2022
Thanks everyone, i guess i just had a too long and confusing coding
session. I tried it again and now everything seems to work. sorry for the
On Sun, Jan 30, 2022 at 9:17 PM Avi Gross <avigross using verizon.net> wrote:
> I did not replicate your results as it works fine and applying the order
> result in a sorted properly result:
>  0.1 0.1 0.2 0.3 0.5 0.6
> I am using a more recent version of R, but for something this basic, it
> should not matter as even older versions should do this fine.
> R version 4.1.2 (2021-11-01) -- "Bird Hippie"
> Copyright (C) 2021 The R Foundation for Statistical Computing
> Platform: x86_64-w64-mingw32/x64 (64-bit)
> Consider restarting your R cleanly with no variables in place before
> reporting an error.
> -----Original Message-----
> From: Stefan Fleck <stefan.b.fleck using gmail.com>
> To: r-help using r-project.org
> Sent: Sun, Jan 30, 2022 4:16 am
> Subject: [R] Weird behaviour of order() when having multiple ties
> 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 ubuntu. Can anyone
> ## Result [should be in order]
>  5 6 4 3 2 1
> The sort order is obviously wrong. This only occurs if i have multiple
> ties. The problem does _not_ occur for decreasing = TRUE.
> [[alternative HTML version deleted]]
> R-help using r-project.org mailing list -- To UNSUBSCRIBE and more, see
> PLEASE do read the posting guide
> and provide commented, minimal, self-contained, reproducible code.
[[alternative HTML version deleted]]
More information about the R-help