as_ranges {plyranges} | R Documentation

## Coerce an Rle or RleList object to Ranges

### Description

Coerce an Rle or RleList object to Ranges

### Usage

    as_ranges(.data)

### Arguments

`.data` | a `Rle()` or an `RleList()` object.

### Details

This function is behind `compute_coverage()`.

### Value

an `IRanges()` object if the input is an `Rle()` object or a `GRanges()` object for an `RleList()` object.

### See Also

`S4Vectors::Rle()`,`IRanges::RleList()`

### Examples

    x <- Rle(10:1, 1:10)
    as_ranges(x)

    y <- RleList(x)
    as_ranges(x)

[Package plyranges version 1.4.4 Index]