#' @title Equitability. J Pielou index
#'
#' @description Computes J Pielou index know as equitability
#'
#' @param x Vector of dimension S (number of species) with the number of individuals observed in each species. NA values are allowed. 0 values are converted to NA.
#'
#' @return Equitability. J Pielou index.
#'
#' @seealso \link{shannon}
#'
#' @references
#' "Quantifying Diversity through Entropy Decomposition: Insights into Hominin Occupation and Carcass Processing at Qesem cave"
#'
#' @examples
#' data(Qesem_s)
#' equitability(Qesem_s$HU)
#'
#' @export
equitability <- function(x){               # J (Pielou)
  x <- check_x(x)
  return(shannon(x)/log(length(x)))
}
