Rle-class

Rle objects

The Rle class is a general container for storing an atomic vector that is stored in a run-length encoding format. It is based on the rle function from the base package.

Keywords
classes, methods
See Also

Rle-utils, Rle-runstat, and aggregate for more operations on Rle objects.

rle

Vector-class

Aliases
  • class:Rle
  • Rle-class
  • Rle
  • Rle,ANY-method
  • Rle,Rle-method
  • length,Rle-method
  • runLength
  • runLength,Rle-method
  • runValue
  • runValue,Rle-method
  • nrun
  • nrun,Rle-method
  • start,Rle-method
  • end,Rle-method
  • width,Rle-method
  • runLength<-
  • runLength<-,Rle-method
  • runValue<-
  • runValue<-,Rle-method
  • as.vector,Rle-method
  • as.vectorORfactor
  • as.vectorORfactor,Rle-method
  • as.factor,Rle-method
  • as.data.frame,Rle-method
  • as.list,Rle-method
  • coerce,Rle,list-method
  • coerce,vector,Rle-method
  • coerce,logical,Rle-method
  • coerce,integer,Rle-method
  • coerce,numeric,Rle-method
  • coerce,complex,Rle-method
  • coerce,character,Rle-method
  • coerce,raw,Rle-method
  • coerce,factor,Rle-method
  • coerce,Rle,vector-method
  • coerce,Rle,logical-method
  • coerce,Rle,integer-method
  • coerce,Rle,numeric-method
  • coerce,Rle,complex-method
  • coerce,Rle,character-method
  • coerce,Rle,raw-method
  • coerce,Rle,factor-method
  • coerce,Rle,data.frame-method
  • extractROWS,Rle,ANY-method
  • [,Rle-method
  • [<-,Rle-method
  • extractROWS,Rle,RangeNSBS-method
  • rev.Rle
  • rev,Rle-method
  • rep.int,Rle-method
  • rep,Rle-method
  • c,Rle-method
  • append,Rle,vector-method
  • append,vector,Rle-method
  • %in%,Rle,ANY-method
  • findRun
  • findRun,Rle-method
  • is.na,Rle-method
  • is.unsorted,Rle-method
  • match,Rle,ANY-method
  • show,Rle-method
  • showAsCell,Rle-method
  • order,Rle-method
  • sort,Rle-method
  • table,Rle-method
  • unique,Rle-method
  • duplicated,Rle-method
  • setdiff,Rle,Rle-method
  • setdiff,ANY,Rle-method
  • setdiff,Rle,ANY-method
  • intersect,Rle,Rle-method
  • intersect,ANY,Rle-method
  • intersect,Rle,ANY-method
  • union,Rle,Rle-method
  • union,ANY,Rle-method
  • union,Rle,ANY-method
Examples
x <- Rle(10:1, 1:10)
  x

  runLength(x)
  runValue(x)
  nrun(x)

  diff(x)
  unique(x)
  sort(x)
  x[c(1,3,5,7,9)]
  x > 4

  x2 <- Rle(LETTERS[c(21:26, 25:26)], 8:1)
  table(x2)

  y <- Rle(c(TRUE,TRUE,FALSE,FALSE,TRUE,FALSE,TRUE,TRUE,TRUE))
  y
  as.vector(y)
  rep(y, 10)
  c(y, x > 5)
Documentation reproduced from package S4Vectors, version 0.10.1, License: Artistic-2.0

Community examples

Looks like there are no examples yet.