Skip to content

spatstat

3.6-2

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

51packages depend
356.1Kdownloads / year
test coverage
13/13checks pass

Overview

About
Maintained by Adrian BaddeleyFirst published 2002-01-21267 releasesCRAN page ↗GitHub ↗

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.

Install

Health

CRAN checks
13OK
Slowest check: 4.6 min · r-oldrel-windows-x86_64
Code health
None
Tests · ratio 0.00
not tracked
Coverage
100%
Documentation · exports
9
Dependencies · direct
Check history
  • OK2026-08-04
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-08-01
    12 OK · 1 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-06-09
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • ERROR2026-06-07
    12 OK · 0 NOTE · 0 WARNING · 1 ERROR · 0 FAILURE
  • OK2026-05-06
    13 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
Show 3 earlier snapshots
  • WARNING2026-05-05
    12 OK · 0 NOTE · 1 WARNING · 0 ERROR · 0 FAILURE
  • OK2026-04-25
    12 OK · 0 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE
  • NOTE2026-03-10
    11 OK · 3 NOTE · 0 WARNING · 0 ERROR · 0 FAILURE

Documentation

Documentation
READMENoVignettesYes · dynamicpkgdown siteNoNEWSYes · 33% structuredCode of conductNoContributing guideNo
Examples that run
100%
Documented parameters
100%
Return-value docs
100%
References docs
33%

Downloads

356.1K
CRAN downloads in the past year
Rank #648 · ~976/day · ~29.7K/mo
Daily download trend is not available in this view yet.
25.7K30 days
91.5K90 days
356.1K1 year
Compare downloads with other packages →
Also on4.9K r2u17 autocran18.3K conda_forge200 c2d4u

Repository

Repository
207Stars
43Forks
0Open issues
0Open PRs
96Releases
2,067Commits
12Contributors
rspatial-analysisspatial-dataspatstatspatial-data-analysisstatisticsstatistical-methodsstatistical-tests
2,067 commits · Last activity 2026-07-29 · 0% stars, 30d

Stars over time

2025-04-17 · 1982026-08-11 · 207

Repository practices

Upstream repositoryBeta

4 development-tooling and community-health practices detected across 2 families in the upstream repository

Checks run against github.com/spatstat/spatstat on 2026-08-09.

Continuous integration (3)
GitHub ActionsTravis CIAppVeyor
Governance and community (1)
Issue templates
How this is detected·Detection ruleset v1 (2026-07-18)

Dependencies

Declared dependencies
8 external dependencies (excludes base and recommended)
Imports (1)
LinkingTo (0)
none
Suggests (0)
none
Enhances (0)
none

Code & Tests

People & History

People (3)
Maintainer (1)
Author, Maintainer
Authors (3)
Author, Maintainer
Author · added in 1.37-0
Listed in earlier versions (147)
no longer listed · 1.4-3 to 1.9-5
no longer listed · 1.4-3
no longer listed · 1.4-4 to 1.9-5
no longer listed · 1.9-1 to 1.21-1
no longer listed · 1.9-4 to 1.21-1
no longer listed · 1.9-6 to 1.21-1
no longer listed · 1.9-6 to 1.21-1
Package Timeline

267 releases. Pick two to compare their code metrics. R releases are shown for context.

  • 3.6-2Latest
    2026-07-31 · current release · diff ↗
  • 3.6-1
    2026-06-02 · diff ↗
  • R
    R 4.6.0 released · 2026-04-24
  • 3.6-0
    2026-04-02 · diff ↗
  • 3.5-1
    2026-02-01 · diff ↗
  • 3.5-0
    2025-12-01 · diff ↗
  • 3.4-1
    2025-09-28 · diff ↗
  • 3.4-0
    2025-07-25 · diff ↗
  • 3.3-3
    2025-05-24 · diff ↗
  • R
    R 4.5.0 released · 2025-04-11
  • 3.3-2
    2025-03-22 · diff ↗
  • 3.3-1
    2025-01-23 · diff ↗
  • 3.3-0
    2024-11-20 · diff ↗
  • 3.2-1
    2024-09-22 · diff ↗
  • 3.1-1
    2024-07-15 · diff ↗
  • R
    R 4.4.0 released · 2024-04-24
Show 286 earlier events

Package metadata

First published
2002-01-21
Total releases
267 / 24 yrs
License
GPL (>= 2) OSI
Minimum R
≥ 3.5.0
Download size
4.2 MB
Installed size
not tracked yet
With dependencies
not tracked yet

Cite

Cite this package

Run in R for the authors' preferred citation:

citation("spatstat")
Baddeley, A., Rubak, E., & Turner, R. (2026). spatstat: Spatial Point Pattern Analysis, Model-Fitting, Simulation, Tests (Version 3.6-2) [Computer software]. https://doi.org/10.32614/CRAN.package.spatstat

This is what citation() produces when a package has no citation file of its own. If it prints something else, use that.

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 spatstat version 3.6-2 [Data set]. HJJB, LLC. Data release v2026-08-11. https://doi.org/10.5281/zenodo.21843040

From data release v2026-08-11, 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