entropy_1d {habtools} | R Documentation |
1D Entropy
Description
Calculates entropy in 1 dimension
Usage
entropy_1d(x, grid_size, relative = FALSE)
Arguments
x |
A numeric vector. |
grid_size |
Bin size in the same unit as the data. |
relative |
Logical. Rescale entropy relative to the maximum entropy given the number of grid cells? Defaults to FALSE. |
Value
Entropy value.
Examples
x <- rnorm(1000, 5, 1)
entropy_1d(x, grid_size = 0.1)
entropy_1d(x, grid_size = 0.1, relative = TRUE)
y <- runif(1000, 1, 10)
entropy_1d(y, grid_size = 0.1)
entropy_1d(y, grid_size = 0.1, relative = TRUE)
[Package habtools version 1.1.1 Index]