[R] Equivalent of gtools::mixedsort in R base

Sebastien Bihorel sebastien.bihorel at cognigencorp.com
Mon Mar 12 05:15:42 CET 2018


Hi,

Searching for functions that would order strings that mix characters and numbers in a "natural" way (ie, "a1 a2 a10" instead of "a1 a10 a2"), I found the mixedsort and mixedorder from the gtools package.

Problems: 
1- mixedorder does not work in a "do.call(mixedorder, mydataframe)" call like the order function does
2- gtools has not been updated in 2.5 years

Are you aware of an equivalent of this function in base R or a another contributed package (with correction of problem #1)?

Thanks



More information about the R-help mailing list