The goal of declusteringr is to declustering spatial data. This package offers support for the sf spatial objects.

Installation

You can install the development version of declusteringr with:

Examples

Let’s start with reading the data:

Cell declustering

This is a basic example of cell declustering:

Plot input data and weighted points:

par(mfrow = c(1, 2))
plot(st_geometry(points4), main = "original data")
plot(x["received_weights"], main = "cell declustering",
     key.pos = NULL, reset = FALSE)

declstr_weighted() is adding the following columns: received_weights

  • the weight of each cell, and lengths - a number of points in cell. declstr_weighted() does not change the number of features. Weights are calculated according to the equation:

pattern

, where ni is the number of samples in the cell in which sample j is located and n is the total number cells with samples.

References

  1. Declustering and Debiasing - M. J. Pyrcz () and C. V. Deutsch (), Centre for Computational Geostatistics University of Alberta, Edmonton, Alberta, CANADA
  2. Cell Declustering Parameter Selection - C. V. Deutsch
  3. Nowosad, J., (2019). Geostatystyka w R. Poznań: Space A. ISBN 978-83-953296-0-9. Online: https://bookdown.org/nowosad/Geostatystyka/
  4. Nowosad, J., (2019). Elementarz programisty: wstęp do programowania używając R. Poznań: Space A. Online: https://nowosad.github.io/elp/
  5. Lovelace, Robin & Nowosad, Jakub & Muenchow, Jannes. (2019). Geocomputation with R. 10.1201/9780203730058.
  6. R Packages, H. Wickham, J. Bryan. Online: https://r-pkgs.org/ (2015)