View source: R/calculate_percentage_of_grids.R
calculate_percentage_of_grids | R Documentation |
Takes the result of grid_metrics
(a RasterLayer
object) and calculates the percentage of the grid squares whose values are
above or below a specified threshold.
calculate_percentage_of_grids(raster_obj, threshold, above)
raster_obj |
Raster object in the form of the output of
|
threshold |
Numeric. The threshold for defining the pattern. |
above |
Boolean. Indicating whether the pattern is above (TRUE) or below (FALSE) the threshold. |
A number is returned
grid <- grid_metrics(SPIAT::defined_image, FUN = calculate_entropy, n_split = 5,
cell_types_of_interest=c("Tumour","Immune3"), feature_colname = "Cell.Type")
calculate_percentage_of_grids(grid, threshold = 0.75, above = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.