Skip to contents

estimate average distance between neighboring cells with network table as input

Usage

get_distance(networkDT, method = c("mean", "median"))

Arguments

networkDT

networkDT

method

method

Value

numeric

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 : 'giotto_env'
#>  python version : 3.10
#> checking default envname 'giotto_env'
#> a system default python environment was found
#> Using python path:
#>  "/usr/share/miniconda/envs/giotto_env/bin/python"
spat_net <- getSpatialNetwork(g, output = "networkDT")

get_distance(spat_net, method = "mean")
#> [1] 137.93