R/ordermatrix.r

ordermatrix <- function(input,by){
  ranks <- rank(as.numeric(input[,by]),ties.method="first")
  output <- input[order(ranks),]
  output
}

Try the snatm package in your browser

Any scripts or data that you put into this service are public.

snatm documentation built on May 2, 2019, 5:01 p.m.