radix_sort: Call 'sort()' with 'method = 'radix"

View source: R/utils.R

radix_sortR Documentation

Call sort() with method = 'radix'

Description

THE BASE SORT FUNCTION USES A DIFFERENT METHOD DEPENDING ON YOUR LOCALE. However, the order for the radix method is always stable.

Usage

radix_sort(...)

Arguments

...

All arguments forwarded to sort().

Details

see https://stackoverflow.com/questions/42272119/r-cmd-check-fails-devtoolstest-works-fine

stringr::str_sort() solves this problem with the locale parameter having a default value, but I don't want to add that as another dependency.

Value

Whatever you passed in, now in a stable sorted order regardless of your locale.

Author(s)

Kelly Sovacool sovacool@umich.edu


SchlossLab/mikropml documentation built on Aug. 24, 2023, 9:51 p.m.