Description Usage Arguments Value See Also Examples
This implement of spatial KZ-filter works for any dimensions. It is designed for cases with sparse data in large time-space.
1 |
ss |
Data frame with value column behind time/space coordinates. |
window |
Vector for window size of each dimension. |
scale |
Vector for scale of each dimension. |
k |
Iteration times of KZ filter. Defaults to 1. |
edges |
Logic. Defaults to TRUE. FLASE means clear the data that are located outside the time-space range of input data. |
Data framework with value column behind time/space coordinates.
1 2 3 4 5 6 7 8 | zs <- rbind(c(0,5,1,40),c(12,6,1,10),c(6,7,1,20),c(15,15,4,80))
colnames(zs) <- c("x","y","z","v")
zs <- kzmd(data.frame(zs), scale=c(1,1,1), window=c(3,5,3), k=4)
u <- zs[zs$z==1, -3]
x = sort(unique(u$x))
y = sort(unique(u$y))
z=df2mt(u, scale=c(1,1)) # Transfer from data frame to matrix.
image(x=x, y=y, z=z)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.