normalizeSingleBracketSubscript <- function(i, x, byrow=FALSE, exact=TRUE,
stop("'allow.append' must be TRUE or FALSE")
} else if (allow.append && is(i, "Ranges")) {
stop("subscript contains NAs or out of bounds indices")
stop("cannot mix negative with positive indices")
stop("subscript is a logical vector with out of bounds ",
stop("cannot subset by character when ", what, " are NULL")
i <- match(i, x_names, incomparables=c(NA_character_, ""))
i <- pmatch(i, x_names, duplicates.ok=TRUE)
stop("subscript contains invalid ", what)
normalizeDoubleBracketSubscript <- function(i, x, exact=TRUE,
stop("'error.if.nomatch' must be TRUE or FALSE")
if (is.vector(i) && length(i) == 1L && is.na(i)) {
stop("subsetting by NA returns no match")
stop("invalid subscript type '", class(i), "'")
stop("attempt to extract less than one element")
stop("attempt to extract more than one element")
stop("attempt to extract by name when elements have no names")
ans <- match(i, x_names, incomparables=c(NA_character_, ""))
ans <- pmatch(i, x_names, duplicates.ok=TRUE)
stop("subscript \"", i, "\" matches no name")
value <- try(as(value, class(x)), silent=TRUE)
stop("'value' must be a ", class(x), " object (or coercible ",
stop("coercing replacement value to ", class(x), "\n",
"  but first make sure this coercion does what you want.")

"only one of 'n' and 'width' can be specified"
## The floor() is itentional for compatibility with Jim Kent's BigWig code

setGeneric("tile", function(x, n, width, ...) standardGeneric("tile"))
setMethod("tile", "Ranges", function(x, n, width) {
stop("only one of 'n' and 'width' can be specified")
stop("some width(x) are less than 'width'")
tile.end <- floor(as.integer(IRanges(rep(1L, length(n)), width=n)) *
tile.end.abs <- tile.end + rep(start(x), n) - 1L

## Functions for updating old TypedList to new infrastructure
## "LogicalList" -> "SimpleLogicalList" or "CompressedLogicalList"
## "IntegerList" -> "SimpleIntegerList" or "CompressedIntegerList"
## "NumericList" -> "SimpleNumericList" or "CompressedNumericList"
## "ComplexList" -> "SimpleComplexList" or "CompressedComplexList"
## "CharacterList" -> "SimpleCharacterList" or "CompressedCharacterList"
## "RawList" -> "SimpleRawList" or "CompressedRawList"
## "RleList" -> "SimpleRleList" or "CompressedRleList"
## "IRangesList" -> "SimpleIRangesList" or "CompressedIRangesList"
## "SplitXDataFrameList" -> "SimpleSplitDataFrameList" or "CompressedSplitDataFrameList"