Description Usage Arguments Details Value References See Also Examples
View source: R/plot.SpatClust.R
plot.SpatClust
is a graphical function that the visualization of the clusters.
1 2 |
x |
|
method |
A character string indicating the type of cluster visualization |
plot.dendro |
A boolean. Should the dendrogram be displayed ? (See Details for more information) |
plot.covariate |
A boolean. Should the map of the covariate be displayed ? (See Details for more information) |
If method="CH"
, this function draws the convex hull of each cluster. If method="Seg"
, plot.SpatClust
draws an edge between all pairs of points that are connected (i.e. closer than expected under the underlying homogeneous or inhomogeneous Poisson process).
If plot.dendro=TRUE
, the graphical output is divided into two parts: one part with the dendrogram and one part with two-dimensional clusters. If plot.dendro=FALSE
, two-dimensional clusters are only displayed.
If plot.covariate=TRUE
, the two-dimensional clusters are accompanied with a image of the covariate on the window of interest.
The form of the value returned by plot
depends on the class of its argument. See Details.
A. Bar-Hen, M. Emily and N. Picard. (2015) Spatial Cluster Detection Using Nearest Neighbour Distance, Spatial Statistics, Vol. 14, pages 400-411.
R. Tibshirani, G. Walther and T. Hastie (2001) Estimating the number of data clusters via the gap statistic. J. Roy. Stat. Soc. B 63, 411<e2><80><93>423.
generateListTandP
, getClusters
, getMatDist
, SpatialClustering
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 | ## 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)
## 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)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.