R/unbound.R

"unbound" <-
function(start, end=NULL) {
  if(is.matrix(start) && all(c("start", "end") %in% colnames(start))) {
     if(is.null(end)) end = start[, "end"]
     start = start[, "start"]
  }

  if(length(start)!=length(end))
    stop("start and end must are not the same length")
  ex <- NULL
  for(i in 1:length(start)) {
    ex <- c(ex, start[i]:end[i])
  }
  return(ex)
}

Try the bio3d package in your browser

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

bio3d documentation built on Oct. 27, 2022, 1:06 a.m.