R/RankMatrix.R

Defines functions RankMatrix

RankMatrix <-
  function(X, na.last = TRUE, ties.method = "average") {
    if (is.matrix(X)) {
      X.rank <- apply(X, 2, FUN = function(x) rank(x, na.last = na.last, ties.method = ties.method))
    } else {
      X.rank <- rank(X, na.last = na.last, ties.method = ties.method)
    }
    return(X.rank)
  }

Try the rerf package in your browser

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

rerf documentation built on May 2, 2019, 8:16 a.m.