calculate_nearest_distances(posi, reference_type="Macrophage",
target_types=c("Epithelial_cells_A","Epithelial_cells_B",
"Epithelial_cells_C","Epithelial_cells_D"),
id_col = "Newbarcode",
type_col = "celltype_ABCDepi")
Run the code above in your browser using DataLab