[Vegan-commits] r535 - in branches/1.15: R inst
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Wed Oct 29 08:36:49 CET 2008
Author: jarioksa
Date: 2008-10-29 08:36:48 +0100 (Wed, 29 Oct 2008)
New Revision: 535
Modified:
branches/1.15/R/nesteddisc.R
branches/1.15/R/print.nesteddisc.R
branches/1.15/R/wcmdscale.R
branches/1.15/inst/ChangeLog
Log:
merged r526 (typo in wcmdscale rsult) and r533 (tie warning in nesteddisc) to branches/1.15
Modified: branches/1.15/R/nesteddisc.R
===================================================================
--- branches/1.15/R/nesteddisc.R 2008-10-27 13:54:18 UTC (rev 534)
+++ branches/1.15/R/nesteddisc.R 2008-10-29 07:36:48 UTC (rev 535)
@@ -2,11 +2,11 @@
function(comm)
{
comm <- ifelse(comm > 0, 1, 0)
- j <- rev(order(colSums(comm)))
+ rs <- colSums(comm)
+ j <- rev(order(rs))
comm <- comm[, j]
Ad <- sum(comm[col(comm) <= rowSums(comm)] == 0)
- out <- list(statistic=Ad)
+ out <- list(statistic=Ad, ties = length(unique(rs)) < length(rs))
class(out) <- "nesteddisc"
out
}
-
Modified: branches/1.15/R/print.nesteddisc.R
===================================================================
--- branches/1.15/R/print.nesteddisc.R 2008-10-27 13:54:18 UTC (rev 534)
+++ branches/1.15/R/print.nesteddisc.R 2008-10-29 07:36:48 UTC (rev 535)
@@ -2,6 +2,7 @@
function(x, ...)
{
cat("nestedness discrepancy:", x$statistic, "\n")
+ if(x$ties)
+ cat("There are tied column frequencies: result can depend on input order\n")
invisible(x)
}
-
Modified: branches/1.15/R/wcmdscale.R
===================================================================
--- branches/1.15/R/wcmdscale.R 2008-10-27 13:54:18 UTC (rev 534)
+++ branches/1.15/R/wcmdscale.R 2008-10-29 07:36:48 UTC (rev 535)
@@ -31,10 +31,9 @@
rownames(points) <- rownames(m)
if (eig || x.ret || add) {
out <- list(points = points, eig = if (eig) e$values[-n],
- x = if (x.ret) m, ac = NA, GOF = NA, weigths = w)
+ x = if (x.ret) m, ac = NA, GOF = NA, weights = w)
class(out) <- "wcmdscale"
}
else out <- points
out
}
-
Modified: branches/1.15/inst/ChangeLog
===================================================================
--- branches/1.15/inst/ChangeLog 2008-10-27 13:54:18 UTC (rev 534)
+++ branches/1.15/inst/ChangeLog 2008-10-29 07:36:48 UTC (rev 535)
@@ -5,6 +5,10 @@
Version 1.15-1 (opened October 10, 2008)
+ * merged r533: warning of ties in nesteddisc().
+
+ * merged r526: typo in wcmdscale() result object item.
+
* copied head/tail of summary.cca.
* merged r516, 519, 521: radfit fixes for 0..2 species
More information about the Vegan-commits
mailing list