R/samplePts.R

samplePts <- function(x, n, type, ...){
if(type=="hexagonal") {
pts.est <- spsample(x, 1.2*n, type, ...)
while (summary(pts.est)[[1]] != n) pts.est <- spsample(x, 1.2*n, type)
} else {
pts.est <- spsample(x, n, type, ...)
while (summary(pts.est)[[1]] != n) pts.est <- spsample(x, n, type)
}
return(pts.est)
}

Try the geospt package in your browser

Any scripts or data that you put into this service are public.

geospt documentation built on May 2, 2019, 4:51 p.m.