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