Package: BoundaryStats 2.2.0

Amy Luo
BoundaryStats: Boundary Overlap Statistics
Analysis workflow for finding geographic boundaries of ecological or landscape traits and comparing the placement of geographic boundaries of two traits. If data are trait values, trait data are transformed to boundary intensities based on approximate first derivatives across latitude and longitude. The package includes functions to create custom null models based on the input data. The boundary statistics are described in: Fortin, Drapeau, and Jacquez (1996) <doi:10.2307/3545584>.
Authors:
BoundaryStats_2.2.0.tar.gz
BoundaryStats_2.2.0.tar.gz(r-4.5-noble)BoundaryStats_2.2.0.tar.gz(r-4.4-noble)
BoundaryStats_2.2.0.tgz(r-4.4-emscripten)BoundaryStats_2.2.0.tgz(r-4.3-emscripten)
BoundaryStats.pdf |BoundaryStats.html✨
BoundaryStats/json (API)
NEWS
# Install 'BoundaryStats' in R: |
install.packages('BoundaryStats', repos = 'https://cloud.r-project.org') |
- A.delicatus_crs - Afrixalus delicatus genetic groups projection
- A.delicatus_ext - Afrixalus delicatus genetic groups extent
- A.delicatus_matrix - Afrixalus delicatus genetic groups
- A.sylvaticus_crs - Afrixalus sylvaticus genetic groups projection
- A.sylvaticus_ext - Afrixalus sylvaticus genetic groups extent
- A.sylvaticus_matrix - Afrixalus sylvaticus genetic groups
- L.concolor_crs - Leptopelis concolor genetic groups projection
- L.concolor_ext - Leptopelis concolor genetic groups extent
- L.concolor_matrix - Leptopelis concolor genetic groups
- L.flavomaculatus_crs - Leptopelis flavomaculatus genetic groups projection
- L.flavomaculatus_ext - Leptopelis flavomaculatus genetic groups extent
- L.flavomaculatus_matrix - Leptopelis flavomaculatus genetic groups
- T.cristatus_crs - Triturus cristatus genetic groups projection
- T.cristatus_ext - Triturus cristatus genetic groups extent
- T.cristatus_matrix - Triturus cristatus genetic groups
- ecoregions_crs - Ecoregion data for East Africa projection
- ecoregions_ext - Ecoregion data for East Africa extent
- ecoregions_matrix - Ecoregion data for East Africa
- grassland_crs - Grassland land cover projection
- grassland_ext - Grassland land cover extent
- grassland_matrix - Grassland land cover
This package does not link to any Github/Gitlab/R-forge repository. No issue tracker or development information is available.
Last updated 6 months agofrom:9bf08c032a. Checks:3 OK. Indexed: yes.
Target | Result | Latest binary |
---|---|---|
Doc / Vignettes | OK | Mar 24 2025 |
R-4.5-linux | OK | Mar 24 2025 |
R-4.4-linux | OK | Mar 24 2025 |
Exports:boundary_null_distribcategorical_boundarydefine_boundarygauss_random_field_simlisa_clustersmax_subgraphmod_random_clust_simn_subgraphOdirectoverlap_null_distribOxOxyplot_boundaryrandom_raster_simsobel_operator
Dependencies:classclassIntclicolorspacecpp11DBIdotCall64dplyre1071fansifarverfieldsgenericsggplot2gluegtableigraphisobandKernSmoothlabelinglatticelifecyclemagrittrmapsMASSMatrixmgcvmunsellnlmepdqrpillarpkgconfigproxyR6RColorBrewerRcpprlangs2scalessfspamterratibbletidyselectunitsutf8vctrsviridisLitewithrwk
Citation
To cite package ‘BoundaryStats’ in publications use:
Luo A (2024). BoundaryStats: Boundary Overlap Statistics. R package version 2.2.0, https://CRAN.R-project.org/package=BoundaryStats.
Corresponding BibTeX entry:
@Manual{, title = {BoundaryStats: Boundary Overlap Statistics}, author = {Amy Luo}, year = {2024}, note = {R package version 2.2.0}, url = {https://CRAN.R-project.org/package=BoundaryStats}, }
Readme and manuals
BoundaryStats
BoundaryStats was designed to test for the presence of geographic boundaries in ecological variables and overlap between such boundaries. Users can calculate boundary and boundary overlap statistics with raster data. BoundaryStats can create null distributions for the statistics based on various neutral landscape models that are parameterized on the empirical data. The primary functions are statistical tests for the presence of spatial boundaries of a variable and significant overlap between the spatial boundaries of two variables.
Installation
You can install BoundaryStats with either:
install.packages('BoundaryStats')
remotes::install_github("aluo734/BoundaryStats")
Statistical Tests
Function | Category | Description |
---|---|---|
n_subgraph | Boundary | The number of subgraphs, or sets of contiguous boundary elements, in the data. |
max_subgraph | Boundary | The length of the longest subgraph. |
Odirect | Boundary Overlap | The number of directly overlapping boundary elements, or raster cells labelled as part of a boundary, of two traits. |
Ox | Boundary Overlap | The average minimum distance between each boundary element in raster x and the nearest boundary element in raster y. Uses Euclidean distance. The boundaries of trait x depend on the boundaries of trait y. |
Oxy | Boundary Overlap | The average minimum distance between boundary elements in two raster layers. Uses Euclidean distance. Boundaries for each trait affect one another reciprocally (x affects y and y affects x). |
Example
library(BoundaryStats)
library(tidyverse)
data(T.cristatus)
T.cristatus <- terra::rast(T.cristatus_matrix, crs = T.cristatus_crs)
ext(T.cristatus) <- T.cristatus_ext
data(grassland)
grassland <- terra::rast(grassland_matrix, crs = grassland_crs)
ext(grassland) <- grassland_ext
Tcrist_boundaries <- categorical_boundary(T.cristatus)
grassland_boundaries <- define_boundary(grassland, threshold = 0.1)
plot_boundary(Tcrist_boundaries, grassland_boundaries)
Tcrist_ovlp_null <- overlap_null_distrib(T.cristatus, grassland, rand_both = FALSE, x_cat = T, n_iterations = 100, x_model = 'random_cluster')
Odirect(Tcrist_boundaries, grassland_boundaries, Tcrist_ovlp_null)
Ox(Tcrist_boundaries, grassland_boundaries, Tcrist_ovlp_null)
Oxy(Tcrist_boundaries, grassland_boundaries, Tcrist_ovlp_null)
Data source: Cox, Karen; Schepers, Robbert; Van Breusegem, An; Speybroeck, Jeroen (2023), The common ground in landscape effects on gene flow in two newt species in an agroecosystem, Dryad, Dataset, https://doi.org/10.5061/dryad.bk3j9kdhz.