Description Usage Arguments Value Examples
This function takes a raster with the detection probabilities around a
receiver and samples n
number of geografic coordinates according to
to the probabilities.
1 | sampleCoord(prob.raster, n = 1)
|
prob.raster |
|
n |
number of pair of coordinates to return. |
A data frame with the x
and y
coordinates of the
sampled points, in the same geographic reference system as the
prob.rast
object.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 | library(raster)
# Create the acoustic range model
data(range_test)
det.range <- glm(det.ratio ~ dist.m, data = range_test,
family = quasibinomial(logit))
# Probability raster for the receiver 'X1'
rec <- "X1"
prob.rast <- probRaster(dist.rast = viewshed[[rec]], tag.depth = 10,
topo = bathymetry, ac.range.mod = det.range)
plot(prob.rast)
# Sample coordinates
sampled.points <- sampleCoord(prob.rast, 10)
points(sampled.points, pch = "+")
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.