stop("isEmpty() is not defined for objects of class ",
setMethod("isEmpty", "List", function(x) all(elementLengths(x) == 0L))
nrow(x_mcols) == 0L && ncol(x_mcols) == 0L)
newList <- function(Class, listData, ..., mcols)
if (!extends(Class, "SimpleList") && !extends(Class, "CompressedList"))
stop("class ", Class, " must extend SimpleList or CompressedList")
stop("'listData' must be a list object")
if (is.array(listData)) { # drop any unwanted dimensions
dim(listData) <- NULL # clears the names
stop("all elements in 'listData' must be ", ans_elementType, " objects")
if (length(list) == 1 && is.list(list[[1L]]))
if (any(unlisted_i > rep.int(x_eltlens, i_eltlens)))
ans_skeleton <- PartitioningByEnd(group, NG=length(x), names=names(x))
ans <- as(relist(unlisted_ans, ans_skeleton), class(x))
stop("list-like subscript is longer than ",
stop("cannot subscript an unnamed list-like object ",
stop("list-like subscript has names not in ",
if (length(i2) == li && all(sapply(i, is, i2_elttype))) {
return(fast_path_FUN(x, i))  # fast path
warning("number of values supplied is not a sub-multiple ",
"of the number of values to be replaced")
.fast_lsubset_List_by_List <- function(x, i, value)
unlisted_ans <- replaceROWS(unlisted_x, unlisted_i, unlisted_value)
ans <- as(relist(unlisted_ans, x), class(x))
lsubset_List_by_List <- function(x, i, value)
stop("when list-like subscript is unnamed, it must have the ",
return(.fast_lsubset_List_by_List(x, i, value))  # fast path
stop("cannot subset an unnamed list-like object ",
stop("list-like subscript has duplicated names")
if (!missing(i) && (is.list(i) || (is(i, "List") && !is(i, "Ranges"))))
dotArgs <- dotArgs[names(dotArgs) != "exact"]
if (!missing(j) || length(dotArgs) > 0L)
setMethod("$", "List", function(x, name) x[[name, exact=FALSE]])
mapply_List <- function(FUN, ..., MoreArgs = NULL, SIMPLIFY = TRUE,
isListOrVector <- function(x) is.vector(x) | is(x, "List")
stop("all objects in ... should be a vector or 'List'")
elens <- sapply(seqs, length) ## elementLengths uses NROW, inappropriate
stop("all object lengths must be multiple of longest object length")
recycleExtract <- function(x, i) x[[(i - 1L) %% length(x) + 1L]]
do.call(FUN, c(lapply(seqs, recycleExtract, .__INDEX__), ...))
mapply(FUNprime, structure(seq_len(N), names = nms),
MoreArgs = MoreArgs, SIMPLIFY = SIMPLIFY,
mapply(FUN = FUN, ..., MoreArgs = MoreArgs, SIMPLIFY = FALSE)
as.list.List <- function(x, ...) .as.list.List(x, ...)
stop("cannot convert to environment when names are NULL")
listClassName <- function(impl, element.type) {
cl <- c(element.type, names(getClass(element.type)@contains), "")
listClass <- c(paste0(cl, "List"), paste0(impl, cl, "List"))
clExists <- which(sapply(listClass, isClass) &
contains <- lapply(cl, function(x) getClass(x, TRUE)@contains)
clnames <- names(cltab)[cltab == length(x)]
coerceToList <- function(from, element.type = NULL, ...) {
if (is(from, listClassName(NULL, element.type))) {
setAs("integer", "List", getMethod(coerce, c("ANY", "List")))
names1[idx] <- paste(names1[idx], names2[idx], sep = ".")
stop("\"unlist\" method for List objects ",
try_result <- try(names(ans) <- ans_names, silent=TRUE)
warning("failed to set names on the result ",
.stack.ind <- function(x, index.var = "name") {
ind <- Rle(factor(spaceLabels, levels = unique(spaceLabels)),
do.call(DataFrame, structure(list(ind), names = index.var))
function(x, index.var = "name", value.var = "value", name.var = NULL)
function(expr, envir, enclos = parent.frame())
nD <- length(del <- setdiff(names(data), (nl <- names(l))))
function (what, args, quote = FALSE, envir = parent.frame()) {