Open billdenney opened 8 years ago
I'm interested in your PR.
What happens to vectors such like c("1.0.1", "1.1.0", "1.0")
for each interpretation
?
The way I'm thinking of it, the order would be as follows for each interpretation
:
Where it would get more complex is something like the c("1.0-1", "1.1-0", "1.0", "1.0-0")
Currently, naturalorder considers only integers. When decimals or scientific notation is given, it sorts as though all non-digit characters are text-- including period and negative numbers.
Would you be interested in a pull request that would make both of these work as expected from a floating point interpretation? If you wouldn't want it to always apply, perhaps an option on how to interpret the order such as a new option: interpretation=c("natural", "integers", "real", "scientific")
And, a different regular expression would be associated with each.