Nearest Neighbor Methods for Spatial Patterns

Contains the functions for testing the spatial patterns (of segregation, spatial symmetry, association, disease clustering, species correspondence, and reflexivity) based on nearest neighbor relations, especially using contingency tables such as nearest neighbor contingency tables (Ceyhan (2010) and Ceyhan (2017) and references therein), nearest neighbor symmetry contingency tables (Ceyhan (2014) ), species correspondence contingency tables and reflexivity contingency tables (Ceyhan (2018) for two (or higher) dimensional data. The package also contains functions for generating patterns of segregation, association, uniformity in a multi-class setting (Ceyhan (2014) ), and various non-random labeling patterns for disease clustering in two dimensional cases (Ceyhan (2014) ), and for visualization of all these patterns for the two dimensional data. The tests are usually (asymptotic) normal z-tests or chi-square tests.


This is an R package that contains the functions for generating patterns of segregation, association, Uniform data, and various non-random labeling patterns for disease clustering in two dimensional cases, and for testing the spatial patterns (of segregation, spatial symmetry, association, disease clustering, species correspondence and reflexivity) based on NN relations, especially using contingency tables such as nearest neighbor contingency tables, NN symmetry contingency tables, species correspondence contingency tables and reflexivity contingency tables for two- and higher-dimensional data, for visualization for the two dimensional data. The tests are usually (asymptotic) normal z-tests and chi-square tests.

Install from GitHub : devtools::install_github("elvanceyhan/nnspat")

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("nnspat")

0.1.2 by Elvan Ceyhan, 3 years ago


Browse source code at https://github.com/cran/nnspat


Authors: Elvan Ceyhan


Documentation:   PDF Manual  


GPL-2 license


Imports MASS, stats, graphics, pcds, Rdpack


See at CRAN