On Tue, 2 Dec 2014, Sven Schreiber wrote:
it seems that msortby() only sorts within "blocks"
surrounded by
occurrences of NA (showing up as nan in matrices). The rest of the
sorting-like functions seem to work ok. Example:
<hansl>
matrix in = {2; 1; NA; 0; -5}
print in
matrix check = msortby(in, 1) # not ok
print check
matrix check = sort(in) # ok
print check
matrix check = dsort(in) # ok
print check
matrix check = values(in) # ok
print check
matrix check = uniq(in) # ok
print check
</hansl>
I believe the results you get from these calls will depend on the C
library. We should probably generate an error if you try to sort a
matrix containing NaNs since the sort order is indeterminate.
Allin