Description Usage Arguments Details Value
View source: R/distance_helpers.R
Computes summary "count within" statistics
for each Slide ID in csd
and each pair of phenotypes in phenotypes
.
See phenoptr::count_within()
for details of the counts and the
summary calculation.
1 2 3 4 5 6 7 8 9 | count_within_summary(
csd,
radii,
phenotypes = NULL,
categories = NA,
details_path = NULL,
.by = "Slide ID",
extra_cols = NULL
)
|
csd |
Cell seg data with |
radii |
Vector of radii to search within. |
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 tab-separated tables with count within data for each cell. |
.by |
Column to aggregate by |
extra_cols |
The names of extra columns to include in the detailed results. |
If details_path
is provided, this will save a table with one
row per cell and columns for each phenotype and radius giving
the count of cells of that type within that distance.
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.
A data frame with summary statistics for each phenotype pair in each Slide ID.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.