bind_ranges {plyranges} | R Documentation

## Combine Ranges by concatentating them together

### Description

Combine Ranges by concatentating them together

### Usage

    bind_ranges(..., .id = NULL)

### Arguments

`...` | Ranges objects to combine. Each argument can be a Ranges object, or a list of Ranges objects.
`.id` | Ranges object identifier. When .id is supplied a new column is created that links each row to the original Range object. The contents of the column correspond to the named arguments or the names of the list supplied.

### Value

a concatenated Ranges object

### Note

Currently GRangesList or IRangesList objects are not supported.

### Examples

    gr <- as_granges(data.frame(start = 10:15,
                                width = 5,
                                seqnames = "seq1"))
    gr2 <- as_granges(data.frame(start = 11:14,
                                width = 1:4,
                                seqnames = "seq2"))
    bind_ranges(gr, gr2)

    bind_ranges(a = gr, b = gr2, .id = "origin")

    bind_ranges(gr, list(gr, gr2), gr2)

    bind_ranges(list(a = gr, b = gr2), c = gr, .id = "origin")

[Package plyranges version 1.14.0 Index]