Calculates the Boltzmann entropy of a landscape gradient
get_boltzmann(
x,
method = "aggregation",
na_adjust = TRUE,
base = "log10",
relative = FALSE
)
# S3 method for default
get_boltzmann(
x,
method = "aggregation",
na_adjust = TRUE,
base = "log10",
relative = FALSE
)
# S3 method for matrix
get_boltzmann(
x,
method = "aggregation",
na_adjust = TRUE,
base = "log10",
relative = FALSE
)
# S3 method for array
get_boltzmann(
x,
method = "aggregation",
na_adjust = TRUE,
base = "log10",
relative = FALSE
)
# S3 method for RasterLayer
get_boltzmann(
x,
method = "aggregation",
na_adjust = TRUE,
base = "log10",
relative = FALSE
)
# S3 method for RasterStack
get_boltzmann(
x,
method = "aggregation",
na_adjust = TRUE,
base = "log10",
relative = FALSE
)
# S3 method for RasterBrick
get_boltzmann(
x,
method = "aggregation",
na_adjust = FALSE,
base = "log10",
relative = FALSE
)
# S3 method for stars
get_boltzmann(
x,
method = "aggregation",
na_adjust = TRUE,
base = "log10",
relative = FALSE
)
# S3 method for SpatRaster
get_boltzmann(
x,
method = "aggregation",
na_adjust = TRUE,
base = "log10",
relative = FALSE
)
SpatRaster, stars, RasterLayer, RasterStack, RasterBrick, matrix, or array.
A method used. Either "hierarchy" for the hierarchy-based method (Gao et al., 2017) or "aggregation" (default) for the aggregation-based method (Gao et al., 2019).
Should the output value be adjusted to the proportion of not missing cells? Either TRUE (default) or FALSE
A logarithm base ("log", "log2" or "log10").
Should a relative or absolute entropy be calculated? TRUE or FALSE (default).
a numeric vector
The method for computing the Boltzmann entropy of a landscape gradient works on integer values that are either positive or equals to zero. This function automatically rounds values to the nearest integer value (rounding halfway cases away from zero) and negative values are shifted to positive values.
Gao, Peichao, Hong Zhang, and Zhilin Li. "A hierarchy-based solution to calculate the configurational entropy of landscape gradients." Landscape Ecology 32.6 (2017): 1133-1146.
Gao, Peichao, Hong Zhang, and Zhilin Li. "An efficient analytical method for computing the Boltzmann entropy of a landscape gradient." Transactions in GIS (2018).
Gao, Peichao and Zhilin Li. "Aggregation-based method for computing absolute Boltzmann entropy of landscape gradient with full thermodynamic consistency" Landscape Ecology (2019)
new_c = c(56, 86, 98, 50, 45, 56, 96, 25,
15, 55, 85, 69, 12, 52, 25, 56,
32, 25, 68, 98, 58, 66, 56, 58)
lg = matrix(new_c, nrow = 3, ncol = 8, byrow = TRUE)
get_boltzmann(lg, relative = FALSE, method = "hierarchy", base = "log10")
#> [1] 48.43241
get_boltzmann(lg, relative = TRUE, method = "hierarchy", base = "log2")
#> [1] 117.934
get_boltzmann(lg, relative = TRUE, method = "hierarchy", base = "log")
#> [1] 81.74565