Skip to content

spatstat.linnet

Linear Networks Functionality of the 'spatstat' Family

v3.5-1 · May 30, 2026 · GPL (>= 2)

Description

Defines types of spatial data on a linear network and provides functionality for geometrical operations, data analysis and modelling of data on a linear network, in the 'spatstat' family of packages. Contains definitions and support for linear networks, including creation of networks, geometrical measurements, topological connectivity, geometrical operations such as inserting and deleting vertices, intersecting a network with another object, and interactive editing of networks. Data types defined on a network include point patterns, pixel images, functions, and tessellations. Exploratory methods include kernel estimation of intensity on a network, K-functions and pair correlation functions on a network, simulation envelopes, nearest neighbour distance and empty space distance, relative risk estimation with cross-validated bandwidth selection. 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 function lppm() similar to glm(). Only Poisson models are implemented so far. Models may involve dependence on covariates and dependence on marks. Models are fitted by maximum likelihood. 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. Random point patterns on a network can be generated using a variety of models.

Downloads

CRAN

22.3K

Last 30 days

765th

71.9K

Last 90 days

296.5K

Last year

Trend: -8% (30d vs prior 30d)

r2u CRAN

577

Last 30 days

1.5K

Last 90 days

4.7K

Last year

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

autoCRAN

2

Last 7 days

16

Last 30 days

1

All-time

autoCRAN-only: this name is served only by autoCRAN, so the count is exact.

conda-forge CRAN

1K

Last 30 days

3.5K

Last 90 days

17.2K

Last year

Trend: -20% (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 8, 2026
ERROR r-devel-linux-x86_64-debian-gcc

whether package can be installed

Installation failed.
See ‘/home/hornik/tmp/R.check/r-devel-gcc/Work/PKGS/spatstat.linnet.Rcheck/00install.out’ for details.
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'
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'
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'
Adding so many packages to the search path is excessive and importing
selectively is preferable.

Code

Structure

Lines of code

38,055

Files

273

Compiled share

8.6%

Has compiled src

Yes

Language breakdown

R 15,555 (40.9%)C/C++/src 3,258 (8.6%)Tests 1,220 (3.2%)Docs 18,022 (47.4%)

API

Exported functions

367

Internal functions

12

Recent export changes

v3.5-1+1 intensity.lppm
v3.5-0+1 mergeTiles.lintess

Testing & CI

Has tests

Yes

Test-to-code ratio

0.08

testthat edition

CI present

No

CI type

[]

PR gated

No

Docs

Return-value doc rate

100%

\dontrun example ratio

0%

Roxygen coverage

100%

Has pkgdown

No

NEWS present

Yes

Health & Security signals

Informational signals; not verdicts.

on.exit coverage

50%

Unsafe pattern score

0

Dep constraint coverage

57.1%

Secret pattern count

0

Bundled 3rd-party code

2 items

Portability & License

Min R version

3.5.0

System requirements

C++ standard

License

GPL (>= 2)

License flags

SPDX valid, OSI approved

History

Versions

27

First release

2021-02-05

Latest release

2026-05-31

Avg cadence

63 days

Cold removal rate

100%

Dep drift

48

LOC over versions

v1.65-3: 27,043 LOCv2.0-0: 27,185 LOCv2.1-1: 27,371 LOCv2.2-1: 27,395 LOCv2.3-0: 28,134 LOCv2.3-1: 28,204 LOCv2.3-2: 28,209 LOCv3.0-2: 30,598 LOCv3.0-3: 30,598 LOCv3.0-4: 30,650 LOCv3.0-6: 30,739 LOCv3.1-0: 31,057 LOCv3.1-1: 31,091 LOCv3.1-3: 31,271 LOCv3.1-4: 31,685 LOCv3.1-5: 31,688 LOCv3.2-1: 32,264 LOCv3.2-2: 32,266 LOCv3.2-3: 32,366 LOCv3.2-5: 32,421 LOCv3.2-6: 32,417 LOCv3.3-1: 33,018 LOCv3.3-2: 33,048 LOCv3.4-0: 36,752 LOCv3.4-1: 37,737 LOCv3.5-0: 37,976 LOCv3.5-1: 38,055 LOC

Per-file churn detail lives in the source pipeline: https://github.com/r-observatory/cran-code-metrics.

Reverse Dependencies (22)

Dependency Network

Dependencies Reverse dependencies spatstat.data spatstat.univar spatstat.geom spatstat.random spatstat.explore spatstat.model Matrix spatstat.utils spatstat.sparse spatstat spatstat.Knet spatstat.gui DRHotNet SpatialVx graph4lg kernstadapt markstat rcarbon stlnpp stopp ttbary GET secrlinear sf +7 more reverse deps spatstat.linnet

Version History

28 tracked
updated 3.5-1 ← 3.5-0 diff May 31, 2026
updated 3.5-0 ← 3.4-1 diff Mar 31, 2026
new 3.4-1 Mar 10, 2026
updated 3.4-1 ← 3.4-0 diff Jan 30, 2026
updated 3.4-0 ← 3.3-2 diff Nov 28, 2025
updated 3.3-2 ← 3.3-1 diff Sep 23, 2025
updated 3.3-1 ← 3.2-6 diff Jul 23, 2025
updated 3.2-6 ← 3.2-5 diff May 22, 2025
updated 3.2-5 ← 3.2-3 diff Jan 21, 2025
updated 3.2-3 ← 3.2-2 diff Nov 18, 2024
updated 3.2-2 ← 3.2-1 diff Sep 19, 2024
updated 3.2-1 ← 3.1-5 diff Jul 14, 2024
updated 3.1-5 ← 3.1-4 diff Mar 24, 2024
updated 3.1-4 ← 3.1-3 diff Feb 3, 2024
updated 3.1-3 ← 3.1-1 diff Oct 27, 2023