R/segLength.R

Defines functions .segLength

#' @importFrom utils head
#' @importFrom utils tail
.segLength <- function(uniqueLoc, verbose) {

  dist <- diff(x = uniqueLoc$loc)*
          {utils::tail(x = uniqueLoc$chr, n = -1L) == 
           utils::head(x = uniqueLoc$chr, n = -1L)}

  return( c(dist, 0.0) )
}

Try the CONCUR package in your browser

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

CONCUR documentation built on June 7, 2022, 5:07 p.m.