JuliaStats/DataArrays.jl — pull request #106 by simonster (2014-07-10 19:14:31+00:00)
Title: Sort NAs to last position for PooledDataArrays as well

As @garborg noticed, since #102, sorting of NAs in PDAs is inconsistent with DataArrays. This fixes PDAs to sort NAs to the end.

I put a `nalast` parameter on `groupsort_indexer` to control whether NAs are sorted first or last, as currently the grouping functions and tests in DataFrames seem to expect NAs in the first position. This should be revisited, but I need to go through that code to understand how it works (or maybe @powerdistribution can say what's best?).

I also moved the sorting tests from DataFrames here, and I now run the same sorting tests I run on DataArrays on PooledDataArrays. Sorting PooledDataArrays in reverse is broken, but that was a pre-existing bug.