Sort descending all columns of data.frame
Using do.call is much faster.
For ascending order.
CustomData[do.call(order, CustomData),]
For decreasing order the syntax is a bit more elaborate because we have to pass the 'decreasing' argument.
CustomData[do.call(order, c(CustomData, list(decreasing=TRUE))),]
CD.sorted <- apply(CustomData, 2, sort, decreasing=F)
#2 == column, 1 == row