[Vegan-commits] r987 - in pkg/vegan: R man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Thu Sep 3 11:13:56 CEST 2009


Author: jarioksa
Date: 2009-09-03 11:13:53 +0200 (Thu, 03 Sep 2009)
New Revision: 987

Modified:
   pkg/vegan/R/ordiNAexclude.R
   pkg/vegan/man/cca.object.Rd
Log:
excluded and omitted rowsum are saved into cca.object.excluded

Modified: pkg/vegan/R/ordiNAexclude.R
===================================================================
--- pkg/vegan/R/ordiNAexclude.R	2009-09-03 05:53:28 UTC (rev 986)
+++ pkg/vegan/R/ordiNAexclude.R	2009-09-03 09:13:53 UTC (rev 987)
@@ -11,6 +11,9 @@
     nas <- x$na.action
     if (is.null(nas))
         return(x)
+    ## rowsums for CA (in RDA/PCA rowsum = NA)
+    if (!inherits(x, "rda"))
+        x$rowsum.exclude <- rowSums(excluded)/x$grand.total
     ## Estimate WA scores for NA cases with newdata of excluded
     ## observations
     if (is.null(x$pCCA)) {
@@ -32,7 +35,7 @@
     ## Only do this if omit is of class "exclude"
     if (!inherits(omit, "exclude"))
         return(x)
-    x$rowsum <- napredict(omit, x$rowsum) # or zero here?
+    x$rowsum <- napredict(omit, x$rowsum) # or zero here
     if (!is.null(x$CCA)) {
         x$CCA$u <- napredict(omit, x$CCA$u)
         x$CCA$wa <- napredict(omit, x$CCA$wa)

Modified: pkg/vegan/man/cca.object.Rd
===================================================================
--- pkg/vegan/man/cca.object.Rd	2009-09-03 05:53:28 UTC (rev 986)
+++ pkg/vegan/man/cca.object.Rd	2009-09-03 09:13:53 UTC (rev 987)
@@ -16,9 +16,13 @@
 \value{
   A \code{cca} object has the following elements:
   \item{call }{the function call.}
-  \item{colsum, rowsum }{Column and row sums in \code{cca}.  In
-    \code{rda}, item \code{colsum} contains standard deviations of
-    species and \code{rowsum} is \code{NA}.}
+  \item{colsum, rowsum, rowsum.excluded }{Column and row sums in
+    \code{cca}.  In \code{rda}, item \code{colsum} contains standard
+    deviations of species and \code{rowsum} is \code{NA}. If some data
+    were removed in \code{\link{na.action}}, the row sums of excluded
+    observations are in item \code{rowsum.excluded} in \code{cca} (but
+    not in \code{rda}). The \code{rowsum.excluded} add to the total
+    (one) of \code{rowsum}. }
   \item{grand.total}{Grand total of community data in \code{cca} and
     \code{NA} in \code{rda}.}
   \item{inertia}{Text used as the name of inertia.}



More information about the Vegan-commits mailing list