Summarize views on a vector-like object with numeric values
viewApply(X, FUN, ..., simplify = TRUE) viewMins(x, na.rm=FALSE) ## S4 method for signature 'Views' min(x, ..., na.rm = FALSE) viewMaxs(x, na.rm=FALSE) ## S4 method for signature 'Views' max(x, ..., na.rm = FALSE) viewSums(x, na.rm=FALSE) ## S4 method for signature 'Views' sum(x, ..., na.rm = FALSE) viewMeans(x, na.rm=FALSE) ## S4 method for signature 'Views' mean(x, ...) viewWhichMins(x, na.rm=FALSE) ## S4 method for signature 'Views' which.min(x) viewWhichMaxs(x, na.rm=FALSE) ## S4 method for signature 'Views' which.max(x) viewRangeMins(x, na.rm=FALSE) viewRangeMaxs(x, na.rm=FALSE)
X |
A Views object. |
FUN |
The function to be applied to each view in |
... |
Additional arguments to be passed on. |
simplify |
A logical value specifying whether or not the result should be simplified to a vector or matrix if possible. |
x |
An RleViews or RleViewsList object. |
na.rm |
Logical indicating whether or not to include missing values in the results. |
The viewMins
, viewMaxs
, viewSums
, and viewMeans
functions provide efficient methods for calculating the specified numeric
summary by performing the looping in compiled code.
The viewWhichMins
, viewWhichMaxs
, viewRangeMins
, and
viewRangeMaxs
functions provide efficient methods for finding the
locations of the minima and maxima.
For all the functions in this man page (except viewRangeMins
and
viewRangeMaxs
): A numeric vector of the length of x
if x
is an RleViews object, or a List object of
the length of x
if it's an RleViewsList object.
For viewRangeMins
and viewRangeMaxs
: An IRanges
object if x
is an RleViews object, or an IRangesList
object if it's an RleViewsList object.
For convenience, methods for min
, max
, sum
,
mean
, which.min
and which.max
are provided as
wrappers around the corresponding view*
functions (which might
be deprecated at some point).
P. Aboyoun
view-summarization-methods in the XVector package for more view summarization methods.
The RleViews and RleViewsList classes.
## Views derived from coverage x <- IRanges(start=c(1L, 9L, 4L, 1L, 5L, 10L), width=c(5L, 6L, 3L, 4L, 3L, 3L)) cvg <- coverage(x) cvg_views <- slice(cvg, lower=2) viewApply(cvg_views, diff) viewMins(cvg_views) viewMaxs(cvg_views) viewSums(cvg_views) viewMeans(cvg_views) viewWhichMins(cvg_views) viewWhichMaxs(cvg_views) viewRangeMins(cvg_views) viewRangeMaxs(cvg_views)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.