JuliaStats/DataFrames.jl — pull request #389 by kmsquire (2013-11-01 10:20:02+00:00)
Title: DataFrame sorting update

I finally took the time to update DataFrames sorting to match the changes in mainline julia.

`sort!` now looks like

```julia
Base.sort!(df, [alg=,] [by=,] [lt=,] [rev=false,]
[[col=,] [by=,] [lt=,] [rev=false,] ]
[[cols=(,,...),] [by=,] [lt=,] [rev=false,] ] ...)
```

`alg`, `by`, `lt`, and `rev` have the same meaning as in Base. The first instance of each specifies global defaults for sorting. Successive instances follow names of columns or groups of columns, and apply to the sorting of that column.

`sort` and `sortperm` have identical signatures.

The main work is done by setting up a `DFPerm` `Ordering`, which specifies the correct comparison function in `lt()` for each column.

Comments and suggestions appreciated.

cc: @StefanKarpinski