Learn R Programming

Biolinv (version 0.1-3)

spatSim: Computes spatial dissimilarity of two point processes.

Description

This function uses Ripley's K-function (see Details) to compute spatial dissimilarity of two point processes.

Usage

spatSim(MOD0, MOD2, WINDOW, R)

Arguments

MOD0

data frame containing 'y' and 'x' coordinates (projected coordinate system) to compare with MOD2.

MOD2

data frame containing 'y' and 'x' coordinates (projected coordinate system) to compare with MOD0.

WINDOW

window of observation of the point patterns (MOD0 and MOD2)(see ?spatstat.geom::owin).Must be an object of class 'owin'.

R

numeric vector of searc distances for the K-function.

Value

squared sum of distances between K-functions. This is a measure of spatial dissimilarity.

Examples

Run this code
# NOT RUN {
ran<- data.frame('y'=sample(1000),'x'=sample(1000))
nor<- data.frame('y'=rnorm(1000,sd=150,mean=500),'x'=rnorm(1000,sd=150,mean=500))
window<-  spatstat.geom::owin(xrange=c(0,1000),yrange=c(0,1000))
spatSim(ran, nor, WINDOW= window, R=0:200)
# }

Run the code above in your browser using DataLab