[Vegan-commits] r1587 - branches/1.17/inst branches/1.17/man pkg/vegan/inst pkg/vegan/man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Mon Apr 11 17:55:48 CEST 2011


Author: jarioksa
Date: 2011-04-11 17:55:48 +0200 (Mon, 11 Apr 2011)
New Revision: 1587

Modified:
   branches/1.17/inst/ChangeLog
   branches/1.17/man/adipart.Rd
   branches/1.17/man/kendall.global.Rd
   branches/1.17/man/mantel.correlog.Rd
   branches/1.17/man/multipart.Rd
   branches/1.17/man/permatfull.Rd
   branches/1.17/man/radfit.Rd
   pkg/vegan/inst/ChangeLog
   pkg/vegan/man/kendall.global.Rd
Log:
merge example speed-ups to branches/1.17

Modified: branches/1.17/inst/ChangeLog
===================================================================
--- branches/1.17/inst/ChangeLog	2011-04-11 15:26:19 UTC (rev 1586)
+++ branches/1.17/inst/ChangeLog	2011-04-11 15:55:48 UTC (rev 1587)
@@ -4,6 +4,9 @@
 
 Version 1.17-10 (opened April 10, 2011)
 
+	* merged r1204, 1206, 1209, 1568: speed-up of examples in Rd
+	files. 
+
 	* merged 1555: #include's in vegdist.c.
 
 	* merged 1564: missing definitionin ordering.f.

Modified: branches/1.17/man/adipart.Rd
===================================================================
--- branches/1.17/man/adipart.Rd	2011-04-11 15:26:19 UTC (rev 1586)
+++ branches/1.17/man/adipart.Rd	2011-04-11 15:55:48 UTC (rev 1587)
@@ -103,6 +103,9 @@
 \author{\enc{Péter Sólymos}{Peter Solymos}, \email{solymos at ualberta.ca}}
 \seealso{See \code{\link{oecosimu}} for permutation settings and calculating \eqn{p}-values.}
 \examples{
+## NOTE: 'nsimul' argument usually needs to be >= 99
+## here much lower value is used for demonstration
+
 data(mite)
 data(mite.xy)
 data(mite.env)
@@ -125,12 +128,12 @@
 plot(mite.xy, main="l3", col=as.numeric(levsm$l3)+1)
 par(mfrow=c(1,1))
 ## Additive diversity partitioning
-adipart(mite ~., levsm, index="richness", nsimul=20)
+adipart(mite ~., levsm, index="richness", nsimul=19)
 ## Hierarchical null model testing
 ## diversity analysis (similar to adipart)
-hiersimu(mite ~., levsm, diversity, relative=TRUE, nsimul=25)
+hiersimu(mite ~., levsm, diversity, relative=TRUE, nsimul=19)
 ## Hierarchical testing with the Morisita index
 morfun <- function(x) dispindmorisita(x)$imst
-hiersimu(mite ~., levsm, morfun, drop.highest=TRUE, nsimul=25)
+hiersimu(mite ~., levsm, morfun, drop.highest=TRUE, nsimul=19)
 }
 \keyword{multivariate}

Modified: branches/1.17/man/kendall.global.Rd
===================================================================
--- branches/1.17/man/kendall.global.Rd	2011-04-11 15:26:19 UTC (rev 1586)
+++ branches/1.17/man/kendall.global.Rd	2011-04-11 15:55:48 UTC (rev 1587)
@@ -156,15 +156,15 @@
 
 # Reproduce the results shown in Table 2 of Legendre (2005), a single group
 mite.small <- mite.hel[c(4,9,14,22,31,34,45,53,61,69),c(13:15,23)]
-kendall.global(mite.small, nperm=99)
-kendall.post(mite.small, mult="holm", nperm=99)
+kendall.global(mite.small, nperm=49)
+kendall.post(mite.small, mult="holm", nperm=49)
 
 # Reproduce the results shown in Tables 3 and 4 of Legendre (2005), 2 groups
 group <-c(1,1,2,1,1,1,1,1,2,1,1,1,1,1,1,2,1,2,1,1,1,1,2,1,2,1,1,1,1,1,2,2,2,2,2)
