#' @title Menhinick index
#'
#' @description Computes Menhinick's index
#'
#' @param x Vector of dimension S (number of species) with the number of individuals observed in each species. NA values are allowed.
#'
#' @return Menhinick index.
#'
#' @references
#' Arnaud Barat, Andreu Sansó, Maite Arilla-Osuna, Ruth Blasco, Iñaki Pérez-Fernández, Gabriel Cifuentes-Alcobenda, Rubén Llorente, Daniel Vivar-Ríos, Ella Assaf, Ran Barkai, Avi Gopher, & Jordi Rosell-Ardèvol (2026) <doi:10.1007/s10816-026-09802-3>.
#'
#' @examples
#' data(Qesem_s)
#' menhinick(Qesem_s$HU)
#'
#' @export
menhinick <- function(x){
  x <- check_x(x)
  return(length(x)/sqrt(sum(x)))
}
