R/closest.top.R

Defines functions closest.top

Documented in closest.top

closest.top <- function(x, dist.mat, top)
{
  dist <- as.matrix(dist.mat)
  vector <- dist[x,colnames(dist) != x]
  return(names(vector)[order(vector)[1:top]])
}

Try the bioDist package in your browser

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

bioDist documentation built on Nov. 8, 2020, 5:14 p.m.