[Vegan-commits] r2129 - in pkg/vegan: R inst

noreply at r-forge.r-project.org noreply at r-forge.r-project.org
Sun Apr 15 08:04:32 CEST 2012


Author: jarioksa
Date: 2012-04-15 08:04:31 +0200 (Sun, 15 Apr 2012)
New Revision: 2129

Modified:
   pkg/vegan/R/centroids.cca.R
   pkg/vegan/inst/ChangeLog
Log:
Squashed commit of the following:

commit 511d3642fb58717c78f4f17e5059aa26732f652d
Author: Jari Oksanen <jari.oksanen at oulu.fi>
Date:   Sun Apr 15 08:32:20 2012 +0300

    envfit()/factorfit() failed factors had unused levels

    Reported as issue #8 in github.com by Eduard Sz?\195?\182cz and fixed
    in centroids.cca()

Modified: pkg/vegan/R/centroids.cca.R
===================================================================
--- pkg/vegan/R/centroids.cca.R	2012-04-11 08:20:20 UTC (rev 2128)
+++ pkg/vegan/R/centroids.cca.R	2012-04-15 06:04:31 UTC (rev 2129)
@@ -5,6 +5,7 @@
     if (!any(facts))
         return(NULL)
     mf <- mf[, facts, drop = FALSE]
+    mf <- droplevels(mf)
     if (missing(wt)) 
         wt <- rep(1, nrow(mf))
     ind <- seq_len(nrow(mf))

Modified: pkg/vegan/inst/ChangeLog
===================================================================
--- pkg/vegan/inst/ChangeLog	2012-04-11 08:20:20 UTC (rev 2128)
+++ pkg/vegan/inst/ChangeLog	2012-04-15 06:04:31 UTC (rev 2129)
@@ -20,6 +20,10 @@
 	to NAMESPACE issues. Reported as issue #7 by Eduard Szöcz in
 	github.com.
 
+	* envfit: failed if some of the environmental variables were
+	factor with unused factor levels. Fixed in centroids.cca. Reported
+	as issue #8 in github.com by Eduard Szöcz.
+
 	* msoplot: expose 'ylim' as an argument. Previously, 'ylim' was
 	set internally and user could not change it setting, although
 	y-axis maximum was sometimes so low that standard errors were



More information about the Vegan-commits mailing list