This is an extension of the spatstat package.
It computes the K function, pair correlation function and inhomogeneous versions of these functions, for point pattern on a linear network, using the algorithms described in S. Rakshit, A Baddeley and G. Nair (2019) Efficient code for second order analysis of events on a linear network. Journal of Statistical Software 90 (1) 1-37.
This GitHub repository holds the development version of
spatstat.Knet. The development version is newer than the official release
of spatstat.Knet on CRAN.
For the most recent official release of
spatstat.Knet, see the CRAN page. To install it, just type
install.packages('spatstat.Knet')The easiest way to install the development version of spatstat.Knet
from github is through the remotes package:
require(remotes)
install_github('spatstat/spatstat')
install_github('spatstat/spatstat.Knet')If you don't have remotes installed you should first run
install.packages('remotes')