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

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Wed Jul 15 23:21:55 CEST 2009


Author: psolymos
Date: 2009-07-15 23:21:54 +0200 (Wed, 15 Jul 2009)
New Revision: 897

Modified:
   pkg/vegan/R/indpower.R
   pkg/vegan/man/beals.Rd
Log:
row/col mix up fixed

Modified: pkg/vegan/R/indpower.R
===================================================================
--- pkg/vegan/R/indpower.R	2009-07-15 20:46:09 UTC (rev 896)
+++ pkg/vegan/R/indpower.R	2009-07-15 21:21:54 UTC (rev 897)
@@ -16,7 +16,7 @@
         "0" = ip,
         "1" = ip1,
         "2" = ip2)
-    colnames(out) <- paste("i", colnames(out), sep=".")
-    rownames(out) <- paste("t", rownames(out), sep=".")
+    colnames(out) <- paste("t", colnames(out), sep=".")
+    rownames(out) <- paste("i", rownames(out), sep=".")
     out
 }

Modified: pkg/vegan/man/beals.Rd
===================================================================
--- pkg/vegan/man/beals.Rd	2009-07-15 20:46:09 UTC (rev 896)
+++ pkg/vegan/man/beals.Rd	2009-07-15 21:21:54 UTC (rev 897)
@@ -93,15 +93,16 @@
   return. \code{type = 0} returns \code{IP_I}, \code{type = 1} returns 
   \code{a}, \code{type = 2} returns \code{b}.
   Total indicator power (TIP) of an indicator species is the column mean
-  (see examples).  In the paper, one can find how to calculate confidence
+  (without its own value, see examples).  
+  In the paper, one can find how to calculate confidence
   intervals for these statistics.
 }
 \value{
   The function returns a transformed data matrix or a vector in case of 
   asking Beals smoothing for a single species.
 
-  \code{indpower} returns a matrix indicator species as columns and
-  target species as rows (this is indicated by the first letters of the
+  \code{indpower} returns a matrix with indicator species as rows and
+  target species as columns (this is indicated by the first letters of the
   row/column names).
 }
 \references{
@@ -155,7 +156,8 @@
 ## calculating IP values
 ip <- indpower(dune)
 ## and TIP values
-colMeans(ip)
+diag(ip) <- NA
+rowMeans(ip, na.rm=TRUE)
 }
 \keyword{ manip }
 \keyword{ smooth }



More information about the Vegan-commits mailing list