.do_rledf_views {genoset} | R Documentation

## Calculate min/max/sum/mean/whichmin/whichmax over each view on each column of an RleDataFrame.

### Description

Loop over the Rle objects in an RleDataFrame, calculate the appropriate statistic for each view. If simplify == FALSE, this function returns a vector for each Rle. If simplify == TRUE, it returns a vector for the case of a single view, otherwise, a matrix. Rownames for the matrix are taken from the names of the argument `bounds`.

### Usage

    .do_rledf_views(x, bounds, na.rm = FALSE, simplify = TRUE, RLEFUN,
      FUN.TYPE = c("numeric", "double", "integer", "logical"))

### Arguments

`x` | RleDataFrame
`bounds` | IRanges or matrix, views on every Rle. If `bounds` is a matrix, it is converted to an IRanges using the first two columns as the starts and stops. Names for the IRanges are taken from the rownames of the matrix. Such a matrix can be constructed with `boundingIndicesByChr`.
`na.rm` | scalar logical, ignore NAs in calculations?
`simplify` | scalar logical, simplify result? For a single view, a vector, otherwise a matrix with one row per view.
`RLEFUN` | function, internal rle view summary function like .rle_view_means
`FUN.TYPE` | scalar character, the storage mode for the returned vector or matrix (when simplify==TRUE).

### Value

With `simplify == TRUE`, a vector for single view or a matrix otherwise. When `simplify == FALSE`, a list of vectors length ncol(x) where each element is of length `nrows(bounds)`.

### See Also

RleDataFrame boundingIndicesByChr

Other views: `.do_rledf_range_summary`

[Package genoset version 1.45.1 Index]