Computes Shannon entropy H = -sum(p * log(p, base)) for a
vector of clonotype counts. Natural log (nats) by default; set
base = 2 for bits.
Usage
tcr_shannon_entropy(counts, base = exp(1))Computes Shannon entropy H = -sum(p * log(p, base)) for a
vector of clonotype counts. Natural log (nats) by default; set
base = 2 for bits.
tcr_shannon_entropy(counts, base = exp(1))