Debian Codegraph @

tests/test-modules/12_counter/R/utils.R

raw
1 # Given a numeric vector, convert to strings, sort, and convert back to
2 # numeric.
3 lexical_sort <- function(x) {
4 as.numeric(sort(as.character(x)))
5 }