Views-utils(IRanges)
Views-utils()所属R语言包:IRanges
Utility functions and numeric summary of Views of numerics
数值计算次数的实用功能和数字汇总
译者:生物统计家园网 机器人LoveR
描述----------Description----------
The slice function creates a Views object that contains the indices where the data are within the specified bounds.
slice函数创建一个视图对象包含指定范围内的数据指标。
The viewMins, viewMaxs, viewSums, viewMeans functions calculate the minima, maxima, sums, and means on views respectively.
viewMins,viewMaxs,viewSums,viewMeans函数计算最小值,最大值,总结,对意见的手段分别。
用法----------Usage----------
viewApply(X, FUN, ..., simplify = TRUE)
slice(x, lower=-Inf, upper=Inf, ...)
## S4 method for signature 'Rle'
slice(x, lower=-Inf, upper=Inf,
includeLower=TRUE, includeUpper=TRUE,
rangesOnly = FALSE)
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)
参数----------Arguments----------
参数:X
A Views object.
一个视图对象。
参数:FUN
The function to be applied to each view in X.
被应用到每个X视图的功能。
参数:...
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 Rle, RleList, XInteger object or an integer vector for slice. An RleViews, RleViewsList, XIntegerViews or XDoubleViews object for viewMins, viewMaxs, viewSums, and viewMeans. An Rle, RleViewsList, XIntegerViews or XDoubleViews object for viewWhichMins and viewWhichMaxs.
一个RLE,RleList,XInteger对象或整数向量slice。一个RleViews,RleViewsList,viewMins,viewMaxs,viewSums,viewMeans的XIntegerViews或XDoubleViews的对象。 RLE,RleViewsList,XIntegerViews或viewWhichMins和viewWhichMaxsXDoubleViews的对象。
参数:lower, upper
The lower and upper bounds for the slice.
切片的上限和下限。
参数:includeLower, includeUpper
Logical indicating whether or not the specified boundary is open or closed.
逻辑说明是否指定的边界是开放或封闭。
参数:rangesOnly
For Rle and RleList objects, a logical indicating whether or not to drop the original data from the output.
对于RLE和RleList对象,逻辑指示是否下降从输出的原始数据。
参数:na.rm
Logical indicating whether or not to include missing values in the results.
逻辑说明是否包括在遗漏值的结果。
Details
详情----------Details----------
The slice function is useful for finding areas of absolute maxima (peaks), absolute minima (troughs), or fluctuations within specified limits.
slice函数是寻找绝对最大值(峰),绝对极小(槽),或在指定的范围内波动的领域非常有用。
The viewMins, viewMaxs, viewSums, and viewMeans functions provide efficient methods for calculating the specified numeric summary by performing the looping in compiled code.
viewMins,viewMaxs,viewSums,viewMeans功能提供有效的方法计算,在编译的代码循环执行指定的数字总结。
The viewWhichMins, viewWhichMaxs, viewRangeMins, and viewRangeMaxs functions provide efficient methods for finding the locations of the minima and maxima.
viewWhichMins,viewWhichMaxs,viewRangeMins,viewRangeMaxs功能提供有效的方法找到的最大值和最小值的位置。
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).
为方便起见,min,max,sum,mean,which.min和which.max周围包装提供相应的<X的方法>功能(在某些时候可能被弃用)。
值----------Value----------
An RleViews object for Rle or an RleViewsList for RleList containing the views when using slice with rangesOnly = FALSE. An IRanges object for Rle or a CompressedIRangesList for RleList containing the ranges when using slice with rangesOnly = TRUE. An XIntegerViews for an XInteger object when using slice. An XDoubleViews for an XDouble object when using slice.
为RLE或RleViewsList含有的意见RleList的一个RleViews对象,当使用slice用rangesOnly = FALSE。为IRanges RLE或CompressedIRangesList RleList包含的范围的对象,使用时slicerangesOnly = TRUE。一个XIntegerViews为XInteger对象时,使用slice。一个XDoubleViews为XDouble对象时,使用slice。
A vector of length(x) for RleViews, XIntegerViews and XDoubleViews objects, or a SimpleList object of length(x) for RleViewsList objects containing the numeric summaries for the views for viewMins, viewMaxs, viewSums, viewMeans, viewWhichMins, and viewWhichMaxs.
一个矢量length(x),XIntegerViews和XDoubleViews对象RleViews,或length(x)数字汇总的意见RleViewsList对象包含viewMins,viewMaxs,simplelist中对象viewSums,viewMeans,viewWhichMins,viewWhichMaxs。
An IRanges object for RleViews objects or a SimpleIRangesList for RleViewsList objects containing the location ranges for viewRangeMins and viewRangeMaxs.
viewRangeMins和viewRangeMaxs不等一个RleViews对象或为包含位置RleViewsList对象SimpleIRangesList IRanges对象。
作者(S)----------Author(s)----------
P. Aboyoun
参见----------See Also----------
RleViews-class, RleViewsList-class, XIntegerViews-class, which.min, colSums
,RleViewsList级RleViews级,级XIntegerViews,which.min,colSums
举例----------Examples----------
## Views derived from vector[#查看从向量的]
vec <- as.integer(c(19, 5, 0, 8, 5))
slice(vec, lower=5, upper=8)
set.seed(0)
vec <- sample(24)
vecViews <- slice(vec, lower=4, upper=16)
vecViews
viewApply(vecViews, function(x) diff(as.integer(x)))
viewMins(vecViews)
viewMaxs(vecViews)
viewSums(vecViews)
viewMeans(vecViews)
viewWhichMins(vecViews)
viewWhichMaxs(vecViews)
## Views derived from coverage[从覆盖派生#查看]
x <- IRanges(start=c(1L, 9L, 4L, 1L, 5L, 10L),
width=c(5L, 6L, 3L, 4L, 3L, 3L))
slice(coverage(x), lower=2)
slice(coverage(x), lower=2, rangesOnly = TRUE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|