orderedMatrix <- function(M) { columns <- apply(M, 2L, identity, simplify = FALSE) o <- do.call(function(...) order(..., decreasing = TRUE), columns) M[o, ] }
Add the following code to your website.
REMOVE THIS Copy to clipboard
For more information on customizing the embed code, read Embedding Snippets.