[Vegan-commits] r1600 - pkg/vegan/R

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun May 8 21:08:22 CEST 2011


Author: jarioksa
Date: 2011-05-08 21:08:21 +0200 (Sun, 08 May 2011)
New Revision: 1600

Modified:
   pkg/vegan/R/anova.ccanull.R
Log:
check that the seed exists before getting the seed

Modified: pkg/vegan/R/anova.ccanull.R
===================================================================
--- pkg/vegan/R/anova.ccanull.R	2011-05-01 15:21:13 UTC (rev 1599)
+++ pkg/vegan/R/anova.ccanull.R	2011-05-08 19:08:21 UTC (rev 1600)
@@ -25,7 +25,10 @@
     else
         head <- c("!!!!! ERROR !!!!!\n")
     head <- c(head, paste("Model:", c(object$call)))
-    seed <- get(".Random.seed", envir = .GlobalEnv, inherits = FALSE)
+    if (exists(".Random.seed", envir = .GlobalEnv, inherits = FALSE))
+        seed <- get(".Random.seed", envir = .GlobalEnv, inherits = FALSE)
+    else
+        seed <- NULL
     structure(table, heading = head, Random.seed = seed,
               class = c("anova.cca", "anova", "data.frame"))
 }



More information about the Vegan-commits mailing list