MyNixOS website logo
Description

Create Network Connections Based on Chess Moves.

Provides functions to work with directed (asymmetric) and undirected (symmetric) spatial networks. It makes the creation of connectivity matrices easier, i.e. a binary matrix of dimension n x n, where n is the number of nodes (sampling units) indicating the presence (1) or the absence (0) of an edge (link) between pairs of nodes. Different network objects can be produced by 'chessboard': node list, neighbor list, edge list, connectivity matrix. It can also produce objects that will be used later in Moran's Eigenvector Maps (Dray et al. (2006) <doi:10.1016/j.ecolmodel.2006.02.015>) and Asymetric Eigenvector Maps (Blanchet et al. (2008) <doi:10.1016/j.ecolmodel.2008.04.001>), methods available in the package 'adespatial' (Dray et al. (2023) <https://CRAN.R-project.org/package=adespatial>). This work is part of the FRB-CESAB working group Bridge <https://www.fondationbiodiversite.fr/en/the-frb-in-action/programs-and-projects/le-cesab/bridge/>.

chessboard

R CMDCheck codecov Website License: GPL (>=2) status

Table of contents

Overview
Features
Installation
Get started
Long-form documentations
Citation
Contributing
Acknowledgments
References

Overview

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).

Features

The main purpose of chessboard is to create various network objects, including:

  • node list
  • edge list
  • connectivity matrix

chessboard also provides different plotting functions (all based on the ggplot2 package):

Read 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):

  • edges weights matrix
  • spatial weights matrix
  • nodes by edges matrix
  • edges weights vector

Installation

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")

Get started

For an overview of the main features of chessboard, please read the Get started vignette.

Long-form documentations

chessboard provides three vignettes to learn more about the package:

  • the Get started vignette describes the core features of the package
  • the Chess pieces vignette details the different methods implemented in chessboard to detect neighbors
  • the Visualization tools vignette describes the plotting functions available in chessboard

Citation

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.

Contributing

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.

Acknowledgments

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.

References

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.

Metadata

Version

0.1

License

Unknown

Platforms (75)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64_be-none
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-darwin
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • i686-darwin
  • i686-freebsd
  • i686-genode
  • i686-linux
  • i686-netbsd
  • i686-none
  • i686-openbsd
  • i686-windows
  • javascript-ghcjs
  • loongarch64-linux
  • m68k-linux
  • m68k-netbsd
  • m68k-none
  • microblaze-linux
  • microblaze-none
  • microblazeel-linux
  • microblazeel-none
  • mips-linux
  • mips-none
  • mips64-linux
  • mips64-none
  • mips64el-linux
  • mipsel-linux
  • mipsel-netbsd
  • mmix-mmixware
  • msp430-none
  • or1k-none
  • powerpc-netbsd
  • powerpc-none
  • powerpc64-linux
  • powerpc64le-linux
  • powerpcle-none
  • riscv32-linux
  • riscv32-netbsd
  • riscv32-none
  • riscv64-linux
  • riscv64-netbsd
  • riscv64-none
  • rx-none
  • s390-linux
  • s390-none
  • s390x-linux
  • s390x-none
  • vc4-none
  • wasm32-wasi
  • wasm64-wasi
  • x86_64-cygwin
  • x86_64-darwin
  • x86_64-freebsd
  • x86_64-genode
  • x86_64-linux
  • x86_64-netbsd
  • x86_64-none
  • x86_64-openbsd
  • x86_64-redox
  • x86_64-solaris
  • x86_64-windows