Create a spatial knn network.
createSpatialKNNnetwork(
gobject,
method = "dbscan",
dimensions = "all",
name = "knn_network",
k = 4,
maximum_distance = NULL,
minimum_k = 0,
verbose = F,
return_gobject = TRUE,
...
)
giotto object
method to create kNN network
which spatial dimensions to use (default = all)
name for spatial network (default = 'spatial_network')
number of nearest neighbors based on physical distance
distance cuttof for nearest neighbors to consider for kNN network
minimum nearest neigbhours if maximum_distance != NULL
verbose
boolean: return giotto object (default = TRUE)
additional arguments to the selected method function
giotto object with updated spatial network slot
dimensions: default = 'all' which takes all possible dimensions. Alternatively you can provide a character vector that specififies the spatial dimensions to use, e.g. c("sdimx', "sdimy") or a numerical vector, e.g. 2:3
maximum_distance: to create a network based on maximum distance only, you also need to set k to a very high value, e.g. k = 100