Description Usage Arguments Value Note Author(s) See Also Examples
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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 | ## "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.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 | 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.