I have the following dataset in R and I want to calculate Shannon's entropy. In order to do that since the data are continuous, I have to discretise them. Using the discretize2d function of Entropy package, the entropy between $X_1$ and $X_2$ can be calculated as follows:
set.seed(1234)
data <- matrix(rnorm(150 * 11, mean = 0, sd = 1), 150, 11)
library(entropy)
dis <- discretize2d(data[,1],data[,2], numBins1 = 10, numBins2 = 10)
entropy(dis)
I want to create a list containing all the discretize2d results between between the variables of data so i can later just use entropy(dis$1.2) and getting the same result as entropy(dis). Can someone help me code it?