Returns the mean, median and standard deviation of the minimum/pairwise distances between phenotypes.

calculate_summary_distances_between_celltypes(df)

Arguments

df

Data.frame containing the distance output between cell types. The functions that generate the distances can be calculate_minimum_distances_between_celltypes and calculate_pairwise_distances_between_celltypes.

Value

A data frame is returned

Examples

# for pairwise dist
pairwise_dist <- calculate_pairwise_distances_between_celltypes(
SPIAT::defined_image, cell_types_of_interest = c("Tumour","Immune1"), 
feature_colname = "Cell.Type")
summary_distances <- calculate_summary_distances_between_celltypes(pairwise_dist)

# for minimum dist
min_dists <- calculate_minimum_distances_between_celltypes(
SPIAT::defined_image, cell_types_of_interest = c("Tumour","Immune1"), 
feature_colname = "Cell.Type")
#> [1] "Markers had been selected in minimum distance calculation: "
#> [1] "Immune1" "Tumour" 
summary_distances <- calculate_summary_distances_between_celltypes(min_dists)