[Vegan-commits] r1490 - pkg/vegan/tests

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Feb 15 09:40:50 CET 2011


Author: jarioksa
Date: 2011-02-15 09:40:50 +0100 (Tue, 15 Feb 2011)
New Revision: 1490

Modified:
   pkg/vegan/tests/vegan-tests.R
   pkg/vegan/tests/vegan-tests.Rout.save
Log:
nestednodf test

Modified: pkg/vegan/tests/vegan-tests.R
===================================================================
--- pkg/vegan/tests/vegan-tests.R	2011-02-15 07:49:05 UTC (rev 1489)
+++ pkg/vegan/tests/vegan-tests.R	2011-02-15 08:40:50 UTC (rev 1490)
@@ -58,3 +58,16 @@
 ## clean-up
 rm(df, spno, fla, m, p, q, .Random.seed)
 ### <--- END anova.cca test --->
+
+### nestednodf: test case by Daniel Spitale in a comment to News on
+### the release of vegan 1.17-6 in vegan.r-forge.r-project.org.
+x <- c(1,0,1,1,1,1,1,1,0,0,0,1,1,1,0,1,1,0,0,0,1,1,0,0,0)
+m1 <- matrix(x, nrow=5, ncol=5, byrow=FALSE)# as in Fig 2 Almeida-Neto et al 2008.
+(nodf1 <- nestednodf(m1, order = FALSE, weighted = FALSE))
+## Now the same matrix but with abundance data
+x <- c(5,0,2,1,1,4,1,1,0,0,0,7,1,1,0,3,1,0,0,0,9,1,0,0,0)
+m <- matrix(x, nrow=5, ncol=5, byrow=FALSE)
+(nodfq <- nestednodf(m, order = FALSE, weighted = FALSE))
+identical(nodf1, nodfq)
+rm(x, m, m1, nodfq, nodf1)
+### end nestednodf

Modified: pkg/vegan/tests/vegan-tests.Rout.save
===================================================================
--- pkg/vegan/tests/vegan-tests.Rout.save	2011-02-15 07:49:05 UTC (rev 1489)
+++ pkg/vegan/tests/vegan-tests.Rout.save	2011-02-15 08:40:50 UTC (rev 1490)
@@ -195,3 +195,25 @@
 > rm(df, spno, fla, m, p, q, .Random.seed)
 > ### <--- END anova.cca test --->
 > 
+> ### nestednodf: test case by Daniel Spitale in a comment to News on
+> ### the release of vegan 1.17-6 in vegan.r-forge.r-project.org.
+> x <- c(1,0,1,1,1,1,1,1,0,0,0,1,1,1,0,1,1,0,0,0,1,1,0,0,0)
+> m1 <- matrix(x, nrow=5, ncol=5, byrow=FALSE)# as in Fig 2 Almeida-Neto et al 2008.
+> (nodf1 <- nestednodf(m1, order = FALSE, weighted = FALSE))
+N columns  : 53.33333 
+N rows     : 63.33333 
+NODF       : 58.33333 
+Matrix fill: 0.56 
+> ## Now the same matrix but with abundance data
+> x <- c(5,0,2,1,1,4,1,1,0,0,0,7,1,1,0,3,1,0,0,0,9,1,0,0,0)
+> m <- matrix(x, nrow=5, ncol=5, byrow=FALSE)
+> (nodfq <- nestednodf(m, order = FALSE, weighted = FALSE))
+N columns  : 53.33333 
+N rows     : 63.33333 
+NODF       : 58.33333 
+Matrix fill: 0.56 
+> identical(nodf1, nodfq)
+[1] TRUE
+> rm(x, m, m1, nodfq, nodf1)
+> ### end nestednodf
+> 



More information about the Vegan-commits mailing list