Description Usage Arguments Value
View source: R/distance_helpers.R
Computes summary nearest neighbor statistics (mean, median, etc)
for each .by
in csd
and each pair of phenotypes in phenotypes
.
Statistics are computed separately for each category in categories
and, if multiple categories are provided, once for all included cells.
Note: If categories
is NA
or includes NA
, the "All" tissue category in
the results will include all cells in csd
. If categories
does not include
NA
, the "All" tissue category will include only cells in the provided
categories.
1 2 3 4 5 6 7 8 | nearest_neighbor_summary(
csd,
phenotypes = NULL,
categories = NA,
details_path = NULL,
.by = "Slide ID",
extra_cols = NULL
)
|
csd |
Cell seg data with |
phenotypes |
Optional list of phenotypes to include. If omitted,
will use |
categories |
Optional list of tissue categories to compute within. If
omitted or |
details_path |
If present, path to save a tab-separated table for each tissue category containing nearest-neighbor data for each cell in the tissue category. |
.by |
Column to aggregate by |
extra_cols |
The names of extra columns to include in the detailed results. |
A data frame with summary statistics for each phenotype pair in each Slide ID for each tissue category.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.