[R] Extract all point in a quadrats by spatstat package

Mohammad Tanvir Ahamed mashranga at yahoo.com
Tue Nov 28 13:32:44 CET 2017


Hi,

With the following code i can divides window into quadrats and counts the numbers of points in each quadrat.

library(spatstat)
X <- runifpoint(50)
quadratcount(X)
quadratcount(X, 4, 5)
quadratcount(X, xbreaks=c(0, 0.3, 1), ybreaks=c(0, 0.4, 0.8, 1))
qX <-  quadratcount(X, 4, 5)
plot(X)
plot(qX, add=TRUE)

But I want to mark each  quadrats  and select/ extract only those points by selecting quadrats id . 
Can anyone plese help me regarding this issue ?
Thanks in advance .



Regards.............
Tanvir Ahamed 
Stockholm, Sweden     |  mashranga at yahoo.com 



More information about the R-help mailing list