Summarize views on an XInteger or XDouble object
The viewMins
, viewMaxs
, viewSums
, and viewMeans
methods described here calculate respectively the minima, maxima, sums,
and means of the views in an XIntegerViews or XDoubleViews
object.
## "viewMins" methods: ## ------------------- ## S4 method for signature 'XIntegerViews' viewMins(x, na.rm=FALSE) ## S4 method for signature 'XDoubleViews' viewMins(x, na.rm=FALSE) ## "viewMaxs" methods: ## ------------------- ## S4 method for signature 'XIntegerViews' viewMaxs(x, na.rm=FALSE) ## S4 method for signature 'XDoubleViews' viewMaxs(x, na.rm=FALSE) ## "viewSums" methods: ## ------------------- ## S4 method for signature 'XIntegerViews' viewSums(x, na.rm=FALSE) ## S4 method for signature 'XDoubleViews' viewSums(x, na.rm=FALSE) ## "viewMeans" methods: ## -------------------- ## S4 method for signature 'XIntegerViews' viewMeans(x, na.rm=FALSE) ## S4 method for signature 'XDoubleViews' viewMeans(x, na.rm=FALSE) ## "viewWhichMins" methods: ## ------------------------ ## S4 method for signature 'XIntegerViews' viewWhichMins(x, na.rm=FALSE) ## S4 method for signature 'XDoubleViews' viewWhichMins(x, na.rm=FALSE) ## "viewWhichMaxs" methods: ## ------------------------ ## S4 method for signature 'XIntegerViews' viewWhichMaxs(x, na.rm=FALSE) ## S4 method for signature 'XDoubleViews' viewWhichMaxs(x, na.rm=FALSE)
x |
An XIntegerViews or XDoubleViews object. |
na.rm |
Logical indicating whether or not to include missing values in the results. |
A numeric vector of the length of x
.
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
slice-methods for slicing an XInteger or XDouble object.
view-summarization-methods in the IRanges package for the view summarization generics.
The XIntegerViews and XDoubleViews classes.
set.seed(0) vec <- sample(24) vec_views <- slice(vec, lower=4, upper=16) vec_views viewApply(vec_views, function(x) diff(as.integer(x))) viewMins(vec_views) viewMaxs(vec_views) viewSums(vec_views) viewMeans(vec_views) viewWhichMins(vec_views) viewWhichMaxs(vec_views)
Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.