MyNixOS website logo
Description

Spatial Phylogenetic Analysis.

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.

R-CMD-check CRANstatus

phylospatial

phylospatial is an R package for spatial phylogenetic diversity analysis—accounting for evolutionary relationships among taxa when describing biodiversity patterns. The package provides functions for building and analyzing phylospatial data:

  • phylospatial() constructs a spatial phylogenetic data set from community data and a tree.
  • ps_diversity() calculates a range of phylogenetic diversity and endemism metrics.
  • ps_rand() computes significance values for diversity metrics using null model randomizations.
  • ps_dissim() calculates a pairwise community phylogenetic beta diversity matrix.
  • ps_ordinate() performs a community ordination to reduce the dimensionality of the data set.
  • ps_regions() clusters sites into phylogenetically similar biogeographic regions.
  • ps_prioritize() performs a spatial optimization to identify conservation priorities.

A key feature of phylospatial is full support for quantitative community data, including occurrence probabilities (e.g., from species distribution models) and abundances, in addition to binary presence-absence data. This avoids information loss from thresholding continuous data, and enables new analyses not available in other spatial phylogenetic R packages.

Vignettes

  • vignette("phylospatial-data") gives details about constructing phylospatial datasets with different types of data.
  • vignette("alpha-diversity") demonstrates calculation of alpha phylogenetic diversity and endemism measures, including statistical hypothesis testing using randomization-based null models.
  • vignette("beta-diversity") shows how to calculate phylogenetic beta diversity measures including nestedness and turnover, as well as phylogenetic ordination and regionalization to visualize phylogenetic community structure.
  • vignette("prioritization") explains how to perform a phylogenetic conservation prioritization.

Installation

# you can install the package from CRAN:
install.packages("phylospatial")

# or the development version from GitHub:
remotes::install_github("matthewkling/phylospatial")

Quick start

library(phylospatial)
ps <- moss() # load example data
div <- ps_diversity(ps) # calculate diversity metrics
terra::plot(div)

Citation

To cite phylospatial in publications, please use:

Kling, M. (2025). phylospatial: an R package for spatial phylogenetic analysis with quantitative community data. Methods in Ecology and Evolution 16:1075–1083. DOI 10.1111/2041-210x.70056

Metadata

Version

1.4.0

License

Unknown

Platforms (80)

    Darwin
    FreeBSD
    Genode
    GHCJS
    Linux
    MMIXware
    NetBSD
    none
    OpenBSD
    Redox
    Solaris
    uefi
    WASI
    Windows
Show all
  • aarch64-darwin
  • aarch64-freebsd
  • aarch64-genode
  • aarch64-linux
  • aarch64-netbsd
  • aarch64-none
  • aarch64-uefi
  • aarch64-windows
  • aarch64_be-none
  • arc-linux
  • arm-none
  • armv5tel-linux
  • armv6l-linux
  • armv6l-netbsd
  • armv6l-none
  • armv7a-linux
  • armv7a-netbsd
  • armv7l-linux
  • armv7l-netbsd
  • avr-none
  • i686-cygwin
  • 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-linux
  • 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
  • sh4-linux
  • 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-uefi
  • x86_64-windows