if(interactive()) {
X <- spiders
np <- 10
nr <- 100
} else {
X <- runiflpp(4, simplenet)
np <- 3
nr <- 2
}
b <- bw.voronoi(X, nprob=np, nrep=nr)
b
plot(b)
bE <- bw.voronoi(X, nprob=np, nrep=nr, metric="E")
bE
Run the code above in your browser using DataLab