R/dbCats.R

Defines functions dbCats

## Creates a matrix/list of cell names
dbCats <- function(nloci, vector = FALSE) {
  res <- outer(0:nloci, 0:nloci, function(i, j) paste(i, j, sep = "/"))
  res[!up.tri(res)] <- NA
  if (vector) 
    res <- t(res)[up.tri(res)]
  res
}
mikldk/DNAtools documentation built on Jan. 7, 2023, 10:42 a.m.