R/pIa.R

Defines functions pIa

Documented in pIa

pIa <-
function(phyl, comm, exponent = 2, tol = 1e-8){

  if(is.vector(comm))
    return(sum(aptree(phyl, comm, exponent, tol)))
  else{
    res <- colSums(aptree(phyl, comm, exponent, tol))
    tab <- cbind.data.frame(res)
    names(tab) <- "diversity"
    rownames(tab) <- rownames(comm)
    return(tab)
  }
  
}

Try the adiv package in your browser

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

adiv documentation built on Oct. 6, 2022, 5:08 p.m.