View source: R/coherenceIndex.R
coherenceIndex | R Documentation |
Calculates the Coherence Index by using nearest Neighbors.
coherenceIndex(
dat,
cl,
xcord = NULL,
ycord = NULL,
nk = NULL,
reverse,
develop = F,
out_spatial = F,
Proj = NULL
)
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. |
returns
For
Andreas Schönberg
# 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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.