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
}

Try the DNAtools package in your browser

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

DNAtools documentation built on March 18, 2022, 7:01 p.m.