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
)
Input a Giotto object.
Specify a method name to compute auto correlation.
Available methods include
"geary.test", "lee.test", "lm.morantest","moran.test"
.
spatial unit
feature type
expression values to use, default = normalized
spatial network to use, default = spatial_network
if FALSE, results are returned as data.table. If TRUE, values will be appended to feature metadata
be verbose
A data table with computed values for each feature.
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: package 'future' is not yet installed
#>
#> To install:
#> install.packages(c("future"))