[Vegan-commits] r1584 - in branches/1.17: . R inst man src

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Apr 10 08:14:55 CEST 2011


Author: jarioksa
Date: 2011-04-10 08:14:54 +0200 (Sun, 10 Apr 2011)
New Revision: 1584

Modified:
   branches/1.17/DESCRIPTION
   branches/1.17/R/metaMDSrotate.R
   branches/1.17/inst/ChangeLog
   branches/1.17/man/metaMDS.Rd
   branches/1.17/src/ordering.f
Log:
open 1.17-10 branch, port r1564 (def in ordering.f), r1570 (na.rm in metaMDSrotate)

Modified: branches/1.17/DESCRIPTION
===================================================================
--- branches/1.17/DESCRIPTION	2011-04-09 08:18:39 UTC (rev 1583)
+++ branches/1.17/DESCRIPTION	2011-04-10 06:14:54 UTC (rev 1584)
@@ -1,7 +1,7 @@
 Package: vegan
 Title: Community Ecology Package
-Version: 1.17-9
-Date: March 31, 2011
+Version: 1.17-10
+Date: April 10, 2011
 Author: Jari Oksanen, F. Guillaume Blanchet, Roeland Kindt, Pierre Legendre, 
    R. B. O'Hara, Gavin L. Simpson, Peter Solymos, M. Henry H. Stevens, 
    Helene Wagner  

Modified: branches/1.17/R/metaMDSrotate.R
===================================================================
--- branches/1.17/R/metaMDSrotate.R	2011-04-09 08:18:39 UTC (rev 1583)
+++ branches/1.17/R/metaMDSrotate.R	2011-04-10 06:14:54 UTC (rev 1584)
@@ -1,6 +1,6 @@
 ### Rotates metaMDS result so that axis one is parallel to vector 'x'
 `metaMDSrotate` <-
-    function(object, vec, ...) 
+    function(object, vec, na.rm = FALSE, ...) 
 {
     if (!inherits(object, "metaMDS"))
         stop(gettextf("function works only with 'metaMDS' results"))
@@ -24,8 +24,12 @@
     ## vectorfit finds the direction cosine. We rotate first axis to
     ## 'vec' which means that we make other axes orthogonal to 'vec'
     ## one by one
+    if (na.rm)
+        keep <- !is.na(vec)
+    else
+        keep <- !logical(length(vec))
     for (k in 2:N) {
-        rot <- vectorfit(x[, c(1,k)], vec, permutations=0)$arrows
+        rot <- vectorfit(x[keep, c(1,k)], vec[keep], permutations=0)$arrows
         rot <- drop(rot)
         ## counterclockwise rotation matrix:
         ## [cos theta   -sin theta]

Modified: branches/1.17/inst/ChangeLog
===================================================================
--- branches/1.17/inst/ChangeLog	2011-04-09 08:18:39 UTC (rev 1583)
+++ branches/1.17/inst/ChangeLog	2011-04-10 06:14:54 UTC (rev 1584)
@@ -2,6 +2,12 @@
 
 VEGAN RELEASE VERSIONS at http://cran.r-project.org/
 
+Version 1.17-10 (opened April 10, 2011)
+
+	* merged 1564: missing definitionin ordering.f.
+
+	* merged 1570: na.rm in metaMDSrotate.
+
 Version 1.17-9 (released March 31, 2011)
 
 	* merged 1551,2: anova.cca(..., by = "axis") failed in partial

Modified: branches/1.17/man/metaMDS.Rd
===================================================================
--- branches/1.17/man/metaMDS.Rd	2011-04-09 08:18:39 UTC (rev 1583)
+++ branches/1.17/man/metaMDS.Rd	2011-04-10 06:14:54 UTC (rev 1584)
@@ -43,7 +43,7 @@
 postMDS(X, dist, pc=TRUE, center=TRUE, halfchange, threshold=0.8,
         nthreshold=10, plot=FALSE, ...)
 metaMDSredist(object, ...)
-metaMDSrotate(object, vec, ...)
+metaMDSrotate(object, vec, na.rm = FALSE, ...)
 }
 
 \arguments{
@@ -108,6 +108,7 @@
  \item{nthreshold}{ Minimum number of points in half-change scaling. }
  \item{object}{A result object from \code{metaMDS}.}
  \item{vec}{A continuous site variable (vector).}
+ \item{na.rm}{Remove missing values from continuous variable \code{vec}.}
  \item{...}{Other parameters passed to functions.}
 }
 \details{

Modified: branches/1.17/src/ordering.f
===================================================================
--- branches/1.17/src/ordering.f	2011-04-09 08:18:39 UTC (rev 1583)
+++ branches/1.17/src/ordering.f	2011-04-10 06:14:54 UTC (rev 1584)
@@ -68,6 +68,7 @@
       Subroutine TWWS(mat,n,k,sumrow,sumtot,rowscore,colscore,
      +                toler,epsilon)
       Integer n, niter
+      Integer mat(n,k)
       Real sumrow(n),sumtot,d
       Real*8 rowscore(n),colscore(n),epsilon,oldS,newS,toler,
      +       oldrowsc(n)



More information about the Vegan-commits mailing list