-kendall.global(mite.hel, group=group, nperm=99)
-kendall.post(mite.hel, group=group, mult="holm", nperm=99)
+kendall.global(mite.hel, group=group, nperm=49)
+kendall.post(mite.hel, group=group, mult="holm", nperm=49)
 
-# NOTE: 'nperm' argument usually needs to be larger than 99.
+# NOTE: 'nperm' argument usually needs to be larger than 49.
 # It was set to this low value for demonstration purposes.
 }
 

Modified: branches/1.17/man/mantel.correlog.Rd
===================================================================
--- branches/1.17/man/mantel.correlog.Rd	2011-04-11 15:26:19 UTC (rev 1586)
+++ branches/1.17/man/mantel.correlog.Rd	2011-04-11 15:55:48 UTC (rev 1587)
@@ -150,7 +150,7 @@
 mite.hel.D = dist(mite.hel.resid)
 
 # Compute Mantel correlogram with cutoff, Pearson statistic
-mite.correlog = mantel.correlog(mite.hel.D, XY=mite.xy, nperm=99)
+mite.correlog = mantel.correlog(mite.hel.D, XY=mite.xy, nperm=49)
 summary(mite.correlog)
 mite.correlog   
 # or: print(mite.correlog)
@@ -159,11 +159,14 @@
 
 # Compute Mantel correlogram without cutoff, Spearman statistic
 mite.correlog2 = mantel.correlog(mite.hel.D, XY=mite.xy, cutoff=FALSE, 
-r.type="spearman", nperm=99)
+r.type="spearman", nperm=49)
 summary(mite.correlog2)
 mite.correlog2
 plot(mite.correlog2)
 
+# NOTE: 'nperm' argument usually needs to be larger than 49.
+# It was set to this low value for demonstration purposes.
+
 }
 
 \keyword{ multivariate }
\ No newline at end of file

Modified: branches/1.17/man/multipart.Rd
===================================================================
--- branches/1.17/man/multipart.Rd	2011-04-11 15:26:19 UTC (rev 1586)
+++ branches/1.17/man/multipart.Rd	2011-04-11 15:55:48 UTC (rev 1587)
@@ -84,6 +84,9 @@
   \code{\link{hiersimu}} for hierarchical null model testing
   and \code{\link{oecosimu}} for permutation settings and calculating \eqn{p}-values.}
 \examples{
+## NOTE: 'nsimul' argument usually needs to be >= 99
+## here much lower value is used for demonstration
+
 data(mite)
 data(mite.xy)
 data(mite.env)
@@ -100,8 +103,8 @@
     l3=cutter(mite.xy$y, cut = seq(0, 10, by = 5)),
     l4=cutter(mite.xy$y, cut = seq(0, 10, by = 10)))
 ## Multiplicative diversity partitioning
-multipart(mite ~ ., levsm, index="renyi", scales=1, nsimul=25)
-multipart(mite ~ ., levsm, index="renyi", scales=1, nsimul=25, relative=TRUE)
-multipart(mite ~ ., levsm, index="renyi", scales=1, nsimul=25, global=TRUE)
+multipart(mite ~ ., levsm, index="renyi", scales=1, nsimul=19)
+multipart(mite ~ ., levsm, index="renyi", scales=1, nsimul=19, relative=TRUE)
+multipart(mite ~ ., levsm, index="renyi", scales=1, nsimul=19, global=TRUE)
 }
 \keyword{multivariate}

Modified: branches/1.17/man/permatfull.Rd
===================================================================
--- branches/1.17/man/permatfull.Rd	2011-04-11 15:26:19 UTC (rev 1586)
+++ branches/1.17/man/permatfull.Rd	2011-04-11 15:55:48 UTC (rev 1587)
@@ -248,12 +248,16 @@
 ## check sums within strata:
 x4 <- permatfull(m, strata=c(1,1,2,2))
 summary(x4)
+
+## NOTE: 'times' argument usually needs to be >= 99
+## here much lower value is used for demonstration
+
 ## Not sequential algorithm
 data(BCI)
