kfunc | R Documentation |
spatstat
's version). Or calculate the K function from point pattern (and intensity) provided.Inhomogeneous K function for scampr models (is a wrapper of spatstat
's version). Or calculate the K function from point pattern (and intensity) provided.
kfunc(
model,
correction = c("border", "bord.modif", "isotropic", "translate"),
point.pattern,
intensity.at.pp,
spatstat.win,
intensity.at = c("im", "pts"),
dists = NULL
)
model |
a scampr model object |
correction |
a character string describing the correction type to be used. See |
point.pattern |
Optionally, a data frame, the first two columns of which describe the horizontal and vertical coordinates of point locations respectively. |
intensity.at.pp |
Optionally, a vector of length |
spatstat.win |
Optionally, a spatstat window object. |
intensity.at |
Optionally, a character string, one of either 'im' or 'pts'. Describes whether the intensity used in |
dists |
a vector of values for the distances at which the inhomogeneous K function should be evaluated. Not normally given by the user; |
a data.frame of two columns - distance (dist) and corresponding K function values (Kfn).
# Get the data
dat <- scampr::gorillas
dat$elev <- scale(dat$elevation)
mod <- scampr(pres ~ elev, dat, model.type = "PO", include.sre = F)
K_func <- kfunc(mod)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.