[R-sig-Geo] How to randomly select points in a polygon

Edzer J. Pebesma e.pebesma at geo.uu.nl
Thu Apr 12 09:41:54 CEST 2007


You may want to use spsample, or, if you selected the points in the 
polygon with overlay and want to sample from them, use function sample.

It is hard for us to see what you're trying and cannot get without 
(reproducible) example code.
--
Edzer

Yong Li wrote:
> I want to overlay points with a polygon, get the points in the 
> polygon and then try to just select a point randomly from them.
> I have tried using overlay, but it did not give me what I really 
> want. Any help will be appreciated.
>
> Yong
>
> _______________________________________________
> R-sig-Geo mailing list
> R-sig-Geo at stat.math.ethz.ch
> https://stat.ethz.ch/mailman/listinfo/r-sig-geo
>




More information about the R-sig-Geo mailing list