Skip to content

spatstat

Spatial Point Pattern Analysis, Model-Fitting, Simulation, Tests

v3.6-1 · Jun 2, 2026 · GPL (>= 2)

Description

Comprehensive open-source toolbox for analysing Spatial Point Patterns. Focused mainly on two-dimensional point patterns, including multitype/marked points, in any spatial region. Also supports three-dimensional point patterns, space-time point patterns in any number of dimensions, point patterns on a linear network, and patterns of other geometrical objects. Supports spatial covariate data such as pixel images. Contains over 3000 functions for plotting spatial data, exploratory data analysis, model-fitting, simulation, spatial sampling, model diagnostics, and formal inference. Data types include point patterns, line segment patterns, spatial windows, pixel images, tessellations, and linear networks. Exploratory methods include quadrat counts, K-functions and their simulation envelopes, nearest neighbour distance and empty space statistics, Fry plots, pair correlation function, kernel smoothed intensity, relative risk estimation with cross-validated bandwidth selection, mark correlation functions, segregation indices, mark dependence diagnostics, and kernel estimates of covariate effects. Formal hypothesis tests of random pattern (chi-squared, Kolmogorov-Smirnov, Monte Carlo, Diggle-Cressie-Loosmore-Ford, Dao-Genton, two-stage Monte Carlo) and tests for covariate effects (Cox-Berman-Waller-Lawson, Kolmogorov-Smirnov, ANOVA) are also supported. Parametric models can be fitted to point pattern data using the functions ppm(), kppm(), slrm(), dppm() similar to glm(). Types of models include Poisson, Gibbs and Cox point processes, Neyman-Scott cluster processes, and determinantal point processes. Models may involve dependence on covariates, inter-point interaction, cluster formation and dependence on marks. Models are fitted by maximum likelihood, logistic regression, minimum contrast, and composite likelihood methods. A model can be fitted to a list of point patterns (replicated point pattern data) using the function mppm(). The model can include random effects and fixed effects depending on the experimental design, in addition to all the features listed above. Fitted point process models can be simulated, automatically. Formal hypothesis tests of a fitted model are supported (likelihood ratio test, analysis of deviance, Monte Carlo tests) along with basic tools for model selection (stepwise(), AIC()) and variable selection (sdr). Tools for validating the fitted model include simulation envelopes, residuals, residual plots and Q-Q plots, leverage and influence diagnostics, partial residuals, and added variable plots.

Downloads

35K

Last 30 days

617th

89.4K

Last 90 days

338.8K

Last year

Trend: +30.8% (30d vs prior 30d)

CRAN Check Status

13 OK
Show all 13 flavors
Flavor Status
r-devel-linux-x86_64-debian-clang OK
r-devel-linux-x86_64-debian-gcc OK
r-devel-linux-x86_64-fedora-clang OK
r-devel-linux-x86_64-fedora-gcc OK
r-devel-windows-x86_64 OK
r-oldrel-macos-arm64 OK
r-oldrel-macos-x86_64 OK
r-oldrel-windows-x86_64 OK
r-patched-linux-x86_64 OK
r-release-linux-x86_64 OK
r-release-macos-arm64 OK
r-release-macos-x86_64 OK
r-release-windows-x86_64 OK

Check History

OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Jun 9, 2026
ERROR 12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE Jun 7, 2026
ERROR r-devel-linux-x86_64-debian-gcc

re-building of vignette outputs

Error(s) in re-building vignettes:
  ...
--- re-building ‘NAobjects.Rnw’ using Sweave
Loading required package: spatstat.data
Loading required package: spatstat.univar
spatstat.univar 3.2-0
Loading required package: spatstat.geom
spatstat.geom 3.8-1

...[truncated]...
et
spatstat.linnet 3.5-1

spatstat 3.6-1 
For an introduction to spatstat, type ‘beginner’ 

--- finished re-building 'updates.Rnw'

SUMMARY: processing the following file failed:
  ‘datasets.Rnw’

Error: Vignette re-building failed.
Execution halted
OK 13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE May 6, 2026
WARNING 12 OK · 0 NOTE · 1 WARNING · 0 ERROR · 0 FAILURE May 5, 2026
WARNING r-devel-linux-x86_64-debian-gcc

PDF version of manual

LaTeX errors when creating PDF version.
This typically indicates Rd problems.
LaTeX errors found:
OK 12 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Apr 25, 2026
NOTE 11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE Mar 10, 2026
NOTE r-oldrel-macos-arm64

package dependencies

Depends: includes the non-default packages:
  'spatstat.data', 'spatstat.univar', 'spatstat.geom',
  'spatstat.random', 'spatstat.explore', 'spatstat.model',
  'spatstat.linnet'
Adding so many packages to the search path is excessive and importing
selectively is preferable.
NOTE r-oldrel-macos-x86_64

package dependencies

Depends: includes the non-default packages:
  'spatstat.data', 'spatstat.univar', 'spatstat.geom',
  'spatstat.random', 'spatstat.explore', 'spatstat.model',
  'spatstat.linnet'
Adding so many packages to the search path is excessive and importing
selectively is preferable.
NOTE r-oldrel-windows-x86_64

package dependencies

Depends: includes the non-default packages:
  'spatstat.data', 'spatstat.univar', 'spatstat.geom',
  'spatstat.random', 'spatstat.explore', 'spatstat.model',
  'spatstat.linnet'
Adding so many packages to the search path is excessive and importing
selectively is preferable.

Reverse Dependencies (51)

Dependency Network

Dependencies Reverse dependencies spatstat.data spatstat.univar (>= 3.2-0) spatstat.geom spatstat.random spatstat.explore spatstat.model spatstat.linnet spatstat.utils CalSim MIIPW SpatEntropy SpatialVx dixon ecespa idar lacunaritycovariance latticeDensity lmfor ppmlasso replicatedpp2w selectspm siplab spagmix +36 more reverse deps spatstat

Version History

225 tracked
updated 3.6-1 ← 3.6-0 diff Jun 2, 2026
updated 3.6-0 ← 3.5-1 diff Apr 2, 2026
new 3.5-1 Mar 10, 2026
updated 3.5-1 ← 3.5-0 diff Jan 31, 2026
updated 3.5-0 ← 3.4-1 diff Nov 30, 2025
updated 3.4-1 ← 3.4-0 diff Sep 27, 2025
updated 3.4-0 ← 3.3-3 diff Jul 24, 2025
updated 3.3-3 ← 3.3-2 diff May 23, 2025
updated 3.3-2 ← 3.3-1 diff Mar 21, 2025
updated 3.3-1 ← 3.3-0 diff Jan 22, 2025
updated 3.3-0 ← 3.2-1 diff Nov 19, 2024
updated 3.2-1 ← 3.1-1 diff Sep 21, 2024
updated 3.1-1 ← 3.0-8 diff Jul 14, 2024
updated 3.0-8 ← 3.0-7 diff Mar 25, 2024
updated 3.0-7 ← 3.0-6 diff Oct 29, 2023