# NOT RUN {
library(sp)
library(raster)
library(rgeos)
data(meuse)
coordinates(meuse) <- ~x+y
e <- gConvexHull(meuse)
# Fixed size 250 and no rotation
s <- quadrats(e, s = 250, n = 50)
spplot(s, "ID")
# Variable sizes 100-300 and rotation of 0-45 degrees
s <- quadrats(e, s = c(100,300), n = 50, r = c(0,45))
spplot(s, "ID")
# Variable sizes 100-300 and no rotation
s <- quadrats(e, s = c(100,300), n = 50)
spplot(s, "ID")
# }
Run the code above in your browser using DataLab