Subset the rows and columns of a distance matrix.

subset_distance_matrix(csd, dst, row_selection, col_selection)



A data frame containing cell segmentation data, such as the result of read_cell_seg_data.


The distance matrix corresponding to csd, produced by calling distance_matrix.

row_selection, col_selection

Selection criteria for the rows and columns. Accepts all formats accepted by select_rows.


The input matrix dst subsetted to include only the rows corresponding to row_selection and columns corresponding to col_selection.

See also

Other distance functions: compute_all_nearest_distance, count_touching_cells, count_within_batch, count_within, distance_matrix, find_nearest_distance, spatial_distribution_report