prototype = prototype(elementType = "DataFrame"),
prototype = prototype(elementType = "DataFrame",
CharacterList(lapply(x, rownames, do.NULL = do.NULL, prefix = prefix))
CharacterList(lapply(x, colnames, do.NULL = do.NULL, prefix = prefix))
nms <- colnames(x[[1]], do.NULL = do.NULL, prefix = prefix)
nms <- colnames(x@unlistData, do.NULL = do.NULL, prefix = prefix)
lapply(x@listData, function(y) {rownames(x) <- NULL; x})
stop("replacement value must be the same length as x")
stop("replacement value must either be NULL or a CharacterList")
lapply(x@listData, function(y) {colnames(y) <- NULL; y})
stop("replacement value must be a list")
x@listData <- lapply(x@listData, function(xi) {
if (length(x) && !is(x, "CompressedList")) {
if (!all(sapply(l, function(df) identical(firstNames, colnames(df)))))
return("column counts or names differ across elements")
firstMetaData <- mcols(x[[1L]]) # could be NULL
return("metadata columns must be identical across elements")
if (length(listData) == 1 && is.list(listData[[1L]]) &&
if (length(listData) > 0 && !is(listData[[1L]], "DataFrame"))
listData <- lapply(listData, as, "DataFrame")
SplitDataFrameList <- function(..., compress = TRUE, cbindArgs = FALSE)
names(listData) <- paste("X", seq_len(length(listData)), sep = "")
listData <- do.call(Map, c(list(DataFrame), listData))
} else if (any(!sapply(listData, is, "DataFrame")))
x@listData <- lapply(x@listData, function(y) y[,j,drop=FALSE])
(length(x@listData) > 0) && (ncol(x@listData[[1L]]) == 1) &&
c("raw", "logical", "integer", "numeric", "character",
x <- SimpleAtomicList(lapply(x@listData, "[[", 1))
x <- IRangesList(lapply(x@listData, "[[", 1), compress=FALSE)
x <- RangesList(lapply(x@listData, "[[", 1))
x@unlistData <- x@unlistData[, j, drop=FALSE]
(ncol(x@unlistData) == 1) && (missing(drop) || drop)) {
value <- callNextMethod()  # call default method
if (length(x) != 0L && ncol(x)[[1L]] == ncol(value)[[1L]])
ans <- callNextMethod(x=x, i=i, value=value)
j <- extractROWS(setNames(seq_len(ncol(x)[[1L]]), colnames(x)[[1L]]), j)
} else if (is.list(i) || (is(i, "List") && !is(i, "Ranges"))) {
y@unlistData <- y@unlistData[indices, , drop=FALSE]
indices <- structure(seq_len(length(x)), names = names(x))
stop(class(x), " objects not supported")
as.data.frame.DataFrameList <- function(x, row.names=NULL, optional=FALSE, ...)
stop("'row.names' must be NULL or a character vector")
warning("'optional' and arguments in '...' ignored")
as.data.frame(stacked, row.names = row.names, optional = optional)
cat(classNameForDisplay(object), " of length ", k, "\n",
sketch <- function(x) c(head(x, 3), "...", tail(x, 3))