kzmd: Yet Another Multi-dimensional Kolmogorov-Zurbenko Filter

Description Usage Arguments Value See Also Examples

Description

This implement of spatial KZ-filter works for any dimensions. It is designed for cases with sparse data in large time-space.

Usage

1
kzmd(ss, window, scale, k = 1, edges = TRUE)

Arguments

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.

Value

Data framework with value column behind time/space coordinates.

See Also

kz

Examples

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)

kzfs documentation built on June 2, 2019, 5:04 p.m.

Related to kzmd in kzfs...