is.logical(x) && length(x) == 1L && !is.na(x)
is.integer(x) && length(x) == 1L && !is.na(x)
is.numeric(x) && length(x) == 1L && !is.na(x)
is.character(x) && length(x) == 1L && !is.na(x)
is.atomic(x) && length(x) == 1L && (is.numeric(x) || is.na(x))
is.atomic(x) && length(x) == 1L && (is.character(x) || is.na(x))
anyMissing <- function(x) .Call2("anyMissing", x, PACKAGE="IRanges")
is.numeric(x) || (is.atomic(x) && is.vector(x) && all(is.na(x)))
isNotSorted <- function(x) .Internal(is.unsorted(x, FALSE))
isNotStrictlySorted <- function(x) .Internal(is.unsorted(x, TRUE))
if (is.numeric(x) && !is.integer(x)) as.integer(x) else x
recycleArg <- function(arg, argname, length.out)
stop("invalid length for '", argname, "'")
return(recycleVector(arg, length.out))  # drops the names
stop("'", argname, "' is longer than 'x'")
arg <- recycleVector(arg, length.out)  # drops the names
recycleIntegerArg <- function(arg, argname, length.out)
recycleNumericArg <- function(arg, argname, length.out)
stop("'", argname, "' must be a numeric vector")
fold <- function(x, circle.length, from=1)
if (typeof(x) != "S4" && !is.numeric(x) && !is.complex(x))
stop("'x' must be a vector-like object with elements that can be added")
from <- 1L + (from - 1L) %% circle.length
ans <- as(rep.int(0L, circle.length), class(x))
stop("don't know how to handle 'x' of class ", class(x))
jj <- seq_len(length(x)) + circle.length - from + 1L
max_from <- length(x) - circle.length + 1L
stop("'start' must be a single integer or NA")
stop("'end' must be a single integer or NA")
normargAtomicList1 <- function(arg, List, lx, argname = deparse(substitute(arg)))
stop("'", argname,"' must be a vector or AtomicList object")
normargAtomicList2 <- function(arg, List, lx, eln, argname = deparse(substitute(arg)))
if (!(is.vector(arg) && length(arg) == 1L)) {
arg <- as(rep(recycleVector(arg, lx), eln), class(unlist(List())))
stop("'arg' must be a vector or AtomicList object")
arg <- mapply(recycleVector, arg, List(as.list(eln)))
warning(paste("'k' must be odd when 'endrule != \"drop\"'!",
warning("'k' is bigger than 'n'! Changing 'k' to ", k)
function(x, i, j, ..., .conditionPrefix=character())
warning(.conditionPrefix, "arguments beyond 'i' ignored")
stop(.conditionPrefix, "subscript 'i' is missing")
stop(.conditionPrefix, "invalid subscript 'i' type")
stop(.conditionPrefix, "attempt to select less than one element")
stop(.conditionPrefix, "attempt to select more than one element")
if (is.numeric(i) && (i < 1L || i > length(x)+1))
stop(.conditionPrefix, "subscript 'i' out of bounds")
&& (is.null(argnames) || any(argnames %in% c("", NA))))
stop("all extra arguments must be named")
if (!is.null(.valid.argnames) && !all(argnames %in% .valid.argnames))
paste("'", .valid.argnames, "'", sep="", collapse=", "))