AtomicList-utils {IRanges}R Documentation

Common operations on AtomicList objects

Description

Common operations on AtomicList objects.

Group Generics

AtomicList objects have support for S4 group generic functionality to operate within elements across objects:

Arith

"+", "-", "*", "^", "%%", "%/%", "/"

Compare

"==", ">", "<", "!=", "<=", ">="

Logic

"&", "|"

Ops

"Arith", "Compare", "Logic"

Math

"abs", "sign", "sqrt", "ceiling", "floor", "trunc", "cummax", "cummin", "cumprod", "cumsum", "log", "log10", "log2", "log1p", "acos", "acosh", "asin", "asinh", "atan", "atanh", "exp", "expm1", "cos", "cosh", "sin", "sinh", "tan", "tanh", "gamma", "lgamma", "digamma", "trigamma"

Math2

"round", "signif"

Complex

"Arg", "Conj", "Im", "Mod", "Re"

See S4groupGeneric for more details.

See AtomicList_summarization for operations from the Summary group generic and other summarization operations on AtomicList objects.

Other Methods

AtomicList objects also support a large number of basic methods. Like the group generics above, these methods perform the corresponding operation on each element of the list separately. The methods are:

Logical

!, which

Numeric

diff, pmax, pmax.int, pmin, pmin.int

Running Window

smoothEnds, runmed. runmean, runsum, runwtsum, runq

Character

nchar, chartr, tolower, toupper, sub, gsub, startsWith, endsWith

The rank method only supports tie methods “average”, “first”, “min” and “max”.

Since ifelse relies on non-standard evaluation for arguments that need to be in the generic signature, we provide ifelse2, which has eager but otherwise equivalent semantics.

Specialized Methods

unstrsplit(x, sep=""):

: A fast sapply(x, paste0, collapse=sep). See ?unstrsplit for the details.

Author(s)

P. Aboyoun

See Also

Examples

## group generics
int1 <- c(1L,2L,3L,5L,2L,8L)
int2 <- c(15L,45L,20L,1L,15L,100L,80L,5L)
col1 <- IntegerList(one = int1, int2)
2 * col1
col1 + col1
col1 > 2

[Package IRanges version 2.44.0 Index]