[Vegan-commits] r477 - in branches/1.13: R inst man

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Tue Aug 19 09:59:54 CEST 2008


Author: jarioksa
Date: 2008-08-19 09:59:54 +0200 (Tue, 19 Aug 2008)
New Revision: 477

Modified:
   branches/1.13/R/ordiArgAbsorber.R
   branches/1.13/R/plot.procrustes.R
   branches/1.13/R/varpart.R
   branches/1.13/inst/ChangeLog
   branches/1.13/man/cascadeKM.Rd
   branches/1.13/man/cca.Rd
   branches/1.13/man/varpart.Rd
   branches/1.13/man/vegan-internal.Rd
Log:
merges to branches/1.13: r434 (wider formula in varpart), r461 
(ordiArgAbsorber knows 'const' arg), r472 (plot.procrustes failed with 
identical configs), and doc updates r435 (cca, varpart), r465 
(cascadeKM)


Modified: branches/1.13/R/ordiArgAbsorber.R
===================================================================
--- branches/1.13/R/ordiArgAbsorber.R	2008-08-15 00:03:18 UTC (rev 476)
+++ branches/1.13/R/ordiArgAbsorber.R	2008-08-19 07:59:54 UTC (rev 477)
@@ -1,3 +1,3 @@
 `ordiArgAbsorber` <- function(..., shrink, origin, scaling, triangular,
-                              display, choices, FUN)
+                              display, choices, const, FUN)
     match.fun(FUN)(...)

Modified: branches/1.13/R/plot.procrustes.R
===================================================================
--- branches/1.13/R/plot.procrustes.R	2008-08-15 00:03:18 UTC (rev 476)
+++ branches/1.13/R/plot.procrustes.R	2008-08-19 07:59:54 UTC (rev 477)
@@ -20,10 +20,16 @@
 	        abline(v = 0, lty = 2)
             abline(h = 0, lty = 2)
             if (ncol(x$rotation) == 2) {
-                ## Sometimes rotation[1,1] is 2.2e-16 above one
-                x$rotation[1,1] <- min(x$rotation[1,1], 1)
-                abline(0, tan(acos(x$rotation[1, 1])), lty = 1)
-                abline(0, 1/tan(acos(-x$rotation[1, 1])), lty = 1)
+                ## Draw rotated axes only if they visibly differ from
+                ## unrotated axes
+                b <- abs(x$rotation[1,1])
+                EPS <- 1e-8
+                if (1 - b > EPS && b > EPS) {
+                    abline(0, tan(acos(x$rotation[1, 1])), lty = 1)
+                    abline(0, 1/tan(acos(-x$rotation[1, 1])), lty = 1)
+                } else {
+                    abline(v = 0, h = 0)
+                }
             }
             else {
             	Y <- x$Yrot %*% t(x$rotation)
@@ -59,4 +65,3 @@
     }
     invisible(out)
 }
-

Modified: branches/1.13/R/varpart.R
===================================================================
--- branches/1.13/R/varpart.R	2008-08-15 00:03:18 UTC (rev 476)
+++ branches/1.13/R/varpart.R	2008-08-19 07:59:54 UTC (rev 477)
@@ -40,9 +40,8 @@
         out$transfo <- transfo
     out$call <- match.call()
     mx <- rep(" ", length(X))
-    for (i in 1:length(X)) mx[i] <- deparse(out$call[[i+2]])
+    for (i in 1:length(X)) mx[i] <- deparse(out$call[[i+2]], width.cutoff = 500)
     out$tables <- mx
     class(out) <- c("varpart", class(out))
     out
 }
-

Modified: branches/1.13/inst/ChangeLog
===================================================================
--- branches/1.13/inst/ChangeLog	2008-08-15 00:03:18 UTC (rev 476)
+++ branches/1.13/inst/ChangeLog	2008-08-19 07:59:54 UTC (rev 477)
@@ -1,5 +1,3 @@
-
-	
 $Date$
 
 VEGAN DEVEL VERSIONS at http://r-forge.r-project.org/
@@ -25,6 +23,19 @@
 	* merged r453: ordiArgAbsorber knows about 'choices' and 'display'
 	args of function scores().
 
+	* merged r434: wider formula cutoff in varpart.
+
+	* merged r435: cca & varpart doc tells that formula accepts
+	matrices. 
+
+	* merged r461, 462: ordiArgAbsorber learnt about 'const' arg in
+	scores.rda.
+
+	* merged r465: cascadeKM doc update.
+
+	* merged r472: fix procrustes plot failure with identical
+	configurations. 
+
 Version 1.13-1 (released June 11, 2008)
 
 	* adonis: speed-up and doc updates.

