• Overview • Features • Installation • Get started • Long-form documentations • Citation • Contributing • Acknowledgments • References
The package chessboard
provides functions to work with directed
(asymmetric) and undirected (symmetric) spatial (or non-spatial)
networks. It implements different methods to detect neighbors, all
based on the chess game (it goes beyond the rook and the queen) to
create complex connectivity scenarios.
chessboard
can handle spatial networks, but it does not explicitly use
geographical coordinates to find neighbors (it is not based on spatial
distance). Instead, it identifies neighbors according to node labels
(i.e. the node position on a two-dimension chessboard) and a specific
method (pawn, fool, rook, bishop, knight, queen, wizard, etc.).
It implements the following rules to detect neighbors and create edges:
the degree of neighborhood: the number of adjacent nodes that will be used to create direct edges.
the orientation of neighborhood: can neighbors be detected horizontally, vertically and/or diagonally?
the direction of neighborhood: does the sampling has a main direction? This can be particularly relevant for directed networks (e.g. rivers).
The main purpose of chessboard
is to create various network objects,
including:
chessboard
also provides different plotting functions (all based on
the ggplot2
package):
gg_matrix()
plots a (connectivity) matrixgg_chessboard()
plots the sampling as a chessboardRead the Visualization tools vignette for further details.
Finally, the package can also produce objects that will be used later in
Moran’s Eigenvector Maps
(MEM, Dray et al.
2006) and Asymetric Eigenvector Maps
(AEM, Blanchet et al.
2008), methods available in the package
adespatial
(Dray et
al. 2023):
The package is not yet published on the CRAN but you can install the development version from GitHub with:
# install.packages("remotes")
remotes::install_github("frbcesab/chessboard")
Then you can attach the package chessboard
:
library("chessboard")
For an overview of the main features of chessboard
, please read the
Get
started
vignette.
chessboard
provides three vignettes to learn more about the package:
chessboard
to
detect neighborschessboard
Please cite chessboard
as:
Casajus N, Rievrs Borges E, Tabacchi E, Fried G & Mouquet N (2023)
chessboard
: An R package for creating network connections based on chess moves. Journal of Open Source Software, 8, 5753. https://doi.org/10.21105/joss.05753.
All types of contributions are encouraged and valued. For more information, check out our Contributor Guidelines.
Please note that the chessboard
project is released with a
Contributor Code of
Conduct.
By contributing to this project, you agree to abide by its terms.
This package has been developed for the FRB-CESAB working group Bridge that aims to better understand the role of local and regional environmental factors in shaping the taxonomic and functional diversity of plant communities established along river corridors, roadside corridors and cultivated field margins.
Blanchet FG, Legendre P & Borcard D (2008) Modelling directional spatial processes in ecological data. Ecological Modelling, 215, 325-336. doi: 10.1016/j.ecolmodel.2008.04.001.
Csardi G & Nepusz T (2006) The igraph software package for complex network research. InterJournal, Complex Systems, 1695, 1-9. https://igraph.org/.
Dray S, Bauman D, Blanchet G et al. (2023) adespatial
: Multivariate
Multiscale Spatial Analysis. R package version 0.3-21,
https://CRAN.R-project.org/package=adespatial.
Dray S, Legendre P & Peres-Neto PR (2006) Spatial modeling: a comprehensive framework for principal coordinate analysis of neighbor matrices (PCNM). Ecological Modelling, 196: 483–93. doi: 10.1016/j.ecolmodel.2006.02.015.
Any scripts or data that you put into this service are public.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.