You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository has been archived by the owner on Apr 15, 2024. It is now read-only.
I had some unit tests fail only on the Ubuntu r-hub image. The error was due to how sort functioned in that image.
What I expected
I expect that strings starting with an underscore will be sorted alphanumerically before strings starting with standard letters of the alphabet:
> sort(c("a", "_b", "c"))
[1] "_b" "a" "c"
What I observed
On every machine I have local access to (Ubuntu, macOS, Windows), the sorting is performed this way. Additionally the remote machines I have access to also perform the same (Travis-CI, AppVeyor, winbuilder), including most of the r-hub images. For example:
# r-hub ubuntu-gcc-devel
$ sudo docker run --rm -ti rhub/ubuntu-gcc-devel /opt/R-devel/bin/Rscript -e 'sort(c("a", "_b", "c"))'
[1] "_b" "a" "c"
# r-hub debian-gcc-devel
$ sudo docker run --rm -ti rhub/debian-gcc-devel /opt/R-devel/bin/Rscript -e 'sort(c("a", "_b", "c"))'
[1] "_b" "a" "c"
# r-hub debian-gcc-release
$ sudo docker run --rm -ti rhub/debian-gcc-release Rscript -e 'sort(c("a", "_b", "c"))'
[1] "_b" "a" "c"
# r-hub fedora-clang-devel
$ sudo docker run --rm -ti rhub/fedora-clang-devel /opt/R-devel/bin/Rscript -e 'sort(c("a", "_b", "c"))'
[1] "_b" "a" "c"
# Rocker (Debian)
$ sudo docker run --rm -ti rocker/r-base Rscript -e 'sort(c("a", "_b", "c"))'
[1] "_b" "a" "c"
However, in ubuntu-gcc-release, a leading underscore appears to be ignored when sorting:
$ sudo docker run --rm -ti rhub/ubuntu-gcc-release Rscript -e 'sort(c("a", "_b", "c"))'
[1] "a" "_b" "c"
The text was updated successfully, but these errors were encountered:
Sign up for freeto subscribe to this conversation on GitHub.
Already have an account?
Sign in.
I had some unit tests fail only on the Ubuntu r-hub image. The error was due to how
sort
functioned in that image.What I expected
I expect that strings starting with an underscore will be sorted alphanumerically before strings starting with standard letters of the alphabet:
What I observed
On every machine I have local access to (Ubuntu, macOS, Windows), the sorting is performed this way. Additionally the remote machines I have access to also perform the same (Travis-CI, AppVeyor, winbuilder), including most of the r-hub images. For example:
However, in ubuntu-gcc-release, a leading underscore appears to be ignored when sorting:
The text was updated successfully, but these errors were encountered: