[GIS] random sampling from spatial points in R

pointrsampling

Can anyone help me out on the best package to sample from a spatial point dataset?

My dataset consists of a list of positions inside a region, and for each point I also have the name/number of the subregion where the point is located. I would like to make my sampling using only this dataset (for example I don't want to load a shape file with the subregions or a probability raster).

I have already made a "random" sampling for each subregion, however I am not taking into account the spatial distribution of the points inside each subregion.

I am looking for a package that would let me do both spatial random sampling as well as stratified random sampling, or some guidelines on how I can create my own code.

Best Answer

I'd suggest the spatstat package. Perhaps check out the quadratresample function. They also have several others to simulate random patterns that may fit your need (e.g. rstrat and rsyst). Random sampling should be pretty trivial to accomplish on your own (see the sample function in base R)