R/balance.R

balance <- function(fplist) {
  if (is.list(fplist)) {
    lapply(fplist, function(fp) {
      compl <- !fp
      new('fingerprint',
          nbit = 2 * length(fp),
          bits = c(fp@bits, compl@bits+length(fp)),
          provider='R', name='balanced')
    })
  } else {
    fp <- fplist
    compl <- !fp
    new('fingerprint',
        nbit = 2 * length(fp),
        bits = c(fp@bits, compl@bits+length(fp)),
        provider='R', name='balanced')    
  }
}

Try the fingerprint package in your browser

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

fingerprint documentation built on May 2, 2019, 2:42 a.m.