Selects sampling points within a grid defined by X and Y ranges and a specified cell size, employing a random sampling strategy.
randomSamp(n, xrange, yrange, cellsize)
Arguments
- n
Number of sampling points to be created.
- xrange
Vector of two elements idnicating x coordinates range (min,max).
- yrange
Same as above for y range.
- cellsize
Cell size for grid (minimum dist between points)
Details
Value
Returns a table of coordinates of the sampling sites.
References
Author
Note
Examples
set.seed(1234)
# Create 25 random sampling sites in a 100x100 grid.
sampling <- randomSamp(25, c(0,100), c(0,100), 5)
plot(sampling, pch = 16, col = "red",
xlab = "x", ylab = "y",
main = "Random sampling sites")