Geographic Information Systems Stack Exchange is a question and answer site for cartographers, geographers and GIS professionals. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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.

share|improve this question
up vote 3 down vote accepted

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)

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.