Hi,
does anyone know of an implementation/function that sorts strings that
*contain* roman numerals (I, II, III, IV, V, ...) which are treated as
numbers. In 'gtools' there is mixedsort() which does this for strings
that contains (decimal) numbers. I'm looking for a "mixedsortroman()"
function that does the same but with roman numbers, e.g.
## DECIMAL NUMBERS
[1] "chr I" "chr II" "chr III" "chr IV"
[5] "chr V" "chr VI" "chr VII" "chr VIII"
[9] "chr IX" "chr X" "chr XI" "chr XII"
The latter is what I'm looking for.
Before hacking together something myself (e.g. identify roman numerals
substrings, translate them to decimal numbers, use gtools::mixedsort()
to sort them and then translate them back to roman numbers), I'd like
to hear if someone already has this implemented/know of a package that
does this.
Thanks,
Henrik