summarise.Ranges {plyranges} | R Documentation

## Aggregate a Ranges object

### Description

Aggregate a Ranges object

### Usage

    ## S3 method for class 'Ranges'
    summarise(.data, ...)

### Arguments

`.data` | a Ranges object
`...` | Name-value pairs of summary functions.

### Value

a `S4Vectors::DataFrame()`

### See Also

`dplyr::summarise()`

### Examples

    df <- data.frame(start = 1:10, width = 5,  seqnames = "seq1",
    strand = sample(c("+", "-", "*"), 10, replace = TRUE), gc = runif(10))
    rng <- as_granges(df)
    rng %>% summarise(gc = mean(gc))
    rng %>% group_by(strand) %>% summarise(gc = mean(gc))

[Package plyranges version 1.6.10 Index]