R/api-utils.R

Defines functions dots2list

# utility function derived from IRanges

#' @importFrom methods is

dots2list <- function(...) {
  list_data <- list(...)
  if (length(list_data) == 1) {
    arg1 <- list_data[[1]]
    if (is.list(arg1) || is(arg1, "List")) {
      list_data <- arg1
    }
    # else if (type == "integer" && class(arg1) == "character")
    # list_data <- strsplitAsListOfIntegerVectors(arg1) # weird special case
  }
  list_data
}

Try the biocompute package in your browser

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

biocompute documentation built on May 3, 2022, 9:08 a.m.