Dear R-sig-geo Members, ??? ??? I've like to identify hotspots points (centroid/geometric center of distances(r) when CSR is not satisfied), in my study case, centroids with points around 0.75 radius. This thinking in the map representation, for this objective I make: #Package library(spatstat) library(sp) library(cluster) library(lattice) #Swedishpines's data set in spatstat package data(swedishpines) plot(swedishpines) #CSR with K-Ripley test csr_pines <- envelope(swedishpines, Kest, nsim=99) plot(csr_pines) # r=0.75 is outside CSR assumption, than: ##Create matrix distance of all points coords<-cbind(swedishpines$x,swedishpines$y) res<-spDists(coords) res <- data.frame(res) # Cluster 0.75m distances clusters <- as.hclust(agnes(res, diss = T)) coords$group <- cutree(clusters, h=0.75) ## Radius 0.75 # #Visualization of centroids with points around 0.75 radius xyplot(x~y, group = group, data = coords) points(swedishpines$x,swedishpines$y, pch=16) # Doesn't work, please any ideas or new approaches? Thanks in advanced, Alexandre
======================================================================
Alexandre dos Santos
Prote??o Florestal
IFMT - Instituto Federal de Educa??o, Ci?ncia e Tecnologia de Mato Grosso
Campus C?ceres
Caixa Postal 244
Avenida dos Ramires, s/n
Bairro: Distrito Industrial
C?ceres - MT CEP: 78.200-000
Fone: (+55) 65 99686-6970 (VIVO) (+55) 65 3221-2674 (FIXO)
alexandre.santos at cas.ifmt.edu.br
Lattes: http://lattes.cnpq.br/1360403201088680
OrcID: orcid.org/0000-0001-8232-6722
Researchgate: www.researchgate.net/profile/Alexandre_Santos10
LinkedIn: br.linkedin.com/in/alexandre-dos-santos-87961635
Mendeley:www.mendeley.com/profiles/alexandre-dos-santos6/