A.4 Grouping Ranges
plyranges introduces a new class of Ranges called RangesGrouped
, this is
a similar idea to the grouped data.frame\tibble
in dplyr.
Grouping can act on either the core components or the metadata columns of a Ranges object.
It is most effective when combined with other verbs such as mutate()
,
summarise()
, filter()
, reduce_ranges()
or disjoin_ranges()
.
#> GRanges object with 7 ranges and 1 metadata column:
#> Groups: strand [2]
#> seqnames ranges strand | gc
#> <Rle> <IRanges> <Rle> | <numeric>
#> [1] chr2 1-10 - | 0.889454
#> [2] chr2 2-11 + | 0.180407
#> [3] chr1 3-12 - | 0.629391
#> [4] chr2 4-13 + | 0.989564
#> [5] chr1 5-14 - | 0.130289
#> [6] chr1 6-15 - | 0.330661
#> [7] chr2 7-16 - | 0.865121
#> -------
#> seqinfo: 2 sequences from an unspecified genome; no seqlengths