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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Nov 12 10:46:38 CET 2009


Author: timotheepoisot
Date: 2009-11-12 10:46:38 +0100 (Thu, 12 Nov 2009)
New Revision: 9

Modified:
   pkg/ESM/DESCRIPTION
   pkg/ESM/R/functions.r
   pkg/ESM/R/std.matrix.r
Log:
Changes in the getspe function to ensure that mat is passed as a matrix

Modified: pkg/ESM/DESCRIPTION
===================================================================
--- pkg/ESM/DESCRIPTION	2009-11-12 09:44:40 UTC (rev 8)
+++ pkg/ESM/DESCRIPTION	2009-11-12 09:46:38 UTC (rev 9)
@@ -1,5 +1,5 @@
 Package: ESM
-Version: 0.1.1-02
+Version: 0.1.1-03
 Date: 2009-11-06
 Title: Ecological Specificity Measures
 Author: Timothee Poisot <timothee.poisot at univ-montp2.fr>, Michael E Hochberg <michael.hochberg at univ-montp2.fr>

Modified: pkg/ESM/R/functions.r
===================================================================
--- pkg/ESM/R/functions.r	2009-11-12 09:44:40 UTC (rev 8)
+++ pkg/ESM/R/functions.r	2009-11-12 09:46:38 UTC (rev 9)
@@ -111,7 +111,7 @@
 getspe <- function(mat,measure=hr)
 {
 	if(max(mat)!=1){mat<-mat/max(mat)}
-	out <- measure(mat)
+	out <- measure(as.matrix(mat))
 	names(out) <- rownames(mat)
 	return(out)
 }
\ No newline at end of file

Modified: pkg/ESM/R/std.matrix.r
===================================================================
--- pkg/ESM/R/std.matrix.r	2009-11-12 09:44:40 UTC (rev 8)
+++ pkg/ESM/R/std.matrix.r	2009-11-12 09:46:38 UTC (rev 9)
@@ -1,4 +1,4 @@
-std.matrix <- function(filename,t=TRUE)
+std.matrix <- function(filename)
 {
 	dat <- read.table(filename)
 	if(t){dat<-t(dat)}



More information about the Esm-commits mailing list