"Length of 'f' must equal length of 'x'"

stop("Length of 'f' must equal length of 'x'")
seqsplit(rep(x, elementLengths(f)), unlist(f, use.names = FALSE))

setGeneric("precede", function(x, subject = x, ...) standardGeneric("precede"))
function(x, subject, select = c("first", "all"))
setGeneric("follow", function(x, subject = x, ...) standardGeneric("follow"))
function(x, subject, select = c("last", "all"))
.hitsMatrixToVector <- function(hitsMatrix, queryLength) {
.vectorToHits <- function(i, srle, ord) {
m <- cbind(queryHits = rep(seq(lx)[v], w),
subjectHits = if (!is.null(ord)) ord[subj] else subj)
new("Hits", queryHits = unname(m[ , 1L]), subjectHits = unname(m[ , 2L]),
queryLength = lx, subjectLength = length(srle))
setGeneric("nearest", function(x, subject, ...) standardGeneric("nearest"))
function(x, subject, select = c("arbitrary", "all"))
ol <- findOverlaps(x, subject, select = select)
ol <- findOverlaps(x, select = select, ignoreSelf = TRUE)
if (select == "all") "all" else "first")
leftdist <- (start(subject)[before] - end(x))
rightdist <- (start(x) - end(subject)[after])
m <- rbind(m, filterMatchMatrix(before_m, left),
m <- m[orderIntegerPairs(m[,1L], m[,2L]),, drop=FALSE]
olv[is.na(olv)] <- ifelse(left, before, after)
function(x, subject = x, ...) standardGeneric("distanceToNearest"))
x_nearest <- nearest(x, select = select)
x_nearest <- nearest(x, subject, select = select)
x_nearest <- cbind(queryHits = seq_len(length(x)),

### Utility functions for checking/fixing user-supplied arguments
### We want these functions to return TRUE when passed an NA of whatever type.
### isNotStrictlySorted() takes for granted that 'x' contains no NAs (behaviour
### is undefined if this is not the case). This allows isNotStrictlySorted() to
### be MUCH faster than is.unsorted() in some situations:
###   > system.time(for (i in 1:1000) isNotStrictlySorted(x))
###   > system.time(for (i in 1:1000) is.unsorted(x, strictly=TRUE))
### So let's keep it for now! Until someone has enough time and energy to
### convince the R core team to fix is.unsorted()...
### Note that is.unsorted() does not only have a performance problem:
###   a) It also has a semantic problem: is.unsorted(NA) returns NA despite the
###      man page stating that all objects of length 0 or 1 are sorted (sounds
###   b) The sort()/is.unsorted() APIs and semantics are inconsistent.
###   c) Why did they choose to have is.unsorted() instead of is.sorted() in the
###      first place? Having is.unsorted( , strictly=TRUE) being a "looser test"
###      (or a "weaker condition") than is.unsorted( , strictly=FALSE) is really
###        > is.unsorted(c(5L, 5:8), strictly=FALSE)
###        > is.unsorted(c(5L, 5:8), strictly=TRUE)
###      Common sense would expect to have less objects that are "strictly
###      something" than objects that are "just something".
### For checking AND fixing (aka normalizing).
### recycleVector() vs rep(x, length.out=length):
###   - The former seems a little bit faster (1.5x - 2x).
###   - The former will issue a warning that "number of items to replace is not
###     a multiple of replacement length". The latter will always remain silent.
### Must always drop the names of 'arg'.
### We use a signature in the style of successiveIRanges() or
### The current implementation should be fast enough if length(x)/circle.length
### is small (i.e. < 10 or 20). This will actually be the case for the typical
### usecase which is the calculation of "circular coverage vectors", that is,
### we use fold() on the "linear coverage vector" to turn it into a "circular
### coverage vector" of length 'circle.length' where 'circle.length' is the
"'x' must be a vector-like object with elements that can be added"
"don't know how to handle 'x' of class "
### Other non exported normarg* functions.
"'start' must be a single integer or NA"
"' must be a vector or AtomicList object"
"'arg' must be a vector or AtomicList object"
"'k' must be odd when 'endrule != \"drop\"'!"
"'k' is bigger than 'n'! Changing 'k' to "