Spatial Phylogenetic Analysis
Overview
Analyze spatial phylogenetic diversity patterns. Use your data on an evolutionary tree and geographic distributions of the terminal taxa to compute diversity and endemism metrics, test significance with null model randomization, analyze community turnover and biotic regionalization, and perform spatial conservation prioritizations. All functions support quantitative community data in addition to binary data.
- Sites no longer need to be equal-area.
phylospatial()gains asite_weightargument controlling how much each site contributes to taxon range sizes, which underlie endemism metrics and prioritization. It can beNULL(the default, weighting all sites equally as before),"area"(weighting sites by their area), or one value per site supplied as a numeric vector, single-layerSpatRaster, orsfobject (for example, site areas raised to a power between 0 and 1). Weights are rescaled to a mean of 1 across occupied sites and stored inps$site_weight. Site weights are used by endemism metrics inps_diversity(),ps_rand(), andps_canape(); theendemismoption ofps_dissim()andps_regions(); andps_prioritize(),ps_prioritizr(), andps_performance().ps_canaper()does not support them. See the "Site weights" section of?phylospatialfor guidance on choosing weights, and?ps_randfor how they interact with null models. phylospatial()now warns, rather than throwing an error, when sites vary in area by more thanarea_toland nosite_weightis given. The check now considers occupied sites only, and is skipped whensite_weightis provided.- New function
ps_area()returns the area (km²) of each site in a raster,sfpolygon, orphylospatialobject, or the length (km) of line features, for use in deriving site weights. plot.phylospatial()gains ataxaargument for choosing which lineage ranges to plot wheny = "comm", instead of a random sample.moss()gains adataargument for loading companion layers on the same grid as the moss data set:"protection"(fraction of each cell in protected areas) and"popdens"(human population density), for use asinitandcostin conservation prioritizations. Both are available in raster and polygon formats.- Fixed an error in
ps_prioritize()andps_prioritizr()wheninitorcostwas supplied as ansfobject, which the documentation already listed as supported.
From NEWS.md in the release
Install
Health
- OK13 OK2026-08-05
- NOTE12 OK, 1 NOTE2026-08-01
- OK14 OK2026-04-04
- ERROR13 OK, 1 ERROR2026-03-31
- OK14 OK2026-03-10
Documentation
- Help pages
- 33 (2 internal)includes a package overview page
- Examples that run
- 53%16 run in a plain check (1 of them under a condition) · 14 only when donttest examples are enabled (R CMD check --as-cran)
- Exported functions with examples
- 97%
- Documented parameters
- 95%
- Return-value docs
- 100%
- Help pages citing references
- 21%
Downloads
Repository
- PRs merged (all time)
- 100%
- Median days to close, 50 most recently updated closed issues
- 1
- Median days to close, 50 most recently updated closed PRs
- 0
Stars over time
Forks over time
Releases over time
Issues over time
Commits over time
11 development-tooling and community-health practices detected across 6 families in the upstream repository
Checks run against github.com/matthewkling/phylospatial on 2026-10-21.
The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel
GitHub Pages site last deployed 2026-10-14 · The repository has a site deploy workflow
pkgdown site last built 2026-10-14, before release 1.6.0 (2026-10-22)
Show all practicesHide 2 practices
Dependencies
Code & Tests
Datasets
People & History
Pick two releases to compare their code metrics.
- 1.6.0Latest
- 1.5.02026-10-01 · diff ↗ ·
added 6 exports
delta_tree, ps_performance, ps_prioritizr, rescale_tree, slice_tree, uniform_tree - RR 4.6.0 released · 2026-04-24
- 1.4.0
- 1.3.0
- 1.2.12025-12-24 · diff ↗
- unarchivedReturned to CRAN2025-12-20
- 1.2.0
- archivedRemoved from CRAN2025-12-08issues were not corrected in time
- 1.1.12025-05-02 · diff ↗
- RR 4.5.0 released · 2025-04-11
- 1.1.0
- 1.0.02025-01-24
- RR 4.4.0 released · 2024-04-24
Package metadata
- First published
- 2025-01-24
- Total releases
- 9 / 1 yrs
- License
- MIT + file LICENSE OSI
- Minimum R
- ≥ 3.5
- Download size
- 2.2 MB
Cite
Cite this package
Run in R for the authors' preferred citation:
citation("phylospatial")This package has no citation file, so citation() returns this entry built from DESCRIPTION.
Cite the R Observatory
For a number measured here: a download total, a coverage figure, an archival date.
From data release v2026-10-24, which the citation names so these numbers can be found later. More on citing and the projects behind them.