README.md

SpatialClustering

The aim of this package is to propose a method for detecting clusters of points in bi-dimensional space. Our method allows to account for a covariate in the clustering. The package proposes a graphical visualization of the clusters.

Installation

To install and load the package in R

library(devtools)
install_github("MathieuEmily/SpatialClustering")
library(SpatialClustering)

Example

Example of a study of tree location

data(dataExample)

Extraction of the data and the window

dDicor <- dataExample$data
w0 <- dataExample$w0

Identification of the clusters estimated with SpatialClustering in the Homogeneous case

set.seed(123)
res <- SpatialClustering(data=dDicor,window=w0)

The group memberships

res$group

Various plotting possibilities

plot(res)
plot(res,plot.dendro=FALSE)
plot(res,method="Seg",plot.dendro=FALSE)
plot(res,method="Seg",plot.dendro=TRUE)

Identification of the clusters estimated with SpatialClustering in the Inhomogeneous case

Extraction of the covariate

Z.Pente <- dataExample$Z.Pente

Estimation of the cluster

set.seed(345)
res.I <- SpatialClustering(data=dDicor,window=w0,Homogeneous=FALSE,Z=Z.Pente)
plot(res.I)


MathieuEmily/SpatialClustering documentation built on May 7, 2019, 4:33 p.m.