[Esm-commits] r19 - pkg/ESM/R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Nov 17 22:58:22 CET 2009
Author: timotheepoisot
Date: 2009-11-17 22:58:22 +0100 (Tue, 17 Nov 2009)
New Revision: 19
Modified:
pkg/ESM/R/functions.r
Log:
Bug in Shannon function
Modified: pkg/ESM/R/functions.r
===================================================================
--- pkg/ESM/R/functions.r 2009-11-17 20:57:17 UTC (rev 18)
+++ pkg/ESM/R/functions.r 2009-11-17 21:58:22 UTC (rev 19)
@@ -15,7 +15,7 @@
partiel[i] <- p * log(p)
}
shannon <- ifelse(length(pop)<=1,0,-sum(partiel) / log(length(pop)))
- return(shannon)
+ return(1-shannon)
}
get.DFP <- function(fit)
More information about the Esm-commits
mailing list