R/reverseList.R

Defines functions reverseList

Documented in reverseList

#' reverse List
#' @param lhs: list with names
#' @export
#' @author Kai Guo
reverseList<-function(lhs){
  lhs_n<-rep(names(lhs),times=lapply(lhs,function(x)length(x)))
  res<-sf(as.data.frame(cbind(lhs_n,unlist(lhs))))
  return(res)
}
guokai8/EnrichR documentation built on May 18, 2020, 5:29 a.m.