Various functions called internally by secr and not exported.
boundarytoSF (poly)Dfn2(designD, beta = NULL, ...)
boundarytoSF -- Spatial object of sf class sfc, containing
a geometry set of type POLYGON or MULTIPOLYGON. NULL input results in NULL output.
Dfn2 -- Vector of density values on the link scale, suitable for the internal array (mask x groups x sessions).
data to define one or more polygons
dataframe of density design data (output from D.designdata)
numeric vector of beta values (see Details for NULL)
other arguments (not used)
The function boundarytoSF converts various
possible polygon input formats to a standard form (sfc).
Possible inputs are:
| Input | From | Note |
| 2-column matrix or dataframe | base R | SpatialPolygons |
| sp | SpatialPolygonsDataFrame | sp |
| SpatVector | terra | sf |
| sf | geometry type POLYGON or MULTIPOLYGON | sfc |
| sf | geometry type POLYGON or MULTIPOLYGON |
Matrix input defines a single polygon.
Dfn2 is supplied automatically as 'details' argument Dfn in
secr.fit when the switch Dlambda is set to TRUE for the
multi-session trend reparameterization of density. Dfn2
uses beta = NULL to return the required number of density coefficients
(beta parameters) in the model.
Hijmans, R. J. (2022) terra: Spatial Data Analysis. R package version 1.5-14. https://rspatial.org/terra/
Pebesma, E. (2018) Simple features for R: standardized support for spatial vector data. The R Journal 10(1), 439--446. https://doi.org/10.32614/RJ-2018-009
Pebesma, E.J. and Bivand, R. S. (2005) Classes and methods for spatial data in R. R News 5(2), 9--13. https://cran.r-project.org/doc/Rnews/Rnews_2005-2.pdf.
pointsInPolygon,
secr-spatialdata.pdf,
predictDlambda,
secr-trend.pdf,
if (FALSE) {
poly <- cbind(x = c(0,6,6,0,0), y = c(0,0,6,6,0))
secr:::boundarytoSF(poly)
}
Run the code above in your browser using DataLab