- x
Object of class stars
, stars_proxy
, or terra's SpatRaster
. It should have one attribute (for "coma"
, "cove"
), two attributes ("cocoma"
, "cocove"
, "wecoma"
, "wecove"
), two or more attributes ("incoma"
, "incove"
), or any number of attributes suitable for user-defined functions.
- y
Object of class stars
, stars_proxy
, or terra's SpatRaster
. It should have one attribute (for "coma"
, "cove"
), two attributes ("cocoma"
, "cocove"
, "wecoma"
, "wecove"
), two or more attributes ("incoma"
, "incove"
), or any number of attributes suitable for user-defined functions.
- type
Type of the calculated signature. It can be "coma"
(co-occurrence matrix), "cove"
(co-occurrence vector), "cocoma"
(co-located co-occurrence matrix), "cocove"
(co-located co-occurrence vector), "wecoma"
(weighted co-occurrence matrix), "wecove"
(weighted co-occurrence vector), "incoma"
(integrated co-occurrence matrix), "incove"
(integrated co-occurrence vector), "composition"
or any function that can summarize stars
objects.
- dist_fun
Distance measure used. This function uses the philentropy::distance
function in the background. Run philentropy::getDistMethods()
to find possible distance measures.
- window
Specifies areas for analysis. It can be either: NULL
, a numeric value, or an sf
object. If window=NULL
calculations are performed for a whole area. If the window
argument is numeric, it is a length of the side of a square-shaped block of cells. Expressed in the numbers of cells, it defines the extent of a local pattern. If an sf
object is provided, each feature (row) defines the extent of a local pattern. The sf
object should have one attribute (otherwise, the first attribute is used as an id).
- output
The class of the output. Either "stars"
, "sf"
, or "terra"
- neighbourhood
The number of directions in which cell adjacencies are considered as neighbours:
4 (rook's case) or 8 (queen's case). The default is 4.
- threshold
The share of NA cells to allow metrics calculation.
- ordered
For "cove"
, "cocove"
, "wecove"
and "incove"
only. The type of pairs considered.
Either "ordered" (TRUE) or "unordered" (FALSE).
The default is FALSE.
- repeated
For "incove"
only. Should the repeated co-located co-occurrence matrices be used?
Either "ordered" (TRUE) or "unordered" (FALSE).
The default is FALSE.
- normalization
For "cove"
, "cocove"
, "wecove"
, "incove"
, "composition"
, or user-provided functions only.
Should the output vector be normalized?
Either "none" or "pdf".
The "pdf" option normalizes a vector to sum to one.
The default is "pdf".
- wecoma_fun
For "wecoma"
and "wecove"
only. Function to calculate values from adjacent cells to contribute to exposure matrix, "mean"
- calculate average values of local population densities from adjacent cells, "geometric_mean"
- calculate geometric mean values of local population densities from adjacent cells, or "focal"
assign a value from the focal cell
- wecoma_na_action
For "wecoma"
and "wecove"
only. Decides on how to behave in the presence of missing values in w
. Possible options are "replace"
, "omit"
, "keep"
. The default, "replace"
, replaces missing values with 0, "omit"
does not use cells with missing values, and "keep"
keeps missing values.
- ...
Additional arguments for the philentropy::distance
function.