Description Usage Arguments Details Value Author(s) See Also Examples
Using a sliding square window this function produces the moving average for a matrix.
1 |
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). |
edgeNA |
treatment of edges of array: For |
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.
Matrix with average values of matrix X
.
Matthias E. Futschik (http://itb.biologie.hu-berlin.de/~futschik)
1 2 3 4 5 6 7 8 9 10 11 | ### 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
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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.