gridQuad | R Documentation |
A relatively quick way to generate psuedo-random quadrature set for ppm models.
gridQuad(npoints, window, coord = c("X", "Y"), control)
npoints |
The number of background points to use. The default is 1000, but it is generally recommended to use more when fitting a ppm. |
window |
A SpatRaster from terra package which will represent the extent and resolution of the point process model. |
coord |
The names of the coordinates. Default is c("X","Y"). |
control |
A list of control options passed from ppmData |
Skipton Woolley
library(ppmData)
library(terra)
path <- system.file("extdata", package = "ppmData")
lst <- list.files(path=path,pattern='*.tif',full.names = TRUE)
window <- terra::rast(lst[1])
res <- gridQuad(10000,window,control=list(quiet=FALSE))
plot(window)
points(res[,1:2],pch=".")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.