From noreply at r-forge.r-project.org Mon Jan 11 12:05:00 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 11 Jan 2016 12:05:00 +0100 (CET) Subject: [Vegan-commits] r2984 - in pkg/vegan: R inst src Message-ID: <20160111110500.663401847BD@r-forge.r-project.org> Author: jarioksa Date: 2016-01-11 12:04:59 +0100 (Mon, 11 Jan 2016) New Revision: 2984 Modified: pkg/vegan/R/metaMDS.R pkg/vegan/R/specpool.R pkg/vegan/inst/NEWS.Rd pkg/vegan/src/monoMDS.f Log: Merge branch 'cran-2.3' into r-forge-svn-local Modified: pkg/vegan/R/metaMDS.R =================================================================== --- pkg/vegan/R/metaMDS.R 2015-12-03 13:09:29 UTC (rev 2983) +++ pkg/vegan/R/metaMDS.R 2016-01-11 11:04:59 UTC (rev 2984) @@ -33,6 +33,8 @@ attr(dis, "method") <- "user supplied" wascores <- FALSE } else { + if (trace > 2) + cat(">>> Calculation of dissimilarities\n") dis <- metaMDSdist(comm, distance = distance, autotransform = autotransform, noshare = noshare, trace = trace, @@ -40,6 +42,8 @@ } if (missing(previous.best)) previous.best <- NULL + if (trace > 2) + cat(">>> NMDS iterations\n") out <- metaMDSiter(dis, k = k, trymax = trymax, trace = trace, plot = plot, previous.best = previous.best, engine = engine, ...) @@ -47,7 +51,9 @@ ## a problem: you may have insufficient data for NMDS if (out$stress < 1e-3) { warning("Stress is (nearly) zero - you may have insufficient data") - } + } + if (trace > 2) + cat(">>> Post-processing NMDS\n") points <- postMDS(out$points, dis, plot = max(0, plot - 1), ...) if (is.null(rownames(points))) rownames(points) <- rownames(comm) Modified: pkg/vegan/R/specpool.R =================================================================== --- pkg/vegan/R/specpool.R 2015-12-03 13:09:29 UTC (rev 2983) +++ pkg/vegan/R/specpool.R 2016-01-11 11:04:59 UTC (rev 2984) @@ -35,23 +35,26 @@ S[is] <- sum(freq > 0) if (S[is] == 0) next - if (n >= 1) + if (n >= 1L) a1 <- sum(freq == 1) - if (n >= 2) + if (n >= 2L) a2 <- sum(freq == 2) - else 0 + else + a2 <- 0 chao[is] <- S[is] + if(!is.na(a2) && a2 > 0) ssc * a1 * a1/2/a2 else ssc * a1 * (a1-1)/2 jack.1[is] <- S[is] + a1 * (n - 1)/n - jack.2[is] <- S[is] + a1 * (2 * n - 3)/n - a2 * (n - - 2)^2/n/(n - 1) + if (n > 1L) + jack.2[is] <- S[is] + a1 * (2 * n - 3)/n - + a2 * (n - 2)^2/n/(n - 1) + else + jack.2[is] <- S[is] bootS[is] <- S[is] + sum((1 - p)^n) - aa <- if (!is.na(a2) && a2 > 0) - a1/a2 - else 0 - if (a2 > 0) + aa <- if (!is.na(a2) && a2 > 0) a1/a2 + else 0 + if (!is.na(a2) && a2 > 0) var.chao[is] <- a1 * ssc * (0.5 + ssc * (1 + aa/4) * aa) * aa else var.chao[is] <- @@ -61,6 +64,8 @@ 0)) var.jack1[is] <- (sum(as.numeric(names(jf))^2 * jf) - a1/n) * (n - 1)/n + } else { + var.jack1[is] <- 0 } pn <- (1 - p)^n X <- X[, freq > 0, drop = FALSE] Modified: pkg/vegan/inst/NEWS.Rd =================================================================== --- pkg/vegan/inst/NEWS.Rd 2015-12-03 13:09:29 UTC (rev 2983) +++ pkg/vegan/inst/NEWS.Rd 2016-01-11 11:04:59 UTC (rev 2984) @@ -2,6 +2,60 @@ \title{vegan News} \encoding{UTF-8} +\section{Changes in version 2.3-3}{ + \subsection{BUG FIXES}{ + \itemize{ + + \item \code{metaMDS} and \code{monoMDS} could fail if input + dissimilarities were huge: in the reported case they were of + magnitude 1E85. Fixes issue + \href{https://github.com/vegandevs/vegan/issues/152}{#152} in + Github. + + \item Permutations failed if they were defined as \pkg{permute} + control structures in \code{estaccum}, \code{ordiareatest}, + \code{renyiaccum} and \code{tsallisaccum}. Reported by Dan + Gafta (Cluj-Napoca) for \code{renyiaccum}. + + \item \code{rarefy} gave false warnings if input was a vector + or a single sampling unit. + + \item \code{gdispweight} works when input data are in a matrix + instead of a data frame. + + \item Input dissimilarities supplied in symmetric matrices or + data frames are more robustly recognized by \code{anosim}, + \code{bioenv} and \code{mrpp}. + + \item Some extrapolated richness indices in \code{specpool} + needed the number of doubletons (= number of species occurring + in two sampling units), and these failed when only one sampling + unit was supplied. The extrapolated richness cannot be + estimated from a single sampling unit, but now such cases are + handled smoothly instead of failing: observed non-extrapolated + richness with zero standard error will be reported. The issue + was reported in + \href{http://stackoverflow.com/questions/34027496/error-message-when-using-specpool-in-vegan-package}{StackOverflow}. + + } %itemize + } % bug fixes + + \subsection{NEW FEATURES}{ + \itemize{ + + \item \code{treedist} and \code{treedive} refuse to handle + trees with reversals, i.e, higher levels are more homogeneous + than lower levels. Function \code{treeheight} will estimate + their total height with absolute values of branch + lengths. Function \code{treedive} refuses to handle trees with + negative branch heights indicating negative + dissimilarities. Function \code{treedive} is faster. + + } %itemize + } %new features + +} %v2.3-3 + \section{Changes in version 2.3-2}{ \subsection{BUG FIXES}{ Modified: pkg/vegan/src/monoMDS.f =================================================================== --- pkg/vegan/src/monoMDS.f 2015-12-03 13:09:29 UTC (rev 2983) +++ pkg/vegan/src/monoMDS.f 2016-01-11 11:04:59 UTC (rev 2984) @@ -10,6 +10,10 @@ C 1.01 April 6, 2011 - added argument STRS(NGRP) to return the stress C for each of the NGRP groups of dissimilarities C i.e., from each separate regression. +C 1.02 January 7, 2016 - fixed bug in MONREG so that huge +C dissimilarities are correctly handled in +C creating the initial partition for monotone +C regression with primary tie treatment. C C Written by Dr. Peter R. Minchin C Department of Biological Sciences @@ -596,9 +600,9 @@ C ELSE FACTR1=4.0**COSAV - FACTR2=1.6/( (1.0+(MIN(1D0,SRATAV))**5) * + FACTR2=1.6/( (1.0+(MIN(1.0,SRATAV))**5) * . (1.0+ACOSAV-ABS(COSAV)) ) - FACTR3=SQRT(MIN(1D0,SRATIO)) + FACTR3=SQRT(MIN(1.0,SRATIO)) STEP=STEP*FACTR1*FACTR2*FACTR3 ENDIF RETURN @@ -900,7 +904,9 @@ IF (I.LT.N) THEN DNEXT=DISS(I+1) ELSE - DNEXT=DISS(I)+1.0 +C---Bug fix January 7, 2016: correctly handles huge dissimilarities +C DNEXT=DISS(I)+1.0 + DNEXT=DISS(I)*2.0 END IF IF (ABS(DNEXT-DISS(I)).GT.TOLER) THEN C---NTIE is the number of DISS values in the current group of tied values From noreply at r-forge.r-project.org Mon Jan 11 12:07:14 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Mon, 11 Jan 2016 12:07:14 +0100 (CET) Subject: [Vegan-commits] r2985 - www Message-ID: <20160111110714.359C5187F84@r-forge.r-project.org> Author: jarioksa Date: 2016-01-11 12:07:13 +0100 (Mon, 11 Jan 2016) New Revision: 2985 Modified: www/NEWS.html Log: NEWS Modified: www/NEWS.html =================================================================== --- www/NEWS.html 2016-01-11 11:04:59 UTC (rev 2984) +++ www/NEWS.html 2016-01-11 11:07:13 UTC (rev 2985) @@ -7,6 +7,72 @@

vegan News

+

Changes in version 2.3-3

+ + + +

BUG FIXES

+ + + + + + + +

NEW FEATURES

+ + + + + + +

Changes in version 2.3-2

From noreply at r-forge.r-project.org Tue Jan 12 09:33:55 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 12 Jan 2016 09:33:55 +0100 (CET) Subject: [Vegan-commits] r2986 - www Message-ID: <20160112083355.E17D1187F3A@r-forge.r-project.org> Author: jarioksa Date: 2016-01-12 09:33:55 +0100 (Tue, 12 Jan 2016) New Revision: 2986 Modified: www/NEWS.html Log: update NEWS Modified: www/NEWS.html =================================================================== --- www/NEWS.html 2016-01-11 11:07:13 UTC (rev 2985) +++ www/NEWS.html 2016-01-12 08:33:55 UTC (rev 2986) @@ -32,15 +32,6 @@ or a single sampling unit.

-
  • gdispweight works when input data are in a matrix -instead of a data frame. -

    -
  • -
  • Input dissimilarities supplied in symmetric matrices or -data frames are more robustly recognized by anosim, -bioenv and mrpp. -

    -
  • Some extrapolated richness indices in specpool needed the number of doubletons (= number of species occurring in two sampling units), and these failed when only one sampling @@ -68,6 +59,15 @@ negative branch heights indicating negative dissimilarities. Function treedive is faster.

    +
  • +
  • gdispweight works when input data are in a matrix +instead of a data frame. +

    +
  • +
  • Input dissimilarities supplied in symmetric matrices or +data frames are more robustly recognized by anosim, +bioenv and mrpp. +

  • From noreply at r-forge.r-project.org Tue Jan 12 09:34:24 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 12 Jan 2016 09:34:24 +0100 (CET) Subject: [Vegan-commits] r2987 - in pkg/vegan: . inst Message-ID: <20160112083424.A6B41187F3A@r-forge.r-project.org> Author: jarioksa Date: 2016-01-12 09:34:24 +0100 (Tue, 12 Jan 2016) New Revision: 2987 Modified: pkg/vegan/DESCRIPTION pkg/vegan/inst/NEWS.Rd Log: Merge branch 'cran-2.3' into r-forge-svn-local Modified: pkg/vegan/DESCRIPTION =================================================================== --- pkg/vegan/DESCRIPTION 2016-01-12 08:33:55 UTC (rev 2986) +++ pkg/vegan/DESCRIPTION 2016-01-12 08:34:24 UTC (rev 2987) @@ -1,7 +1,7 @@ Package: vegan Title: Community Ecology Package Version: 2.3-3 -Date: 2015-11-26 +Date: 2016-01-12 Author: Jari Oksanen, F. Guillaume Blanchet, Roeland Kindt, Pierre Legendre, Peter R. Minchin, R. B. O'Hara, Gavin L. Simpson, Peter Solymos, M. Henry H. Stevens, Helene Wagner Modified: pkg/vegan/inst/NEWS.Rd =================================================================== --- pkg/vegan/inst/NEWS.Rd 2016-01-12 08:33:55 UTC (rev 2986) +++ pkg/vegan/inst/NEWS.Rd 2016-01-12 08:34:24 UTC (rev 2987) @@ -20,13 +20,6 @@ \item \code{rarefy} gave false warnings if input was a vector or a single sampling unit. - \item \code{gdispweight} works when input data are in a matrix - instead of a data frame. - - \item Input dissimilarities supplied in symmetric matrices or - data frames are more robustly recognized by \code{anosim}, - \code{bioenv} and \code{mrpp}. - \item Some extrapolated richness indices in \code{specpool} needed the number of doubletons (= number of species occurring in two sampling units), and these failed when only one sampling @@ -51,6 +44,13 @@ negative branch heights indicating negative dissimilarities. Function \code{treedive} is faster. + \item \code{gdispweight} works when input data are in a matrix + instead of a data frame. + + \item Input dissimilarities supplied in symmetric matrices or + data frames are more robustly recognized by \code{anosim}, + \code{bioenv} and \code{mrpp}. + } %itemize } %new features From noreply at r-forge.r-project.org Tue Jan 12 15:16:01 2016 From: noreply at r-forge.r-project.org (noreply at r-forge.r-project.org) Date: Tue, 12 Jan 2016 15:16:01 +0100 (CET) Subject: [Vegan-commits] r2988 - pkg/vegan Message-ID: <20160112141601.CE4F9187322@r-forge.r-project.org> Author: jarioksa Date: 2016-01-12 15:16:01 +0100 (Tue, 12 Jan 2016) New Revision: 2988 Modified: pkg/vegan/DESCRIPTION Log: Merge branch 'cran-2.3' into r-forge-svn-local Modified: pkg/vegan/DESCRIPTION =================================================================== --- pkg/vegan/DESCRIPTION 2016-01-12 08:34:24 UTC (rev 2987) +++ pkg/vegan/DESCRIPTION 2016-01-12 14:16:01 UTC (rev 2988) @@ -1,6 +1,6 @@ Package: vegan Title: Community Ecology Package -Version: 2.3-3 +Version: 2.3-4 Date: 2016-01-12 Author: Jari Oksanen, F. Guillaume Blanchet, Roeland Kindt, Pierre Legendre, Peter R. Minchin, R. B. O'Hara, Gavin L. Simpson, Peter Solymos,