Boltzmann entropy (also called configurational entropy) has been recently adopted to analyze entropy of landscape gradients (Gao et al. (2017, 2018, 2019)). The goal of belg is to provide an efficient C++ implementation of this method in R. It also extend the original idea by allowing calculations on data with missing values (Nowosad and Gao (2020)).
You can install the released version of belg from CRAN with:
And the development version from GitHub with:
# install.packages("remotes") remotes::install_github("r-spatialecology/belg")
As an example, we use two rasters -
land_gradient1 representing a complex landscape and
land_gradient2 representing a simple landscape:
The main function in this package,
get_boltzmann(), calculates the Boltzmann entropy of a landscape gradient:
This function accepts a
array object as an input. It allows for calculation of the relative (the
relative argument equal to
TRUE) and absolute Boltzmann entropy of a landscape gradient. As a default, it uses a logarithm of base 10 (
log2 are also available options for the
get_boltzmann(land_gradient1, base = "log") #>  434664.7 get_boltzmann(land_gradient1, relative = TRUE) #>  137645.4 get_boltzmann(land_gradient1, base = "log2", relative = TRUE) #>  457248.1
Two methods of calculating the Boltzmann entropy of a landscape gradient are available:
"hierarchy" (default) for the hierarchy-based method (Gao et al., 2017) or
"aggregation" for the aggregation-based method (Gao et al., 2019). The aggregation-based method requires that the number of rows and columns in the input data must be a multiple of 2.
get_boltzmann(land_gradient1, method = "aggregation") #>  188772.5 get_boltzmann(land_gradient1, relative = TRUE, method = "aggregation") #>  137645.4
More examples can be find at https://github.com/Nowosad/belg-examples.