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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Mar 4 05:41:06 CET 2009


Author: psolymos
Date: 2009-03-04 05:41:06 +0100 (Wed, 04 Mar 2009)
New Revision: 714

Added:
   pkg/vegan/R/diagnose.permat.R
   pkg/vegan/R/print.diagnose.permat.R
Removed:
   pkg/vegan/R/permat.tsdiag.R
   pkg/vegan/R/print.permat.tsdiag.R
Log:
diagnose functions renamed


Copied: pkg/vegan/R/diagnose.permat.R (from rev 713, pkg/vegan/R/permat.tsdiag.R)
===================================================================
--- pkg/vegan/R/diagnose.permat.R	                        (rev 0)
+++ pkg/vegan/R/diagnose.permat.R	2009-03-04 04:41:06 UTC (rev 714)
@@ -0,0 +1,18 @@
+diagnose.permat <-
+function(x, type = "bray") {
+    tsVec <- ts(summary(x)[[type]])
+    ARmod <- arima(tsVec, order = c(1, 0, 0))
+    ARmod$call <- match.call()
+    ARresid <- ARmod$residuals
+    BOX.tsVec <- Box.test(tsVec, lag = 1, type = "Ljung-Box")
+    BOX.tsVec$data.name <- switch(type,
+        "bray" = "Bray-Curtis dissimilarities",
+        "chisq" = "Chi-squared values")
+    BOX.ARresid <- Box.test(ARresid, lag = 1, type = "Ljung-Box")
+    BOX.ARresid$data.name <- "AR residuals"
+    x$perm <- NULL
+    out <- list(call=match.call(), x=x, ts=tsVec,
+        arima=ARmod, box.ts=BOX.tsVec, box.resid=BOX.ARresid)
+    class(out) <- "diagnose.permat"
+    out
+}

Deleted: pkg/vegan/R/permat.tsdiag.R
===================================================================
--- pkg/vegan/R/permat.tsdiag.R	2009-03-04 04:40:17 UTC (rev 713)
+++ pkg/vegan/R/permat.tsdiag.R	2009-03-04 04:41:06 UTC (rev 714)
@@ -1,18 +0,0 @@
-diagnose.permat <-
-function(x, type = "bray") {
-    tsVec <- ts(summary(x)[[type]])
-    ARmod <- arima(tsVec, order = c(1, 0, 0))
-    ARmod$call <- match.call()
-    ARresid <- ARmod$residuals
-    BOX.tsVec <- Box.test(tsVec, lag = 1, type = "Ljung-Box")
-    BOX.tsVec$data.name <- switch(type,
-        "bray" = "Bray-Curtis dissimilarities",
-        "chisq" = "Chi-squared values")
-    BOX.ARresid <- Box.test(ARresid, lag = 1, type = "Ljung-Box")
-    BOX.ARresid$data.name <- "AR residuals"
-    x$perm <- NULL
-    out <- list(call=match.call(), x=x, ts=tsVec,
-        arima=ARmod, box.ts=BOX.tsVec, box.resid=BOX.ARresid)
-    class(out) <- "diagnose.permat"
-    out
-}

Copied: pkg/vegan/R/print.diagnose.permat.R (from rev 713, pkg/vegan/R/print.permat.tsdiag.R)
===================================================================
--- pkg/vegan/R/print.diagnose.permat.R	                        (rev 0)
+++ pkg/vegan/R/print.diagnose.permat.R	2009-03-04 04:41:06 UTC (rev 714)
@@ -0,0 +1,8 @@
+print.diagnose.permat <-
+function(x, ...) {
+    cat("First order autoregressive model\n")
+    print(x$arima)
+    cat("\nTest of independence\n")
+    print(x$box.ts)
+    print(x$box.resid)
+}

Deleted: pkg/vegan/R/print.permat.tsdiag.R
===================================================================
--- pkg/vegan/R/print.permat.tsdiag.R	2009-03-04 04:40:17 UTC (rev 713)
+++ pkg/vegan/R/print.permat.tsdiag.R	2009-03-04 04:41:06 UTC (rev 714)
@@ -1,8 +0,0 @@
-print.diagnose.permat <-
-function(x, ...) {
-    cat("First order autoregressive model\n")
-    print(x$arima)
-    cat("\nTest of independence\n")
-    print(x$box.ts)
-    print(x$box.resid)
-}



More information about the Vegan-commits mailing list