Matthew Dowle
2011-Feb-16 18:36 UTC
[Rd] method="radix" in sort.list() isn't actually a radix sort
Dear list, Were you aware that, strictly speaking, do_radixsort in sort.c actually implements a counting sort, not a radix sort ? http://en.wikipedia.org/wiki/Counting_sort It it was a radix sort it wouldn't need the 100,000 range restriction. Clearly the method argument can't be changed (now) from "radix" to "counting", but perhaps a note could be added to the .Rd ? According to Wikipedia, Harold H. Seward created both counting and radix sorting in 1954, and they are distinctly different. I did a grep through all R source for the keyword "radix" in case this was already documented. A google search and rseek.org search didn't return results for "counting sort" in the R context. There appears to be scope to add (true) radix sorting to R then, that doesn't have the 100,000 range restriction. Is there any interest in that? Matthew