Calculate Tsallis entropy for a vector of transcript-level expression values of one gene.
Source:R/diversity_functions.R
calculate_tsallis_entropy.RdCalculate Tsallis entropy for a vector of transcript-level expression values of one gene.
Arguments
- x
Vector of (non-negative) expression values.
- q
Tsallis entropy parameter (q > 0). Scalar or numeric vector (default: 2).
- norm
Logical; if TRUE, normalize entropy by its theoretical maximum (values in [0,1]).
- what
Which quantity to return: 'S' (Tsallis entropy), 'D' (Hill numbers), or 'both'.
- log_base
Base of the logarithm used for Shannon limits and normalization (default:
exp(1)).
Value
For `what = 'S'` or `what = 'D'`: a numeric vector (named when length(q) > 1). For `what = 'both'`: a list with components `$S` and `$D`.