[Esm-commits] r29 - in pkg/ESM: . R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Fri Mar 5 20:21:57 CET 2010


Author: timotheepoisot
Date: 2010-03-05 20:21:57 +0100 (Fri, 05 Mar 2010)
New Revision: 29

Modified:
   pkg/ESM/DESCRIPTION
   pkg/ESM/R/functions.r
Log:
ok

Modified: pkg/ESM/DESCRIPTION
===================================================================
--- pkg/ESM/DESCRIPTION	2010-03-05 19:21:36 UTC (rev 28)
+++ pkg/ESM/DESCRIPTION	2010-03-05 19:21:57 UTC (rev 29)
@@ -1,5 +1,5 @@
 Package: ESM
-Version: 1.0.0-01
+Version: 1.0.0-02
 Date: 2010-02-04
 Title: Ecological Specificity Measures
 Author: Timothee Poisot <tpoisot at um2.fr>

Modified: pkg/ESM/R/functions.r
===================================================================
--- pkg/ESM/R/functions.r	2010-03-05 19:21:36 UTC (rev 28)
+++ pkg/ESM/R/functions.r	2010-03-05 19:21:57 UTC (rev 29)
@@ -1,4 +1,4 @@
-get.LSD <- function(fit)
+get.PDI <- function(fit)
 {
 	fit <- sort(as.vector(fit),decreasing=TRUE)
 	test <- fit[2:length(fit)]
@@ -36,12 +36,12 @@
 	return(SSI)
 }
 
-lsd <- function(m)
+PDI <- function(m)
 {
 	spe <- vector('numeric',length=nrow(m))
 	for(i in 1:nrow(m))
 	{
-		spe[i] <- get.LSD(m[i,])
+		spe[i] <- get.PDI(m[i,])
 	}
 	return(spe)
 }
@@ -76,7 +76,7 @@
 	return(spe)
 }
 
-getspe <- function(mat,measure=lsd)
+getspe <- function(mat,measure=PDI)
 {
 	if(max(mat)!=1){mat<-mat/max(mat)}
 	out <- measure(as.matrix(mat))



More information about the Esm-commits mailing list