matmin
and matmax
return a vector of length
nrow(cbind(...))
. matsort
returns a matrix of dimension
dim(cbind(...))
with in each row of cbind(...)
sorted.
matsort(x)
is a lot faster than, e.g., t(apply(x,1,sort))
,
if x
is tall (i.e., nrow(x)
>>ncol(x)
and
ncol(x)
<30. If ncol(x)
>30 then matsort
simply calls
`t(apply(x,1,sort))
'. matorder
returns a permutation which
rearranges its first argument into ascending order, breaking ties by
further arguments.