[Vegan-commits] r2017 - branches/2.0/R branches/2.0/inst www
noreply at r-forge.r-project.org
noreply at r-forge.r-project.org
Tue Dec 6 18:51:56 CET 2011
Author: jarioksa
Date: 2011-12-06 18:51:55 +0100 (Tue, 06 Dec 2011)
New Revision: 2017
Modified:
branches/2.0/R/ordimedian.R
branches/2.0/inst/ChangeLog
branches/2.0/inst/NEWS.Rd
www/NEWS.html
Log:
merge r2016: fix empty factor levels in betadisper
Modified: branches/2.0/R/ordimedian.R
===================================================================
--- branches/2.0/R/ordimedian.R 2011-11-30 15:53:07 UTC (rev 2016)
+++ branches/2.0/R/ordimedian.R 2011-12-06 17:51:55 UTC (rev 2017)
@@ -21,12 +21,13 @@
#dmedfun <- NULL
pts <- scores(ord, display = display, ...)
inds <- names(table(groups))
- medians <- matrix(0, nrow = length(inds), ncol = ncol(pts))
+ medians <- matrix(NA, nrow = length(inds), ncol = ncol(pts))
rownames(medians) <- inds
colnames(medians) <- colnames(pts)
for (i in inds) {
X <- pts[groups == i, , drop = FALSE]
- medians[i, ] <- optim(apply(X, 2, median, na.rm = TRUE),
+ if (NROW(X) > 0)
+ medians[i, ] <- optim(apply(X, 2, median, na.rm = TRUE),
fn = medfun, gr = dmedfun,
ord = X, method = "BFGS")$par
if(label)
Modified: branches/2.0/inst/ChangeLog
===================================================================
--- branches/2.0/inst/ChangeLog 2011-11-30 15:53:07 UTC (rev 2016)
+++ branches/2.0/inst/ChangeLog 2011-12-06 17:51:55 UTC (rev 2017)
@@ -4,6 +4,8 @@
Version 2.0-3 (opened November 13, 2011)
+ * merge r2016: empty factor levels in betadisper() fixed in
+ ordimedian().
* merge r2008,9,11,12: add rarecurve.
* merge r2007: FAQ update for arrow scaling.
* merge r2004: metaMDS(..., noshare=0) triggers stepacross(), but
Modified: branches/2.0/inst/NEWS.Rd
===================================================================
--- branches/2.0/inst/NEWS.Rd 2011-11-30 15:53:07 UTC (rev 2016)
+++ branches/2.0/inst/NEWS.Rd 2011-12-06 17:51:55 UTC (rev 2017)
@@ -15,6 +15,14 @@
}
} % end new functions
+ \subsection{BUG FIXES}{
+ \itemize{
+
+ \item \code{betadisper()} failed when the \code{groups} was a
+ factor with empty levels.
+
+ }
+ } % end bug fixes
\subsection{NEW FEATURES}{
\itemize{
Modified: www/NEWS.html
===================================================================
--- www/NEWS.html 2011-11-30 15:53:07 UTC (rev 2016)
+++ www/NEWS.html 2011-12-06 17:51:55 UTC (rev 2017)
@@ -34,10 +34,27 @@
</p>
<p>
+
+
+<h4>BUG FIXES</h4>
+
+<p>
+
</p>
<p>
+<ul>
+<li> <code>betadisper()</code> failed when the <code>groups</code> was a
+factor with empty levels.
+</p>
+<p>
+</ul>
+</p>
+
+</p>
+<p>
+
<h4>NEW FEATURES</h4>
<p>
More information about the Vegan-commits
mailing list