[Esm-commits] r40 - in pkg/ESM: . R
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Thu Oct 7 19:11:09 CEST 2010
Author: timotheepoisot
Date: 2010-10-07 19:11:09 +0200 (Thu, 07 Oct 2010)
New Revision: 40
Modified:
pkg/ESM/DESCRIPTION
pkg/ESM/R/functions.r
Log:
Changed function "empty" to function "fixmat" to avoid conflicts with ggplot2
Modified: pkg/ESM/DESCRIPTION
===================================================================
--- pkg/ESM/DESCRIPTION 2010-09-28 14:00:08 UTC (rev 39)
+++ pkg/ESM/DESCRIPTION 2010-10-07 17:11:09 UTC (rev 40)
@@ -1,5 +1,5 @@
Package: ESM
-Version: 1.4.0-01
+Version: 1.4.0-02
Date: 2010-08-29
Title: Ecological Specificity Measures
Author: Timothee Poisot <tpoisot at um2.fr>
Modified: pkg/ESM/R/functions.r
===================================================================
--- pkg/ESM/R/functions.r 2010-09-28 14:00:08 UTC (rev 39)
+++ pkg/ESM/R/functions.r 2010-10-07 17:11:09 UTC (rev 40)
@@ -1,4 +1,4 @@
-empty = function(mat) mat[rowSums(mat)>0,colSums(mat)>0]
+fixmat = function(mat) mat[rowSums(mat)>0,colSums(mat)>0]
pdi <- function(fit)
{
@@ -41,7 +41,7 @@
getspe <- function(mat,measure=pdi,normal='whole',...)
{
- mat <- empty(mat)
+ mat <- fixmat(mat)
if(normal=='species'){mat <- t(apply(mat,1,function(x)x/max(x)))}
if(normal=='whole'){mat <- mat/max(mat)}
out <- unlist(apply(mat,1,measure,...))
More information about the Esm-commits
mailing list