Skip to content

Commit

Permalink
add fix for chao1 function
Browse files Browse the repository at this point in the history
  • Loading branch information
Vadim Nazarov committed Apr 3, 2015
1 parent cb5c8a0 commit f08690d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion R/diversity.R
Original file line number Diff line number Diff line change
Expand Up @@ -119,7 +119,7 @@ chao1 <- function (.data) {
# f1 != && f2 != 0
else {
const <- (n - 1) / n
e <- D + f1^2 / (2 * f1) * const
e <- D + f1^2 / (2 * f2) * const
f12 <- f1 / f2
v <- f2 * (const * f12^2 / 2 + const^2 * f12^3 + const^2 * f12^4 / 4)
t <- e - D
Expand Down

0 comments on commit f08690d

Please sign in to comment.