spEMD
2D EMD for spatial objects
spEMD(data, zcol = "z", method = "splines", n.imf.max = 10, n.sp.max = 5, n.extrema.min = 1, stoprule = "mean.imf", stoprule.extrema = TRUE, thresh.extrema = 1, tol = 0, diff.nb.extrema = 0.05, abs.nb.extrema = 5, nb.nn = 4, n.pts.spline = 4, neig = NULL, save_neig = TRUE, verbose = TRUE)
data
: Input dataset, either a data.frame
or a Spatial*DataFrame
zcol
: Name of the column containing the attribute of interest.method
: Interpolation method. Currently only splines
is supported.n.imf.max
: Maximum depth of decomposition (maximum number of IMF).n.sp.max
: Number of iterations in the sifting process.n.extrema.min
: Minimum number of extrema.stoprule
: Rule used to stop the EMD process. Currently only mean.imf
is implemented.stoprule.extrema
: Should spEMD
checks for the number of extrema to be similar? Defaults to TRUE
.thresh.extrema
: Significative threshold for the extrema. Defaults to 1.tol
: Value that the avergae of the IMF candidate need to reach so to be considered as a valid IMF.diff.nb.extrema
: Percentage limit difference maxima/minima. If smaller, more permissive on the mean of the IMF candidate.abs.nb.extrema
: Absolute difference between number of extrema.nb.nn
: Number of nearest neighbours to take into account (when data is on a regular grid).n.pts.spline
: Number of points to locally interpolate IMFs.neig
: Option the re-use a formerly existing neig object in order to save time.save_neig
: Option to save the neig object as a .RData file once created.verbose
: Prints progress information messages. Defaults to TRUE..
# Getting sample data from the gstat package if (require(gstat)) { library(sp) # Example for gridded data data(ncp.grid, package = 'gstat') coordinates(ncp.grid) <- ~x+y gridded(ncp.grid) <- TRUE res.ncp <- spEMD(ncp.grid, zcol = "depth", thresh.extrema = 0.1, verbose = FALSE) # Plot results spplot(res.ncp[, c('imf1', "imf2", "imf3")]) } #
Pierre Roudier