S4Vectors (version 0.10.1)

Rle-utils: Common operations on Rle objects

Description

Common operations on Rle objects.

Arguments

See Also

Rle objects

S4groupGeneric

Examples

Run this code
x <- Rle(10:1, 1:10)
x

sqrt(x)
x^2 + 2 * x + 1
range(x)
sum(x)
mean(x)

z <- c("the", "quick", "red", "fox", "jumps", "over", "the", "lazy", "brown", "dog")
z <- Rle(z, seq_len(length(z)))
chartr("a", "@", z)
toupper(z)

Run the code above in your browser using DataCamp Workspace