design <- matrix(c(-1, -1, -1, -1, 1,
-1, 0, 0, -1, 0,
-1, 0, -1, 0, 0,
0, 0, -1, 0, -1), nrow = 4, byrow = TRUE)
entropy <- calculate_entropy(design)
print_entropy(entropy)
print_entropy(entropy, digits = 4)
print_entropy(entropy, print_all = TRUE)
Run the code above in your browser using DataLab