inst/demo_srcs/IRanges/R/multisplit.R

### =========================================================================
### multisplit()
### -------------------------------------------------------------------------
###


multisplit <- function(x, f) {
  if (!is.list(f) && !is(f, "List"))
    stop("'f' must be a list")
  if (length(x) != length(f))
    stop("Length of 'f' must equal length of 'x'")
  splitAsList(rep(x, elementNROWS(f)), unlist(f, use.names = FALSE))
}
vjcitn/BiocQE documentation built on Dec. 30, 2021, 12:20 a.m.