[R] Spatial: number of independent components?
Daniel Malter
daniel at umd.edu
Mon Jun 21 04:27:33 CEST 2010
Hi, thanks much. This works in principle. The corrected code is below:
a <- nb2mat(cell2nb(nrow(x),ncol(x),torus=T), style="B")
g <- delete.vertices(graph.adjacency(a), which(x!=1)-1)
plot(g)
clusters(g)
the $no argument of the clusters(g) function is the sought after number.
However, the function is very slow, and my machine runs out of memory (1G)
for a 101 by 101 matrix.
Daniel
--
View this message in context: http://r.789695.n4.nabble.com/Spatial-number-of-independent-components-tp2262018p2262090.html
Sent from the R help mailing list archive at Nabble.com.
More information about the R-help
mailing list