Description Usage Arguments Value See Also Examples
This function is used to eliminate outliers from an area matrix.
1 | rubitMedianFilter(m, k = 15)
|
m |
a numerical matrix corresponding to an area. |
k |
an integer specifying the size of the smoothing window. It must be odd. |
A numerical matrix of the same dimension as m.
rubitLinearInterpolate
to get regular sampling after filtering.
1 2 3 4 5 6 7 8 9 10 11 12 13 | data(weevils_raw)
### Apply different 'k' values to a list of area matrices:
w15 <- lapply(weevils_raw, rubitMedianFilter, k = 15)
w101 <- lapply(weevils_raw, rubitMedianFilter, k = 101)
### See impacts of smoothing parameter 'k' on a trajectory:
## raw trajectory
plot(weevils_raw[['08']][1:100,'X'] ~ weevils_raw[['08']][1:100,'Y'], asp=1, type='l')
## acceptable level of smoothing
lines(w15[['08']][1:100,'X'] ~ w15[['08']][1:100,'Y'],col='green')
## oversmoothed
lines(w101[['08']][1:100,'X'] ~ w101[['08']][1:100,'Y'],col='red')
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.