ma.matrix(OLIN)
ma.matrix()所属R语言包:OLIN
Calculation of moving average for a matrix
移动平均线的计算矩阵
译者:生物统计家园网 机器人LoveR
描述----------Description----------
Using a sliding square window this function produces
使用此功能产生滑动的方形窗口
用法----------Usage----------
ma.matrix(X,av="median",delta= 2,edgeNA=FALSE )
参数----------Arguments----------
参数:X
matrix
矩阵
参数:av
averaging by mean or median (default)
平均均值或中位数(默认)
参数:delta
integer determining the size of the sliding square window (2*delta+1)x(2*delta+1).
整数确定滑动的方形窗的大小(2 *Delta+1)×(2 *Delta+1)。
参数:edgeNA
treatment of edges of array: For edgeNA=TRUE, averaged values of sliding windows are set to NA if the corresponding windows extend over the edges of the matrix.
阵列的边缘处理:,edgeNA=TRUE平均滑动窗口的值设置为NA如果相应的窗口延伸到矩阵的边缘。
Details
详情----------Details----------
A square window with size (2*delta+1)x(2*delta+1) is moved over the entire matrix and a new matrix is created with each value equals the average value in the corresponding window. This procedure defines a local regression of zeroth order.
一个面积窗口(2 *Delta+1)x(2 *Delta+1)被感动了整个矩阵和每个值创建一个新的矩阵等于平均值在相应的窗口。这个程序定义了一个局部回归零阶。
值----------Value----------
Matrix with average values of matrix X.
矩阵与矩阵X平均值。
作者(S)----------Author(s)----------
Matthias E. Futschik (<a href="http://itb.biologie.hu-berlin.de/~futschik">http://itb.biologie.hu-berlin.de/~futschik</a>)
参见----------See Also----------
ma.vector
ma.vector
举例----------Examples----------
### LOADING DATA[#加载数据]
data(sw)
### GENERATION OF MATRIX [#生成矩阵]
Morig <- v2m(maM(sw)[,1],Ngc=maNgc(sw),Ngr=maNgr(sw),Nsc=maNsc(sw),Nsr=maNsr(sw),visu=TRUE)
### AVERAGING BY MA.MATRIX[#平均按MA.MATRIX]
Mav <- ma.matrix(Morig,av="median",delta= 2,edgeNA=FALSE )
### VISUALISATION [##可视化]
m2v(Mav,Ngc=maNgc(sw),Ngr=maNgr(sw),Nsc=maNsc(sw),Nsr=maNsr(sw),visu=TRUE)
转载请注明:出自 生物统计家园网(http://www.biostatistic.net)。
注:
注1:为了方便大家学习,本文档为生物统计家园网机器人LoveR翻译而成,仅供个人R语言学习参考使用,生物统计家园保留版权。
注2:由于是机器人自动翻译,难免有不准确之处,使用时仔细对照中、英文内容进行反复理解,可以帮助R语言的学习。
注3:如遇到不准确之处,请在本贴的后面进行回帖,我们会逐渐进行修订。
|