coherenceIndex: coherenceIndex

View source: R/coherenceIndex.R

coherenceIndexR Documentation

coherenceIndex

Description

Calculates the Coherence Index by using nearest Neighbors.

Usage

coherenceIndex(
  dat,
  cl,
  xcord = NULL,
  ycord = NULL,
  nk = NULL,
  reverse,
  develop = F,
  out_spatial = F,
  Proj = NULL
)

Arguments

dat

data.frame or SpatialPointData.frame.

cl

charater - name of column containing the classes

xcord

numeric - column with x-coordinates

ycord

numeric - column with y-coordinates

nk

numeric - amount of nearest neighbors to use. Maximum is 19.

reverse

boolean - develop. If TRUE saves to df in order, else in reverse.

Value

returns

Note

For

Author(s)

Andreas Schönberg

Examples

# load librarys
require(rgdal)
require(spatstat)
# load data
utm <- readOGR(system.file("extdata","hunde_utm.shp",package = "LinguGeo"))
# take a look
head(utm)
# calculate Coherence Index for "hunde" with "type"
CohInd <- coherenceIndex(utm,utm$type,6,7,nk=5,reverse = F)

SchoenbergA/LinguGeo documentation built on March 27, 2023, 2:47 a.m.