R/CompressedGrouping-class.R

### =========================================================================
### CompressedGrouping objects
### -------------------------------------------------------------------------

setClass("CompressedGrouping",
### TODO: contain VIRTUAL after R 3.4 release
         contains=c("Grouping", "CompressedIntegerList"))

setClass("CompressedManyToOneGrouping",
         contains=c("ManyToOneGrouping", "CompressedGrouping"))

setClass("CompressedManyToManyGrouping",
         contains=c("BaseManyToManyGrouping", "CompressedGrouping"))

### -------------------------------------------------------------------------
### Grouping API implementation
### ----------------------------
###

setMethod("grouplengths", "CompressedGrouping",
          function(x, i=NULL) grouplengths(PartitioningByEnd(x), i))

setMethod("nobj", "CompressedManyToOneGrouping",
          function(x) nobj(PartitioningByEnd(x)))

Try the IRanges package in your browser

Any scripts or data that you put into this service are public.

IRanges documentation built on Dec. 14, 2020, 2 a.m.