Skip to content

phylospatial

1.6.0Package record

Spatial Phylogenetic Analysis

0packages depend
6.6Kdownloads / year
87.3%test coverage
13/13flavors OK

Overview

About

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.

Changes in 1.6.0
  • Sites no longer need to be equal-area. phylospatial() gains a site_weight argument controlling how much each site contributes to taxon range sizes, which underlie endemism metrics and prioritization. It can be NULL (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-layer SpatRaster, or sf object (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 in ps$site_weight. Site weights are used by endemism metrics in ps_diversity(), ps_rand(), and ps_canape(); the endemism option of ps_dissim() and ps_regions(); and ps_prioritize(), ps_prioritizr(), and ps_performance(). ps_canaper() does not support them. See the "Site weights" section of ?phylospatial for guidance on choosing weights, and ?ps_rand for how they interact with null models.
  • phylospatial() now warns, rather than throwing an error, when sites vary in area by more than area_tol and no site_weight is given. The check now considers occupied sites only, and is skipped when site_weight is provided.
  • New function ps_area() returns the area (km²) of each site in a raster, sf polygon, or phylospatial object, or the length (km) of line features, for use in deriving site weights.
  • plot.phylospatial() gains a taxa argument for choosing which lineage ranges to plot when y = "comm", instead of a random sample.
  • moss() gains a data argument 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 as init and cost in conservation prioritizations. Both are available in raster and polygon formats.
  • Fixed an error in ps_prioritize() and ps_prioritizr() when init or cost was supplied as an sf object, which the documentation already listed as supported.

From NEWS.md in the release

Install

Health

CRAN checks
13OK
Slowest check: 7.0 min · r-oldrel-windows-x86_64
Status changes
  • OK13 OK2026-08-05
  • NOTE12 OK, 1 NOTE2026-08-01
  • OK14 OK2026-04-04
  • ERROR13 OK, 1 ERROR2026-03-31
  • OK14 OK2026-03-10
Advisories

none known

Documentation

In release 1.6.0
READMEYes · 296 wordsVignettesYes · 4 · dynamicNEWSYes · 100% structured · mentions 1.6.0Citation fileNoWebsiteYes · pkgdown
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

6.6K
CRAN downloads in the past year
Rank #6,043 · ~18/day · ~553/mo
Daily download trend is not available in this view yet.
52630 days
1.4K90 days
6.6K1 year
Compare downloads with other packages →
Also on119 r2u4 autocran

Repository

10Stars
1Forks
1Open issues
0Open PRs
7Releases
127Commits
1Commit identities
127 commits · Last activity 2026-10-22 · 0% stars, 30d
Responsiveness
How these are sampled
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

2025-08-14 · 72026-08-28 · 10
PracticesBeta

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.

Continuous integration (2)
GitHub ActionsR CMD check workflow

The R CMD check workflow runs on Linux, macOS and Windows, and on R-devel

Docs source (4)
README.Rmdpkgdown

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)

Coverage (1)
Coverage reporting (Codecov)
Reproducibility and dev environment (1)
data-raw/
Show all practicesHide 2 practices
CRAN release process (2)
cran-comments.mdrevdep/
Lint, format, editor (1)
RStudio project
How this is detected·Detection ruleset v4 (2026-10-20)

Dependencies

Declared dependencies
20 external dependencies (excludes base and recommended)

Installing phylospatial adds 14 packages (12 with compiled code, 21 MB of source tarballs). Heaviest: sf 9.3 MB, s2 2.8 MB, Rcpp 1.8 MB.

Depends (1)
R >= 3.5
Imports (6)
apesfstatsterrautilsvegan
LinkingTo (0)
none
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

Datasets

People & History

People (1)
Author, Maintainer since 1.0.0 (2025), Copyright holder
Releases (9)

Pick two releases to compare their code metrics.

  • 1.6.0Latest
    record
    2026-10-22 · current release · diff ↗ ·
    added 1 export
    ps_area
  • 1.5.0
    record
    2026-10-01 · diff ↗ ·
    added 6 exports
    delta_tree, ps_performance, ps_prioritizr, rescale_tree, slice_tree, uniform_tree
  • R
    R 4.6.0 released · 2026-04-24
  • 1.4.0
    record
    2026-04-16 · diff ↗ ·
    added 3 exports
    ps_grid, ps_suggest_n_iter, ps_trace
  • 1.3.0
    record
    2026-04-03 · diff ↗ ·
    added 2 exports
    ps_expand, ps_geodist
  • 1.2.1
    record
    2025-12-24 · diff ↗
  • unarchivedReturned to CRAN
    2025-12-20
  • 1.2.0
    record
    2025-12-20 · diff ↗ ·
    added 1 export
    ps_quantize
  • archivedRemoved from CRAN
    2025-12-08
    issues were not corrected in time
  • 1.1.1
    record
    2025-05-02 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 1.1.0
    record
    2025-04-09 · diff ↗ ·
    added 1 export
    clade_dist
  • 1.0.0
    record
    2025-01-24
  • R
    R 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")
Kling, M. (2026). phylospatial: Spatial Phylogenetic Analysis (Version 1.6.0) [Computer software]. https://doi.org/10.32614/CRAN.package.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.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for phylospatial version 1.6.0 [Data set]. HJJB, LLC. Data release v2026-10-24. https://doi.org/10.5281/zenodo.21843040

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.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy