R/res_rank.R

Defines functions res_rank

Documented in res_rank

##' Rank the results by rank aggregation methods
##'
##'
##' @title res_rank
##' @param ... ScoreResult Object
##' @param method rank aggregation method, by defaylt \code{'RRA'}, other options are
##' \code{'min'}, \code{'geom.mean'}, \code{'mean'}, \code{'median'} and \code{'stuart'}
##' @return  a dataframe with two column
##' @importFrom RobustRankAggreg aggregateRanks
##' @export
##' @author Yuanlong Hu
##' @references Kolde, R., Laur, S., Adler, P., & Vilo, J. (2012). Robust rank aggregation for gene list integration and meta-analysis. Bioinformatics, 28(4), 573-580.


res_rank <- function(..., method = "RRA"){

  a <- list(...)
  a <- lapply(a, function(x){
    res <- get_result(x)
    res <- rownames(res)
  })
  res_rank <- aggregateRanks(a, method = method)
  return(res_rank)
}

Try the immcp package in your browser

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

immcp documentation built on Nov. 14, 2020, 5:09 p.m.