R/fHeip.R

Defines functions fHeip

Documented in fHeip

fHeip <-
function(x, k, n, location, s){
  nx <- length(x)
  if (nx==0) stop("No observations)")
  if (k=="") stop("k is missing)")
  if (n=="") stop("n is missing)")
  if (location=="") stop("location is missing)")
  ns <- length(s)
  if (ns==0) stop("s is missing)")

  h <- fShannon (x=x, k=k, n=n, location  = location )
  e <- data.frame(h[1], ((2^h[2]) - 1)/(s -1))
  names(e) <- c("location", "heip")
  return(e)
}

Try the OnomasticDiversity package in your browser

Any scripts or data that you put into this service are public.

OnomasticDiversity documentation built on May 29, 2024, 1:32 a.m.