How do I calculate sum(xij*log2(xij)) where xij is value/observation i, in column j and then generalise this function for n columns?