Become an expert in R — Interactive courses, Cheat Sheets, certificates and more!
Get Started for Free

sample.annulus

Sample annulus


Description

Creates sample points based on annulus with defined inner and outer radius

Usage

sample.annulus(x, r1, r2, n = 10, ...)

Arguments

x

sp SpatialPoints or SpatialPointsDataFrame class object

r1

Numeric value defining inner radius of annulus (in projection units)

r2

Numeric value defining outer radius of annulus (in projection units)

n

Number of samples

...

Additional arguments passed to spsample

Value

sp SpatialPointsataFrame OBJECT

Note

Function can be used for distance based sampling. This is a sampling method that can be used to capture spatially lagged variation.

Author(s)

Jeffrey S. Evans <jeffrey_evans@tnc.org>

Examples

library(sp)
library(rgeos)
data(meuse)
coordinates(meuse) <- ~x+y
proj4string(meuse) <- CRS("+init=epsg:28992")
xy <- meuse[2,]

rs100 <- sample.annulus(xy, r1=50, r2=100, n = 50, type = "random")
rs200 <- sample.annulus(xy, r1=100, r2=200, n = 50, type = "random")

plot(rs200, pch=20, col="red")
  points(rs100, pch=20, col="blue")
  points(xy, pch=20, cex=2, col="black")
  box()
  legend("topright", legend=c("50-100m", "100-200m", "source"), 
         pch=c(20,20,20), col=c("blue","red","black"))

spatialEco

Spatial Analysis and Modelling Utilities

v1.3-6
GPL-3
Authors
Jeffrey S. Evans [aut, cre], Melanie A. Murphy [ctb], Karthik Ram [ctb]
Initial release
2021-03-24

We don't support your browser anymore

Please choose more modern alternatives, such as Google Chrome or Mozilla Firefox.