pair_correlation: Univariate Pair Correlation Function

View source: R/pair_correlation.R

pair_correlationR Documentation

Univariate Pair Correlation Function

Description

Implementation of the univariate pair correlation function from spatstat

Usage

pair_correlation(
  mif,
  mnames,
  r_range = NULL,
  num_permutations = 100,
  edge_correction = "translation",
  keep_permutation_distribution = FALSE,
  workers = 1,
  overwrite = FALSE,
  xloc = NULL,
  yloc = NULL,
  ...
)

Arguments

mif

object of class 'mif'

mnames

character vector of marker names

r_range

numeric vector including 0. If ignored, 'spatstat' will decide range

num_permutations

integer indicating how many permutations to run to determine CSR estimate

edge_correction

character string of edge correction to apply to Ripley's K estimation

keep_permutation_distribution

boolean for whether to keep the permutations or not

workers

integer for number of threads to use when calculating metrics

overwrite

boolean whether to overwrite existing results in the univariate_pair_correlation slot

xloc

column name of single x value

yloc

column name of single y value

...

other parameters to provide 'spatstat::pcf'

The Pair Correlation Function uses the derivative of Ripley's K so it does take slightly longer to calculate

'xloc' and 'yloc', if NULL, will be calculated from columns 'XMax', 'XMin', 'YMax', and 'YMin'.

Value

mif object with with the univariate_pair_correlation derived slot filled or appended to


spatialTIME documentation built on June 22, 2024, 10:35 a.m.