Compute spatial auto correlation using spdep

spdepAutoCorr(
  gobject,
  method = c("geary.test", "lee.test", "lm.morantest", "moran.test"),
  spat_unit = NULL,
  feat_type = NULL,
  expression_values = "normalized",
  spatial_network_to_use = "spatial_network",
  return_gobject = FALSE,
  verbose = FALSE
)

Arguments

gobject

Input a Giotto object.

method

Specify a method name to compute auto correlation. Available methods include "geary.test", "lee.test", "lm.morantest","moran.test".

spat_unit

spatial unit

feat_type

feature type

expression_values

expression values to use, default = normalized

spatial_network_to_use

spatial network to use, default = spatial_network

return_gobject

if FALSE, results are returned as data.table. If TRUE, values will be appended to feature metadata

verbose

be verbose

Value

A data table with computed values for each feature.

Examples

g <- GiottoData::loadGiottoMini("visium")
#> 1. read Giotto object
#> 2. read Giotto feature information
#> 3. read Giotto spatial information
#> 3.1 read Giotto spatial shape information
#> 3.2 read Giotto spatial centroid information
#> 3.3 read Giotto spatial overlap information
#> 4. read Giotto image information
#> python already initialized in this session
#>  active environment : '/usr/bin/python3'
#>  python version : 3.10
#> checking default envname 'giotto_env'
#> a system default python environment was found
#> Using python path:
#>  "/usr/bin/python3"

spdepAutoCorr(g)
#> Error in loadNamespace(x): there is no package called ‘future.apply’