Description Usage Arguments Value Examples
Calculate Metrics
1 2 | calculate_metrics(x, w, neighbourhood, fun, size = NULL,
na_action = "replace", base = "log2", ordered = TRUE)
|
x |
RasterStack with realizations |
w |
RasterStack with weights |
fun |
"mean", "geometric_mean", or "focal" |
size |
size of a motifel |
na_action |
"replace", "omit", "keep" |
base |
the unit in which entropy is measured. The default is "log2", which compute entropy in "bits". "log" and "log10" can be also used |
ordered |
the type of pairs considered. Either ordered (TRUE) or unordered (FALSE). The default is TRUE |
directions |
4/8 |
a data.frame
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 | library(sd)
library(raster)
x = create_realizations(perc_raster, n = 5)
w = create_weights(x, perc_raster, size = 100)
#1
df = calculate_metrics(x, w, neighbourhood = 4, fun = "mean")
#2
df2 = calculate_metrics(x, w, neighbourhood = 4, fun = "mean", size = 100)
my_grid = create_grid(x, size = 100)
## Not run:
df3 = dplyr::filter(df2, realization == 2)
result = dplyr::left_join(my_grid, df2, by = c("row", "col"))
plot(result)
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.