-a <- permatswap(BCI, "quasiswap")
+a <- permatswap(BCI, "quasiswap", times=19)
 ## Sequential algorithm
 b <- permatswap(BCI, "abuswap", fixedmar="col",
-    burnin=0, thin=100, times=50)
+    burnin=0, thin=100, times=19)
 opar <- par(mfrow=c(2,2))
 plot(a, main="Not sequential")
 plot(b, main="Sequential")

Modified: branches/1.17/man/radfit.Rd
===================================================================
--- branches/1.17/man/radfit.Rd	2011-04-11 15:26:19 UTC (rev 1586)
+++ branches/1.17/man/radfit.Rd	2011-04-11 15:55:48 UTC (rev 1587)
@@ -225,7 +225,7 @@
   \code{\link[lattice]{xyplot}}, \code{\link[lattice]{lset}}. }
 \examples{
 data(BCI)
-mod <- rad.lognormal(BCI[1,])
+mod <- rad.lognormal(BCI[5,])
 mod
 plot(mod)
 mod <- radfit(BCI[1,])
@@ -237,7 +237,7 @@
 ## Lattice graphics separately for each model
 radlattice(mod)
 # Take a subset of BCI to save time and nerves
-mod <- radfit(BCI[2:5,])
+mod <- radfit(BCI[3:5,])
 mod
 plot(mod, pch=".")
 }

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2011-04-11 15:26:19 UTC (rev 1586)
+++ pkg/vegan/inst/ChangeLog	2011-04-11 15:55:48 UTC (rev 1587)
@@ -6,13 +6,15 @@
 
 	* adipart.Rd, multipart.Rd: cancelled some excessive speed-ups in
 	example code made in r1204. Some of these speed-ups never made to
-	the release version, but were only made in the devel branch. Now
-	it seems that sped-up examples could be merged to the release
-	(adipart.Rd, multipart.Rd, mantel.correlog.Rd, pertmatfull.Rd)
-	radfit.Rd). Probably we should speed up some other examples. The
-	five worst cases (timing in MacBook Air) are: ordistep (19.0 sec),
+	the release version, but were only made in the devel branch. The
+	sped-up examples were also merged to the release (adipart.Rd,
+	kendall.global.Rd, multipart.Rd, mantel.correlog.Rd,
+	pertmatfull.Rd, radfit.Rd). Also reverted r1224 so that
+	Guillaume's original r1206 (49 permutations instead of 99) is used
+	again. Probably we should speed up some other examples. The five
+	worst cases (timing in MacBook Air) are: ordistep (19.0 sec),
 	add1.cca (7.2 sec), tsallis (7.0 sec), prc (5.6 sec),
-	vegan-package (5.2 sec). 
+	vegan-package (5.2 sec).
 	
 Version 1.18-28 (closed April 11, 2011)
 

Modified: pkg/vegan/man/kendall.global.Rd
===================================================================
--- pkg/vegan/man/kendall.global.Rd	2011-04-11 15:26:19 UTC (rev 1586)
+++ pkg/vegan/man/kendall.global.Rd	2011-04-11 15:55:48 UTC (rev 1587)
@@ -156,15 +156,15 @@
 
 # Reproduce the results shown in Table 2 of Legendre (2005), a single group
 mite.small <- mite.hel[c(4,9,14,22,31,34,45,53,61,69),c(13:15,23)]
-kendall.global(mite.small, nperm=99)
-kendall.post(mite.small, mult="holm", nperm=99)
+kendall.global(mite.small, nperm=49)
+kendall.post(mite.small, mult="holm", nperm=49)
 
 # Reproduce the results shown in Tables 3 and 4 of Legendre (2005), 2 groups
 group <-c(1,1,2,1,1,1,1,1,2,1,1,1,1,1,1,2,1,2,1,1,1,1,2,1,2,1,1,1,1,1,2,2,2,2,2)
-kendall.global(mite.hel, group=group, nperm=99)
-kendall.post(mite.hel, group=group, mult="holm", nperm=99)
+kendall.global(mite.hel, group=group, nperm=49)
+kendall.post(mite.hel, group=group, mult="holm", nperm=49)
 
-# NOTE: 'nperm' argument usually needs to be larger than 99.
+# NOTE: 'nperm' argument usually needs to be larger than 49.
 # It was set to this low value for demonstration purposes.
 }
 



More information about the Vegan-commits mailing list