Learn R Programming

ads (version 1.5-5)

kp.fun: Multiscale second-order neighbourhood analysis of a multivariate spatial point pattern

Description

(Formerly ki.fun) Computes a set of K12-functions between all possible marks \(p\) and the other marks in a multivariate spatial point pattern defined in a simple (rectangular or circular) or complex sampling window (see Details).

Usage

kp.fun(p, upto, by)

Arguments

p

a "spp" object defining a multivariate spatial point pattern in a given sampling window (see spp).

upto

maximum radius of the sample circles (see Details).

by

interval length between successive sample circles radii (see Details).

Value

A list of class "fads" with essentially the following components:

r

a vector of regularly spaced distances (seq(by,upto,by)).

labp

a vector containing the levels \(i\) of p$marks.

gp.

a data frame containing values of the pair density function \(g12(r)\).

np.

a data frame containing values of the local neighbour density function \(n12(r)\).

kp.

a data frame containing values of the \(K12(r)\) function.

lp.

a data frame containing values of the modified \(L12(r)\) function.

Each component except r is a data frame with the following variables:

obs

a vector of estimated values for the observed point pattern.

theo

a vector of theoretical values expected under the null hypothesis of population independence (see k12fun).

Details

Function kp.fun is simply a wrapper to k12fun, which computes K12(r) between each mark \(p\) of the pattern and all other marks grouped together (the \(j\) points).

See Also

plot.fads, spp, kfun, k12fun, kpqfun.

Examples

Run this code
# NOT RUN {
  data(BPoirier)
  BP <- BPoirier
  
# }
# NOT RUN {
multivariate spatial point pattern in a rectangle sampling window
# }
# NOT RUN {
  swrm <- spp(BP$trees, win=BP$rect, marks=BP$species)
  kp.swrm <- kp.fun(swrm, 25, 1)
  plot(kp.swrm)
  
 
# }
# NOT RUN {
multivariate spatial point pattern in a circle with radius 50 centred on (55,45)
# }
# NOT RUN {
  swcm <- spp(BP$trees, win=c(55,45,45), marks=BP$species)
  kp.swcm <- kp.fun(swcm, 25, 1)
  plot(kp.swcm)
  
  
# }
# NOT RUN {
multivariate spatial point pattern in a complex sampling window
# }
# NOT RUN {
  swrtm <- spp(BP$trees, win=BP$rect, tri=BP$tri2, marks=BP$species)
  kp.swrtm <- kp.fun(swrtm, 25, 1)
  plot(kp.swrtm)
# }

Run the code above in your browser using DataLab