I am doing this now, but I cannot find a reasonable solution.
I would like to sort all columns of data.frame in descending order.
Example data, for example:
CustomData <- data.frame(Value1=rnorm(100,1,2), Value2=rnorm(100,2,3), Value3=rexp(100,5), Value4=rexp(100,2))
Works for a single column:
CustomData[order(CustomData$Value1, decreasing=FALSE), ]
How to sort all column data in descending / increasing order in a reasonable way? thanks.
I also tried something like this, as posted elsewhere, but does not work as indicated.
CustomData[do.call(order, as.list(CustomData)),]
source share