This function computes the K function between the two agents for each unit, potentially averaging over replicates, or repeated measures.
Usage
getKFunction(
data,
agents,
unit,
replicate = NULL,
rCheckVals = NULL,
xRange = NULL,
yRange = NULL,
edgeCorrection = "isotropic"
)
Arguments
- data
Dataframe with column titles for at least x, y, agents, and unit. For consistency (and avoiding errors), use that order. Additionally, replicate can be added.
- agents
Two value vector indicating the two agents to use for the K function, the first to the second. These should be in the unit column.
- unit
String of the column name in data indicating a unit or base thing. Note this unit may have replicates.
- replicate
(Optional) String of the column name in data indicating the unique replicates, or repeated measures.
- rCheckVals
(Optional) Numeric vector indicating the radius to check. Note, if note specified, this could take a lot of memory, particularly with many units and replicates.
- xRange, yRange
(Optional) Two value numeric vector indicating the min and max x / y values. Note this is re-used for all images. The default just takes the min and max from each image. This allows different sized images, but the edges are defined by some agent location.
- edgeCorrection
(Optional) String indicating type of edgeCorrection(s) to apply when computing the K functions. Options include: "border", "bord.modif", "isotropic", "Ripley", "translate", "translation", "periodic", "none", "best" or "all" selects all options.