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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Mar 4 05:40:17 CET 2009


Author: psolymos
Date: 2009-03-04 05:40:17 +0100 (Wed, 04 Mar 2009)
New Revision: 713

Added:
   pkg/vegan/R/diagnose.R
Modified:
   pkg/vegan/R/permat.tsdiag.R
   pkg/vegan/R/permatfull.R
   pkg/vegan/R/permatswap.R
   pkg/vegan/R/print.permat.tsdiag.R
Log:
subclass added, new method: diagnose


Added: pkg/vegan/R/diagnose.R
===================================================================
--- pkg/vegan/R/diagnose.R	                        (rev 0)
+++ pkg/vegan/R/diagnose.R	2009-03-04 04:40:17 UTC (rev 713)
@@ -0,0 +1,5 @@
+`diagnose` <-
+function (x, ...)
+{
+    UseMethod("diagnose")
+}

Modified: pkg/vegan/R/permat.tsdiag.R
===================================================================
--- pkg/vegan/R/permat.tsdiag.R	2009-03-03 16:54:21 UTC (rev 712)
+++ pkg/vegan/R/permat.tsdiag.R	2009-03-04 04:40:17 UTC (rev 713)
@@ -1,4 +1,4 @@
-permat.tsdiag <-
+diagnose.permat <-
 function(x, type = "bray") {
     tsVec <- ts(summary(x)[[type]])
     ARmod <- arima(tsVec, order = c(1, 0, 0))
@@ -13,6 +13,6 @@
     x$perm <- NULL
     out <- list(call=match.call(), x=x, ts=tsVec,
         arima=ARmod, box.ts=BOX.tsVec, box.resid=BOX.ARresid)
-    class(out) <- "permat.tsdiag"
+    class(out) <- "diagnose.permat"
     out
 }

Modified: pkg/vegan/R/permatfull.R
===================================================================
--- pkg/vegan/R/permatfull.R	2009-03-03 16:54:21 UTC (rev 712)
+++ pkg/vegan/R/permatfull.R	2009-03-04 04:40:17 UTC (rev 713)
@@ -79,6 +79,6 @@
     attr(out, "strata") <- str
     attr(out, "burnin") <- NA
     attr(out, "thin") <- NA
-    class(out) <- c("permat", "list")
+    class(out) <- c("permatfull", "permat")
     return(out)
 }

Modified: pkg/vegan/R/permatswap.R
===================================================================
--- pkg/vegan/R/permatswap.R	2009-03-03 16:54:21 UTC (rev 712)
+++ pkg/vegan/R/permatswap.R	2009-03-04 04:40:17 UTC (rev 713)
@@ -164,6 +164,6 @@
     attr(out, "strata") <- str
     attr(out, "burnin") <- burnin
     attr(out, "thin") <- thin
-    class(out) <- c("permat", "list")
+    class(out) <- c("permatswap", "permat")
     return(out)
 }

Modified: pkg/vegan/R/print.permat.tsdiag.R
===================================================================
--- pkg/vegan/R/print.permat.tsdiag.R	2009-03-03 16:54:21 UTC (rev 712)
+++ pkg/vegan/R/print.permat.tsdiag.R	2009-03-04 04:40:17 UTC (rev 713)
@@ -1,4 +1,4 @@
-print.permat.tsdiag <-
+print.diagnose.permat <-
 function(x, ...) {
     cat("First order autoregressive model\n")
     print(x$arima)



More information about the Vegan-commits mailing list