Modified: branches/1.13/man/cascadeKM.Rd
===================================================================
--- branches/1.13/man/cascadeKM.Rd	2008-08-15 00:03:18 UTC (rev 476)
+++ branches/1.13/man/cascadeKM.Rd	2008-08-19 07:59:54 UTC (rev 477)
@@ -68,7 +68,8 @@
   
   The default value is \code{"calinski"}, which refers to the well-known
   Calinski-Harabasz (1974) criterion. The other available index is the
-  simple structure index \code{"ssi"}. In the case of groups of equal
+  simple structure index \code{"ssi"} (Dolnicar et al. 1999).
+  In the case of groups of equal
   sizes, \code{"calinski"} is generally a good criterion to indicate the
   correct number of groups. Users should not take its indications
   literally when the groups are not equal in size. Type \code{"all"} to
@@ -82,13 +83,10 @@
     is simply an \eqn{F} (ANOVA) statistic.
  
     \item \bold{ssi}:
-    this "Simple Structure Index" 
-    combines three elements which influence the interpretability of a
-    solution, i.e., the maximum difference of each variable between the
-    clusters, the sizes of the most contrasting clusters and the
-    deviation of a variable in the cluster centers compared to its
-    overall mean. These three elements are multiplicatively combined and
-    normalized to give a value between \eqn{0} and \eqn{1}.
+    the \dQuote{Simple Structure Index} multiplicatively combines
+    several elements which influence the interpretability of a
+    partitioning solution. The best partition is indicated by the
+    highest SSI value.
   }
 
   In a simulation study, Milligan and Cooper (1985) found
@@ -148,6 +146,12 @@
 
   Calinski, T. and J. Harabasz. 1974. A dendrite method for cluster
   analysis. \emph{Commun. Stat.} \strong{3}: 1-27.
+
+  Dolnicar, S., K. Grabler and J. A. Mazanec. 1999.  A tale of three
+  cities: perceptual charting for analyzing destination images. Pp.
+  39-62 in: Woodside, A. et al. [eds.] \emph{Consumer psychology of
+  tourism, hospitality and leisure}. CAB International, New York.
+
   
   Gower, J. C. 1966. Some distance properties of latent root and vector
   methods used in multivariate analysis. \emph{Biometrika} \strong{53}:

Modified: branches/1.13/man/cca.Rd
===================================================================
--- branches/1.13/man/cca.Rd	2008-08-15 00:03:18 UTC (rev 476)
+++ branches/1.13/man/cca.Rd	2008-08-19 07:59:54 UTC (rev 477)
@@ -86,7 +86,9 @@
   The constraints can contain ordered or unordered factors,
   interactions among variables and functions of variables.  The defined
   \code{\link{contrasts}} are honoured in \code{\link{factor}}
-  variables.  The formula can include a special term \code{Condition}
+  variables.  The constraints can also be matrices (but not data
+  frames).
+  The formula can include a special term \code{Condition}
   for conditioning variables (``covariables'') ``partialled out'' before
   analysis.  So the following commands are equivalent: \code{cca(X, Y,
     Z)}, \code{cca(X ~ Y + Condition(Z))}, where \code{Y} and \code{Z}

Modified: branches/1.13/man/varpart.Rd
===================================================================
--- branches/1.13/man/varpart.Rd	2008-08-15 00:03:18 UTC (rev 476)
+++ branches/1.13/man/varpart.Rd	2008-08-19 07:59:54 UTC (rev 477)
@@ -255,7 +255,9 @@
 mite.hel <- decostand(mite, "hel")
 mod <- varpart(mite.hel, mm1, mm2, mite.pcnm)
 # Use RDA to test fraction [a]
-rda.result <- rda(mite.hel, mm1, cbind(mm2, mite.pcnm))
+# Matrix can be an argument in formula
+rda.result <- rda(mite.hel ~ mm1 + Condition(mm2) +
+   Condition(as.matrix(mite.pcnm)))
 anova(rda.result, step=200, perm.max=200)
 
 # Four explanatory tables

Modified: branches/1.13/man/vegan-internal.Rd
===================================================================
--- branches/1.13/man/vegan-internal.Rd	2008-08-15 00:03:18 UTC (rev 476)
+++ branches/1.13/man/vegan-internal.Rd	2008-08-19 07:59:54 UTC (rev 477)
@@ -18,7 +18,7 @@
 ordiTerminfo(d, data)
 ordiArrowMul(x, at = c(0,0), fill = 0.75)
 ordiArgAbsorber(..., shrink, origin, scaling, triangular,
-                display, choices, FUN)
+                display, choices, const, FUN)
 centroids.cca(x, mf, wt)
 permuted.index(n, strata)
 pasteCall(call, prefix = "Call:")



More information about the Vegan-commits mailing list