VEGAN DEVEL VERSIONS at https://github.com/vegandevs/vegan ChangeLog provided a detailed development history of vegan, but it is not updated after September 11, 2014. Vegan moved to git source code management and linear ChangeLog is poorly suited for branching git development. Use git log to track the history in your current branch. The main upstream repository of vegan is currently https://github.com/vegandevs/vegan. ChangeLog gave technical details and was mainly provided for vegan developers. Most important user-visible changes are listed in the NEWS of the current release and its patched version. Version 2.1-43 (opened September 11, 2014) * cca, rda, capscale: remove u.eig, v.eig and wa.eig items or scores scaled by eigenvectors. We have had a warning of their eventual removal since vegan 1.6-8, and now we finally did so. Scaling of scores happens when scores() function access normalized score items of the results. * commsimulator: commented out deprecation warning at the moment, because this triggered warnings in CRAN packages bipartite and metacom. Contacted the maintainers of these packages, and will put back the warning in 2.2-1. * getPermuteMatrix: works also when 'strata' are missing. Triggered an error in CRAN package mpmcorrelogram. * permustats: new function to extract permutation results from vegan objects, with support functions summary, density, densityplot, qqnorm and qqmath. Deprecated previous density and densityplot methods directly accessing the same results. * ordirgl, ordiplot3d: 3D functions using rgl or scatterplot3d packages were removed from vegan and moved to a new CRAN package vegan3d (released Oct 7, 2014). * scores.hclust: combined documentation with other hclust methods. * scoverage: removed from vegan. * dispweight: veganified so that uses nullmodels. Added gdispweight(): a new generalized method taking any glm() formula instead of one grouping. * betadisper Permutation tests via the `permutest()` method are now parallelised. The number of cores to parallelise over is specified by argument `parallel` in common with the implementation for `cca()`. Fix a couple of bugs in the examples; number of permutations was specified using `control` which is not an argument to the `permutest()` method for `betadisper()`. * text.cca: was incorrectly testing if factor constraints were in the biplot scores when user-suppiled lables for factors were given. * ccanova: removed from vegan. These were backup functions of old anova.cca, and were completely rewritten for new vegan. * metaMDSrotate: made defunct (replaced with MDSrotate). Version 2.1-42 (closed September 11, 2014) * Opened a new version to prepare release 2.2-0. * Moved main development from R-Forge to GitHub.com. * NAMESPACE, DESCRIPTION: adapted to current R CMD check that has more stringent tests on attaching and importing external packages and using their functions. * getPermuteMatrix: routines have a common API based on the new function. Version 2.1-41 (closed September 4, 2014) * ordiellipse, ordihull, ordispider: can now handle (omit) NA cases in 'groups'. They were able to omit to NA cases in scores, but having NA in 'groups' triggered really cryptic error messages. * adipart, multipart, hiersimu: it is now an error to provide non-nested sampling hierarchy (used to be a warning). * new version opened with the CRAN release of vegan_2.0-10 on December 12, 2013. * anosim, mantel, mantel.partial: R CMD check told that "... may be used in an incorrect context". The dots were added in r2765, and now removed. * ordistep: add1.cca reported P=0 for redundant terms with 0 Df, and this caused an error in ordistep. * as.hclust.spantree: a new function to cast a "spantree" result object to an "hclust" tree. * hclust: add reorder() and rev() methods for standard "hclust" trees of R. I have no clue why base R does not have these methods, but I provide them now in vegan. An additional reason for providing these methods is that reorder(, wts, agglo.FUN = mean) will use unweighted mean of merged groups even when these are of very unequal sizes. The reorder method provided here will use group sizes as weights and the value of the group will be the mean of its leaves (terminal nodes). Add scores() method to extract coordinates of internal nodes or leaves from a plotted hclust() tree. The function is whimsical and may be removed before release (it is documented separately to make this easier). * biplot.rda: failed in axis scaling with negative 'scaling' values when some species had zero variance (and hence species scores was 0/0 = NaN). * cascadeKM: Calinski index for one group will now be NA instead of randomly chosen Inf, -Inf or NaN which can cause confusion (see http://stackoverflow.com/questions/21022848/r-produces-different-result-after-io-on-file * ordiellipse: failed if all points were on a line. Now handles these cases by drawing a line trhough the points, and issuing a warning from chol(): "the matrix is either rank-deficient or indefinite". Earlier we required at least three points for an ellipse, but these could still be on a line and fail. Now we accept two points, and draw the line with a warning. The problem with three points was reported by Paul Bacquet (Louvain, Belgium). * radfit: plotting of radfit frames of several communuties failed if there were one-species or no-species (empty) rows. Part of this was fitted.radfit that now returns sensible and consistent output for these cases as well, and radfit.data.frame() completely removes empty rows from the data (with a warning). * RsquareAdj: return list(NA, NA) for capscale objects with imaginary component, and use rda method if there is no imaginary component. * tabasco: "hclust" objects (use, sp.ind) are reordered using weighted means. This is a better method than the unweighted means used for reordering of dendrograms. Earlier "hclust" objects were changed to dendrograms, but now we provide reorder.hclust() and rev.hclust() in vegan, and can use improved method of ordering the table. Dendrogram and hclust labels must match the community data names, and now the community matrix is internally reordered to match the dendrograms. This requires that the clusterings do have labels attributes. * treedive, treedist: default is now match.force = TRUE, and treedive() gained new argument 'verbose' to turn of most messages -- which is practical in oecosimu(). * BCI: names checked after http://www.theplantlist.org, but kept the old (alphabetic) order of species. The changes are: Abarema macradenium -> A. macradenia, Apeiba aspera -> A. glabra, Aspidosperma cruenta -> A. desmanthum, Cassipourea ellipitica -> C. guianensis, Chlorophora tinctoria -> Maclura t., Coccoloba manzanillensis -> C. manzinellensis, Cupania sylvatica -> C. seemannii, Dipteryx panamensis -> D. oleifera, Eugenia coloradensis -> E. florida, Eugenia oerstedeana -> E. oerstediana, Inga marginata -> I. semialata, Lonchocarpus latifolius -> L. heptaphyllus (this is ambiguous, since Hebestichma cubense is another alternative), Maquira costaricana -> Maquira guianensis var. costaricana, Phoebe cinnamomifolia -> Cinnamomum triplinerve, Swartzia simplex var. ochnaceae -> var. continentalis, Tabebuia guayacan -> Handroanthus g. Guarea is ambiguous: data have three taxa (fuzzy, grandifolia and guidonia), but theplantlist.org says grandifolia is an ill. synonym of guidonia. This change allows matching 206 of 225 BCI species with http://datadryad.org/resource/doi:10.5061/dryad.63q27. In addition, there are two vars of Swartzia simplex in BCI which could be matched at species level. * dune data sets: use 4+4 letter CEP names for species instead of old 3+3 names. Botanical nomenclature was updated: Leontodon autumnalis -> Scorzoneroides (Leoaut -> Scorautu), Potentilla palustris -> Comarum (Potpal -> Comapalu). Rows are now arranged numerically, and species names alphabetically, vascular plants first, and then the two bryophytes. Added data 'dune.phylodis' which are ages of dune species extracted from http://datadryad.org/resource/doi:10.5061/dryad.63q27 (Zanne AE et al. 2014, Nature doi:10.1038/nature12872, published online Dec 22, 2013). dune.taxon was updated to APG III. * varespec: use 4+4 letter CEP names instead of 3+dot+3. Nomenclature was cautiously fixed. Most important changes: Ledum palustre -> Rhododendron tomentosum (Led.pal -> Rhodtome), Cetraria nivalis -> Flavocetraria nivalis (Cet.niv -> Flavniva). In addition, Dip.mon was corrected to Diphcomp (Diphasiastrum complanatum, should perhaps be Lycopodium c.), and Barbilophozia lycopodioides to B. hatcheri. * plot.envfit: when `envfit()` is called as `envfit(ord, foo[, "bar"])`, there are no useful rownames on the objects returned. Hence the logic in `plot.envfit()` when called with argument `labels` was failing. * rarecurve: line colour and type for each sample can now be specified through formal arguments `col` and `lty`. Incidental wish of http://stackoverflow.com/q/22714775/429846. * simper: now doesn't fail with obscure error when groups have a single member. Version 2.1-40 (closed December 12, 2013) * anova.cca: Function is now based on the new code, but the old is avaialable in a function called ccanova. The API changes: arguments 'step' and 'perm.max' are gone and replaced with 'permutations' that accepts a how() object defining permutations, or a single number like previously or a permutation matrix. The new anova.cca adds an option of analysing a sequence of ordination models. This also means that '...' is now the second argument and the names of all arguments must be written in full. This change can be expected to cause trouble outside vegan. Currently the tests in examples are passed, but tests fail (looks like being caused by the change in API). * add1.cca, drop1.cca, ordistep, ordiR2step: functions were adapted to new anova.cca and this brought along similar changes in API. * envfit: function assumed that environmental variables are either factors or numeric, and choked if they were neither but, say, character strings. Now the function tries to coerce all non-numeric variables into factors, including character strings and logical. This is one possible reason for problems reported in https://stat.ethz.ch/pipermail/r-sig-ecology/2013-December/004217.html, although the reported case is irreproducible and we cannot be sure. Also fixed handling of tied values in assessing the P-values in vectorfit. * nestednodf: vegan 2.1-36 (release 2.0-10) changed the function so that weighted analysis of binary data was equal to unweighted binary analysis, but this broke consinstency with the original software and publication by Almeida-Neto & Ulrich. The fix was now made optional, and the default is to follow published method by adding argument 'wbinary' (defaults FALSE). Based on the suggestion by Matt Barbour in GitHub. * ordispider: can now use spatial medians as centres instead of the default centroids. The kind of centre is defined by new argument 'spiders'. * tests for cca/rda/capscale: commented out test that failed with the anova.cca. Known issue was that 'by = "term"' and 'by = "axis"' stop with error with missing data. This was designed and and can be re-designed to handle missing data by listwise deletion so that models will have the same number of observation for every variable. An unknown issue was that 'by = "margin"' failed in capscale(). This may be a scoping issue an needs inspection. We keep the old vegan-tests.Rout.save file so that we are reminded of the problems at every check. Version 2.1-39 (closed December 3, 2013) * anova.cca: started to rewrite the anova.cca family of functions for permute package. At the first stage, a temporary development function anovacca was created. The user interface was changed, and the function no more adapts the number of iterations for the P-value, and arguments 'step' and 'perm.max' were removed. Instead, permute package is used to create a permutation matrix used in all cases with fixed number of permutations. In addition to the overall test, the function allows now testing a sequence of models (anova.ccalist). Specific tests provided are by = "term" (anovacca.byterm) which is fitted as a sequence of models in anova.ccalist. Case by = "margin" directly calls permutest.cca and gets the significances from differences of residual variation similarly as anova.ccalist. Case by = "axis" is is implemented as a marginal model. Simple permutations give identical results for "term" and "axis" cases, but by = "margin" is different. Marginal models were implemented as partial models with other parameters partialled out in vegan 2.0 and earlier, but the current implementation is an anova.ccalist model where the parameter in question was removed and model compared against the complete model. * commsim: documentation (commsim.Rd) was restructured so that nullmodels were collected under separate sections with a brief introductory text and shorter specific text of the algorithm. Hopefully this makes easier for an outsider to grasp the width of the choices. * oecosimu: change printed quantiles to match the direction of the test as changed in r2495. * permutest.betadisper: updated to the new permute API and operates similarly to permutest.cca in respect of how the permutation test can be defined. It currently doesn't support the parallel processing of the cca method, however. * tests: vegan examples and vegan-tests have been out of sync for a long time. These have not been updated because most of the changes seem to be triggered by switching to R 3.0-x, and we have not had time to analyse the reasons. The differences also seem to be platform specific, and Linux and MacOS give slightly different results. In particular, there seem to be differences in permutations, constrained ordination, in particular in capscale() and rounding of output. We have also introduced some changes in output that were not yet synced. * janitorial: vegan has been dependent on R >= 2.14.0 since version 2.1-34 (r2597 Wed 28-Aug-2013). Now superfluous references and tests for the older R version were removed in R code and documentation. FIXME: cca() returns residuals.zombie item that was supposed to be needed in R < 2.13.0. This was not yet removed: we must first check that this can be safely done. vegan also now depends on permute version 0.7-8 or later. Version 2.1-38 (closed November 10, 2013) * DESCRIPTION: depends on permute >= 0.7-5, where the permute::how() result object can be updated. * bioenv: returns now the number of the best model ('whichbest'), the standardized environmental data ('x') and the distance function used for the environmental data ('distfun'). New function bioenvdist() uses these to re-calculate the environmental distances for the best model, or any other model selected by its number. * permutest.cca: permutation test uses 'permute' package. The old interface was retained, and 'permutations' can be a single number or a permutation matrix (as previously), but now it can also be a how() object of the 'permute' package. The argument 'strata' was also retained, but it is planned to be deprecated in the future, and it is recommended that users switch to defining 'blocks' in how(). * renyiaccum: plot() works also when only one index ('scales') was used. The function gained new argument 'collector = FALSE' to accumulate sites in the order they are in the data set in addition to the summary statistics of permutations. This can be used to analyse the randomness of the particular order of sites (looks like my student would need this). Version 2.1-37 (closed November 5, 2013) * anova.cca: added new function anova.ccalist() to compare a sequence of models. The function is still experimental ("proof of the concept") and unexported. If this stays in vegan, it should eventually be called from anova.cca(). This would bring along a change of API to anova.cca(object, ..., alpha=...): the dots must follow the first argument which turns of positional and partial matching of arguments so that the function can collect the "cca" models. We must decide whether the new function is worth such a change that can make life harder for ordinary users. One potential advantage is that the code in anova.ccaby* functions could be simplifed to a anova.ccabylist() calls. The function is based on calling permutest.cca for each model with identical permutations. We can then compare the change in model for each permutation and collect the test statistics for differences. This requires that the models really are nested so that residual deviance certainly decreases in bigger model (testing theory requires nesting, but this is commonly violated by users: here nesting is necessary). * parellel: default cluster defined by setDefaultCluster() is no longer used in functions with parallel processing. Using default cluster would need querying an unexported environment parellel:::.reg, and this gives a NOTE in R CMD check. * specaccum, renyiaccum, tsallisaccum: gained argument to select a 'subset' of sites (looks like my student would need them). Version 2.1-36 (closed October 14, 2013) * opened with the release of vegan 2.0-9. * decostand(..., "normalize") uses now .Machine$double.eps to replace zero sum of squares instead of matrix minimum. * envfit: if a variable is constant, no fitted vector can be calculated and results will be given as NA (with warnings). Plotting of all vectors will fail in such cases because no finite scale was found for arrows. Fixed on ordiArrowMul. * envfit: try to produce something sensible if fitted variable has constant values (invariable vector, one-level factor). Report arrow heads as all zero, and R2=0 for vectors, and the centroid to the data centroid and R2=0 for factors. Tied values are now treated differently in factorfit: now they support null hypothesis, previously they decreased the P-values. * fisherfit: completely rewritten and estimates of standard error removed: I could not find no justification for these. Actually, it seems that the value of Fisher alpha as estimated in the function was independent of the abundance distribution of species, but will be defined by the number of species (S) and number of individuals (N). Now the Fisher alpha is estimated from the relationship S = alpha*(1 + log(N/alpha)) using function uniroot(). Because of this, standard errors cannot be estimated and they were removed. In addition, functions confint.fisherfit, profile.fisherfit and plot.profile.fisherfit were removed. The estimation of standard errors was also removed in function fisher.alpha (that only calls fisherfit). * nestednodf: matrix fill was wrongly calculated in weighted analysis. The nominator was length of 'comm', and if input was a data frame that was the number of columns instead of the number of cells. The fill was correct in non-weighted analysis because there data were transformed to a matrix, and the length of a matrix is the number of cells (unlike in data frames). * nestednodf: weighted analysis gave all statistics as zero if binary data were supplied. Some ">" comparisons were changed to ">=" and now weighted analysis of binary data gives same results as non-weighted analysis. However, this can change results of weighted analysis of quantitative data. The change needs endorsement by the function author Gustavo Carvalho. * oecosimu: warns user if the specified nullmodel 'method' changes quantitative input data to binary data under cover. Some people have not noticed this. Version 2.1-35 (closed September 25, 2013) * ordilabel: colour arguments ('col', 'fill', 'borderä) can now be vectors and will be recycled if needed. May need care if used with 'select', but should work with 'priority'. This was needed for a function under development and testing: when labelling over lines, it may be nice if the border has the same colour as the line covered. * MDSrotate: can now rotate a solution to more than one vector, provided that the number of dimensions is higher than the number of vectors. Because fitted vectors usually are correlated, only the first vector is aligned to dimension 1, but second vector and further are oblique to the corresponding axis. In any case they will have zero correlation to all subsequent dimensions. * simulate.rda, simulate.cca: gained argument 'correlated' for using covariances of species in generating correlated multivariate normal residuals in parametric simulations. The covariances are estimated from the residual ordination of species. The argument defaults FALSE which implements the old parametric simulation where each species is simulated independently. The argument has no effect in capscale() which stores no information on species. Version 2.1-34 (closed September 5, 2013) * DESCRIPTION: dependent on R >= 2.14.0. * DESCRIPTION, vignettes: R 3.0.2-to-be checks with --as-cran requires (with a NOTE) the vignettes source files (Rnw) to be in vignettes/ directory. Because Makefile is not executed in inst/doc if vignettes/ directory is present, all other sources had to be moved to vignettes/ as well with vignettes/.install_extras to move those to inst/doc after building. This also made /.Rinstignore unnecessary. The vignettes directory was introduced and made recommended in R 2.14.0 so that the this version of vegan depends on R >= 2.14.0. * tweaks for R < 2.12.1 removed: code to fix buggy naming of columns in qr.X before 2.12.1 (as.mlm.cca/rda, intersetcor), and change in the cmdscale() output (eigenvals.default). * tweak for R < 2.13.0 removed: change in cmdscale() output (capscale). * vegandocs: does not use unexported tools:::httpdPort. Now only remaining ':::' case is querying default cluster in the environment parallel:::.reg. Version 2.1-33 (closed August 28, 2013) * DESCRIPTION: new dependence on lattice. Passes new strict R checks with NOTE on ':::' calls to tools:::httpdPort (to launch reading vegan NEWS.html in existing browser window) and parallel:::.reg to acces the defaultCluster in an unexported environment within 'parallel' Namespace. Version 2.1-32 (closed August 19, 2013) * opened a new version with the CRAN release of vegan 2.0-8. * merged Eduard Szöcs's code on dispersion weighting of overdispersed species following Clarke, K. R., M. G. Chapman, P. J. Somerfield, and H. R. Needham. 2006. Dispersion-based Weighting of Species Counts in Assemblage Analyses. _Marine Ecology Progress Series_, 320, 11–27. The basic development was made in github.com and merged to R-Forge. * nullmodel: replaced internal indshuffle() function in make.commsim() with much faster stats::rmultinom(). The rmultinom() function takes argument 'n' for the number of random vectors, and using this could be still faster, but we only generate one vector in time. Using 'n' would require better analysis of individual nullmodels. The commit changes random sequences, but passes tests. * oecosimu: Gained argument 'batchsize' to set the maximum size of simulated nullmodels (in Mb). If a larger object would be produced, the analysis is broken into several batches to avoid exceeding the maximum size. This avoids exhausting memory which can make whole R unresponsive and analysis very, very slow. In general, the argument is needed with large data sets and/or large number of simulations. * orditkplot: bmp has been available in unix-alike OSes since 2008, or a moth after writing orditkplot. Thanks to Brian Ripley for informing us. * vignettes: vignettes use now standard article style instead of hacked jss style. Decision and diversity vignettes are in two columns, but intro in one (R output did not fit in one column). The common packages, macros and definitions were moved to new vegan.sty which is written so that it should work both with amsart and article, and with one and two columns. Figures are now in standard figure environment, but intro redefines this to use sidecaption figures. Version 2.1-31 (closed July 10, 2013) * Dependencies: Vegan now depends on a version equal to 0.7-4 or later. * betadisper, permutest.betadisper: Modified to use the new permute package API (from version 0.7-3 onwards). The `permutest` method gains a new argument `permutations`, which takes a matrix of permutations to be used. * protest: modified to use the new permute API. Gains argument `control` which describes the design. As a result, `strata` argument has been removed and `permutations` argument can only be used to supply your own matrix of permutations. The number of permutations and other features of the design are set via `control` and function `how()` from permute. * ordipointlabel: now uses `ordiArgAbsorber()` to stop the warnings about non-graphical paramters being passed to plotting functions. * ordisurf: can now pass in a line width for the contours via argument `lwd.cl`. * ordiArrowTextXY: New (internal) support function that finds coordinates of text box at the point of the arrow so that the arrow point just touches the text. This should improve positioning of the arrow labels and avoid writing labels over the arrows. * plot.envfit, plot.cca, text.cca: use ordiArrowTextXY() for arrow labels instead of expanding arrow heads by 10%. * plot.envfit: plot(..., add = FALSE) estimated string (text) dimensions after plot.new() but before plot.window(). Since plot.new() sets xlim, ylim to c(0,1) and then plot.window resets the limits to the data values, string dimensions in user units were poorly estimated. This became evident with new positioning of arrow text based on string dimensions. * plot.ordipointlabel: gains a plot method that is very similar to `plot.orditkplot()` but which does not mess with graphical parameters. This allows it to fit more naturally into a standard R workflow (it plays nicely with `layout()` for example. * stressplot: metaMDS and monoMDS stressplot() use now expression(R^2) instead of ascii R2. The stressplot.monoMDS() function returns the plotting structures in the original input order. * vignettes: Brian Ripley urged as to remove \usepackage{inconsolota} as this package is on the way to be removed from CTAN. Version 2.1-30 (closed June 12, 2013) * bioenv: can now use Mahalanobis, Manhattan and Gower distances for environmental variables. The Mahalanobis distances are based on orthogonalized data, Manhattan distances give the direct sum of differences of environmental variables, and Gower distances can also handle factor variables. This involves adding internal function veganMahatrans() for Mahalanobis transformation. The change was triggered by a recent email by Lydia Beaudrot (UC Davis) to implement Mahalanobis distances, and in the same I also implemented Robby Marotte's suggestion of using Gower distances (vegan Forum item in R-Forge in July 2012). The output is changed to show the 'metric' and the name of the 'method' is fully expanded. No more fails if 'upto' is too large. Passes "..." to cor() like documented, but never done. * rankindex: can now use Mahalanobis or Manhattan distances. Scales automatically gradient variables to unit variance (Euclidean) or range (Manhattan), and the scaling is already inbuilt in Mahalanobis and Gower. * vegdist: added Mahalanobis distance. Version 2.1-29 (closed April 19, 2013) * ordisurf: significant changes were made to this function: - The default for `method` and `select` were changed to `"REML"` and `TRUE` respectivelt. - Argument `thinplate` is deprecated in favour of `isotropic`. A warning is now issued if `thinplate` is used. - The spline basis for the smoother can now be specified from a subset of those implemented in the mgcv package. This is achieved via the `bs` argument, which defaults to `"tp"` for thin plate regression splines. - Argument `knots` and `bs` can now be a vector of length two, one per ordination dimension considered. This is only of use with anisotropic surfaces with `isotropic = FALSE`. - New argument `fx`; indicates whether the smoothers are fixed degrees of freedom regression splines (`fx = FALSE`) or a penalised regression spline (`fx = TRUE`). Can be a vector of length 2 for anisotropic surfaces (`isotropic = FALSE`). - The number of locations in each ordination dimension at which the fitted surface is evaluated can now be specified via new argument `npoints`. - The formula passed to `gam` is now built in greater detail. When the model is printed the user can see exactly how the smoother was constructed. * oecosimu: the interpretation argument "alternative" was really twisted. We now changed the test direction and have a much clearer explanatory text in printed output. The issue was raised by Juan Manual Barreneche (jumanbar) in GitHub (issue #14). NB. The direction of the test changed from previous versions. * raupcrick: adapted to the change in oecosimu() to define the direction of the test. Version 2.1-28 (closed April 19, 2013) * betadisper: failed with type = "centroid" when there was only one group (i.e., in estimating the overall beta diversity in the data). Reported by Pierre Legendre. Now correctly reports distance to "medoid" in the print method when type = "median". Reported by Pierre Legendre. The print method also now shows only the first 8 eigenvalues. * eigenvals: new method for class "betadisper". * rda: eigenvalues are now regarded as zero if they are very small compared to the first eigenvalue. Earlier we used fixed limit of 1e-4, but now the limit is first eigenvalues * 1e-5. Similar change was not made in cca, since there the theoretical maximum of the eigenvalue is 1, and comparison to an absolute minimum threshold of 1e-4 makes sense. Version 2.1-27 (closed March 17, 2013) * cca/rda/capscale: removed references to 'u.eig' and 'v.eig' items in support functions. These now use 'u' and 'v' items and scale these with 'eig' (or diag(sqrt(eig))) when needed. This prepares for removing items 'u.eig', 'v.eig' and 'wa.eig' in vegan 2.3 and 2.4. Concerns fitted.capscale, goodness.cca and goodness.rda. The documentation has warned about removing these *.eig items for years, and most vegan functions already avoided using them. We have no idea if any external packages depend on these and therefore we delay the removal till vegan 2.3 and 2.4 release. However, we warn about this in NEWS for 2.0-7 and also say this clearly in cca.object documentation. * nestedtemp: function failed if the matrix fill was < 0.38%, because the fill line parameter was outside the original estimation bracket. Now bracket is moved up if the estimation fails. The problem was reported by Carsten Dormann (Univ Freiburg) and Benjamin A. Sikes (Lincoln University, NZ). * specaccum: gained argument 'w' for weights to give the sampling effort. This resurrects a feature that was introduced in r1505 (22 Feb 2011) and 1507, and removed in r1606 (26 May 2011). It seems that BiodiversityR::balanced.specaccum() provides the same feature but we still try it here. The feature was resurrected after a user query by Bastien Mérigot (Univ Montpellier II). The working of the new argument is still untested with specaccum() support functions. * fitspecaccum: model = "asymp" was actually fitting logistic regression (the same as model = "logis"). * text.cca, points.cca: gained argument 'axis.bp' (defaults TRUE) to suppress drawing axes for scaled biplot arrows. Only effective if 'bp' scores were requested. * wcmdscale: setting only weights 'w' does not force full "wcmdscale" output but returns only the matrix of coordinates of real axes. Similarly, setting 'add = TRUE' would not force "wcmdscale", but 'add' is not implemented. Version 2.1-26 (opened February 11, 2013) * New version opened with the release of vegan_2.0-6 on February 11, 2013. * metaMDS: exposed argument 'maxit' in metaMDSiter() so that users can set the number of iterations in monoMDS() or isoMDS(). metaMDS(..., trace = 2) show the stopping criterion used in with engine = "monoMDS". After wishes by Jon Bakker, Univ Washington (U.S.A.). * tabasco: a sister function of vegemite() to display a compact community table using heatmap(). Both vegemite() and tabasco() can handle cluster::agnes() trees. * wcmdscale: return a full "wcmdscale" object if any argument is set to non-default value. This also implies that if weights 'w' are set, the result will be full "wcmdscale" object with a "weights" item, instead of a simple matrix with no information about weights used. Version 2.1-25 (closed February 11, 2013) * FAQ: new entry on impossibility of using random effects in cca, rda, capscale & adonis, and telling how to do this approximately. Please comment and correct. * oecosimu: changed the structure of the oecosimu() result object. It now returns a list of two items: "statistic" is the observed statistic, and "oecosimu" which contains the simulation records. In previous version the function returned the statistic and added item "oecosimu" there. Previously, the result object was of type c("oecosimu", class(statistic)) as the original "statistic" object was returned amended with an "oecosimu" item, but now it is only of type "oecosimu" with the original "statistic" as a separate item. So "statistic" is now one level deeper instead of being the main object. * predict.cca, predict.rda: In rev2412, 2413 we studied including partial (pCCA) component in predict(..., type="response") and predict(..., type="working") models, but then adopted a policy of never having partial component, but always returning only the component requested for. Therefore warning messages of ignoring pCCA component were removed. This log entry was made to emphasize that there is a policy decision, and an alternative policy can be tracked in the repository. * fitted.[cca,rda,capscale]: can now return partial component with argument 'model = "pCCA"'. * simulate: the simulate functions for "rda" and "cca" return objects with original row and column names. Function capscale() already did so, and simulate.nullmodel() was changed so in vegan 2.1-24 (r2396). Version 2.1-24 (closed February 2, 2013) * simulate.nullmodel: output array inherits dimnames after the input data matrix, this is often required by oecosimu. Dimension names are now only stored once for all nsim simulations, so it is an improvement over the implementation in commsimulator. * oecosimu: the 'oecosimu' list cannot be added to the result if the nestfun() returns a data frame. In that case, the 'oecosimu' list is treated like a variable, and this gives either an error of wrong length or if the length matches, a mess. Now data frame is silently turned into a list which also means that it will not be printed with the output. The name of the 'statistic' is not used for unnamed vector output where it would only name the first item (like would be the case if the 'statistic' was extracted from a data frame). It is now checked that only one 'statistic' is given and a comprehensible error message is issued instead of the current confusing one. The changes were trickered when testing picante::pd(). * protest: huge speed-up. Instead of calling procrustes() in every permutation step, we only calculate the goodness of fit statistic in svd(). This avoids a huge overhead of procrustes(). In a test with a 160 x 12 matrix (RDA scores from Bryce Canyon data 'bryceveg') with 9999 permutations, the time went down from 12 sec to 0.8 sec in my desktop. The analysis prints now also the 'ss' term (residual sum of squares) which for symmetric analysis is equal to squared m12. * procrustes: marginally faster way of getting sum of squares of a matrix. This should not influence the results, but one metaMDS() trace result has a small difference in nearly-zero rmse (was 1.094382e-06, is 1.09439e-06) in my desktop. * treedive, treedist: treedive() did not correctly match data and tree when the tree contained species that did not occur in the data. Function treedist() tries to match tree and data when their sizes differ, and argument 'match.force' was added to force matching even when sizes do not differ. Version 2.1-23 (closed January 25, 2013) * clamtest: Richard Telford reported an extreme case {rbind(a=c(1,0,5,10,4),b=c(0,10,5,2,1))} where clamtest failed due to inadequately setting up minimum abundance thresholds for rare species. The issue is solved by hard coding the minimum values to be 1 when no suitable solution is found. Also, clamtest failed when the community matrix had no column names, this is now fixed. * capscale: It was wrongly assumed that eigenvalues could be used in normalization of species scores, but this worked only with Euclidean distances. Now normalization is done explicitly with decostand() function. This change means that scaling of species scores will change, and graphs can look different than previously. All analyses should be redone. Function now displays the value of the additive constant with 'add = TRUE'. * stressplot: added stressplot() methods for wcmdscale(), capscale(), cca(), rda(), prcomp() and princomp() results. These also work with constrained ordination. These methods display the ordination distances in given number of dimensions (defaults 'k = 2') against original observed distances. These original distances are found from the full space solution, and in capscale() and wcmdscale() they are correct for the imaginary axes. The weights are used in wcmdscale() and cca() so that their distances differ from plotted ordinations, but agree with eigenvalues. Partial models (p-dbRDA, pRDA, pCCA) add the partial component both to the original dissimilarities and the fit. The row scores (u) alone will not correctly estimate original dissimilarities in constrained (or partial) ordination. In unconstrained ordination we can get the distances as dist(u %*% diag(sqrt(eig))), but in constrained ordination this will not give the observed dissimilarities with all axes. Currently we get the ordination distances from a (low-rank) approximation of the data as dist(u %*% diag(sqrt(eig)) %*% t(v)). However, it is not sure that this the right thing to do, but perhaps we should acknowledge the fact row ordination with constraints does not approximate distances. So this may change. * wcmdscale: added method functions print(), plot() and scores(). Now class "wcmdscale" results also retun the function call and dimensions have names. * ordilabel: was missing ordiArgAbsorber() on the plotting calls to text() and polygon(). Thus lots of warnings were raised in use. * orditorp: added argument select, to choose which of the rows of scores are plotted, so matches with ordilabel() and ordipointlabel(). Version 2.1-22 (closed January 8, 2013) * multipart: argument global was printed as TRUE regardless of the actual argument value. This did not affect calculations. Reported by Valerie Coudrain. * monoMDS, metaMDS: Default convergence criteria were changed in monoMDS. Most importantly, now scale factor of the gradient is sfgrmin = 1e-7. The former limit 1e-5 was much too slack with large data sets and iterations stopped too early without getting close to the solution. In addition, scores() ignore now requests to scores beyond those calculated instead of failing, and scores.metaMDS() does not drop dimensions. * metaMDS: Iteration sometimes finds a false convergence, or an identical solution to the previous best although a better solution can exist. These are undetected except sometimes in parallel processing. Therefore we first label convergence false when we find a new best solution, and then study if it really converged. This is a rare effect, and can only be seen with parallel processing. An example is set.seed(7) metaMDS(BCI, k=4, parallel=2) which will converge in run 7 with the old code although run 8 would be better, but converges in run 18 with the new code. * nestednodf: added plot() method modelled after plot.nestedtemp(). * ordiR2step: gained argument 'R2scope' (default TRUE) which can be used to turn off the criterion of stopping when the adj-R2 of the current model exceeds that of scope. This option allows model building when the 'scope' would be overdetermined (number of predictors higher than number of observations). Pierre Legendre needed this option for some checks with huge AEM/PCNM scopes. * envfit, plot.envfit: Plotting an object fitted by envfit() would fail if p.max was used and there were un-used levels for one or more factor constraints. The un-used levels could result from deletion of observations with missing values or simply the result of supplying a subset of a larger data set to envfit(). Both cases are now handled through the use of droplevels(). Version 2.1-21 (closed November 19, 2012) * New version opened with the CRAN release of vegan 2.0-5 on Oct 8, 2012. * dispindmorisita: output gained a new column for Chi-squared based probabilities that the null hypothesis (random distribution) is true. * clamtest: output was wrong when some of the possible species groups were missing (bug report submitted by R Telford). * procrustes: plot() of two-dimensional solutions often draw original axes in a wrong angle. The problem was reported by Elizabeth Ottesen (MIT). * msoplot: gained legend argument for positioning the legend according to user needs. Version 2.1-20 (closed October 8, 2012) * anova.cca: Dr Sven Neulinger (Christian Albrecht University, Kiel, Germany) reported several problems with anova.cca cases. All these were problems in scoping. Two problems solved with this commit were: (1) anova.cca(..., by = "axis") always failed in partial analysis (with conditions), (2) anova.cca(..., by = "term") failed in partial models when there was no 'data=' argument, but the variables were in the global workspace. The first fix also seems to allow anova(, by = "axis") that used to fail. In addition, there is one unsolved problem with search order: stats function C() is found instead of variable 'C' and this gives an error message "object is not a matrix". * radfit: The methods are now more consistent over different levels of radfit models (radline, radfit, radfit.frame). The common methods to all include now AIC(), coef, deviance(), logLik(), predict() and fitted(). The radfit() objects gained points() and lines() methods. The data frame method also works with matrices. The predict() method gained new argument to change the expected 'total' size of communities. The fitted() returns now named vectors or matrices. It seems that radlattice() never displayed BIC contrary to documentation and labelling in graph. This has been wrong since the introduction of radlattice in r551 (2008-11-09). Now radlattice also check that it gets the "radfit" object it can handle. * Rd: documentation files upgraded to the third English edition (2012) of Legendre & Legendre. Version 2.1-19 (closed September 16, 2012) * adonis: Small changes in calculations. Simplified calculations of matrix G as centred distance matrix, and does not keep n x n matrices that are not needed (A) or used only once (identity matrix I). These can make calculations marginally faster and reduce the memory usage, but probably there are no observable effects in most data sets. The new centring is probably more accurate than older, and therefore the last significant digits can slightly change (magnitude 1e-12 in tests). * betadisper: An effective R stats .C function was used for double centring, but it was removed from the API in r60360 | ripley | 2012-08-22 07:59:00 UTC (Wed, 22 Aug 2012). This removal stopped betadisper() with error. Now we have a less efficient R code for the same purpose. However, the effects in timing should be negligible. * density methods: all vegan functions that return simulated or permuted statistics have now density() methods that directly access the returned statistic. The functions return an object of class "vegandensity" that inherits from class "density". The object is identical to class "density", but it is amended with item "observed" that contains the observed statistic. The observed statistic is also put among permuted values when estimating the density. This can cause a pimple in density lines when the observed statistic is very different from simulated values, but it is consistent with the permutation tests. The function has a plot.vegandensity() function that is similar to plot.density(), but it also draws a vertical line for the observed statistic. The density methods were made available for adonis, anosim, mantel & partial.mantel, mrpp, permutest.cca and procrustes. The anova.cca function does not return permutated statistics. All density methods handle only one statistic. Function adonis() can return a matrix of permuted F-values for each term, and it gained a densityplot method (lattice package) that can handle all these simultaneously. Functions adipart, hiersimu and multipart were made oecosimu-compliant earlier and simultaneously they also gained the density and densityplot methods. * mantel, mantel.partial: Gained argument na.rm (defaults FALSE) to remove missing values from dissimilarities. To implement this, there were some internal changes in functions (that should not influence the results): The functions mixed cor.test() and cor(), but now only use cor(). Function cor.test() was only used to get the textual presentation of the correlation 'method', but this is now found internally. * protest: do not return the observed statistic as one of the permuted values but separately. * radfit: gained a predict method which works for single models ('radline'), radfit, and radfit.frame. All predict functions accept 'newdata' which need not be integer, but extrapolation may fail for some models. Needs still documentation. The function was provided due to a user request. Version 2.1-18 (closed August 20, 2012) * cIndexKM: internal function count() triggered a warning in R CMD check with R-devel because the funtion used .C() call to an unloaded packages "cclust". count() was never called in the current cIndexKM() and was removed together with the following currently unused functions: withinss(), varwithinss(), maxmindist(), vargss(). These deletions should have absolutely no visible effects. * envfit: the plot() method gained argument 'labels' to change the default labels. The default labels are displayed with the new labels() function. * vignettes: building vignettes failed in CRAN and R-Forge. These sites use TeXLive 2012 distribution which was not yet used by any vegan developer when vegan 2.0-4 was released. Ubuntu Linux still stocks TeXLive 2009, and new version is promised first for the 12.10 release, and many other Linuxes are just as old. TeXLive 2012 for MacOS was released in July 2012 and with that we could pin down the problem. There is hardly any user visible changes except that building vegan succeeds with vignettes. Version 2.1-17 (closed July 30, 2012) * New version opened with the CRAN release of vegan 2.0-4 on June 18, 2012. * biplot.rda: bug in specification of `type` argument if not supplied by the user; should have been a vector of length == 2. * adipart, hiersimu, multipart: default and formula methods of these functions were identical (also for the calculations) except in interpreting the input. Now the formula method only interprets the formula and calls the default method for the actual calculations without replicating its code. The "call" attribute of these functions now returns the generic function name without ".default", ".formula" suffix. Functions use now print.oecosimu() for displaying results and their specific print.*() functions were deleted. This involved changes in attributes: the printed attributes are now in object$oecosimu$simulated instead of object. * oecosimu: returns "call" attribute similarly as adipart(), hiersimu() and multipart(). The print.oecosimu() output changed, and shows the call. print.oecosimu() is able to display adipart(), hiersimu() and multipart() results, but does not show all informations that those dedicated functions showed about options. * Formula methods for adipart/multipart/hiersimu functions use a new internal (hierParseFormula) to interpret the formula. Version 2.1-16 (closed June 18, 2012) * envfit: plot() gained new argument 'bg' that triggers labelling with ordilabel() using the colour given in 'bg' as the background. * simper: added parallel processing for permutation tests in accordance with other vegan functions and with similar user interface. The code was developed by Eduard Szöcs in http://github.com. * predict.cca: number of rows must match in the original data and 'newdata' of cca() result, because original row weights are used in scaling the results. Now the match is checked, and non-matching 'newdata' is ignored with warning. Earlier this gave an error. Reported by Glenn De'ath. * betadisper: the method is biased with small, unequal group sizes. Bias corrected version can now be used with new argument 'bias.adjust' (defaults 'FALSE'). The problem was analysed and bias correction developed by Adrian Stier and Ben Bolker. * .checkSelect: standardise those plotting functions that have a 'select' argument that controls which rows of the scores are plotted. All these functions now use .checkSelect() to check and apply 'select' as appropriate. * ordipointlabel: gains argument 'select' which allows some rows of the plotted scores to be skipped in the same manner as for text.cca(). This only applies when a single set of scores is plotted. Otherwise it is ignored and a warning issued. * ordihull, ordiellipse: defaults to use semitransparent fill colour with 'draw = "polygon"', and gain argument 'alpha' to set the transparency. * ordihull: gained explicit 'col' argument and adds labels after drawing convex hulls so that filled hulls (with 'draw = "polygon") do not cover labels. With these changes, the behaviour of ordihull() is similar to ordiellipse(). The labels are centred more correctly. * metaMDS: A warning is issued on too good stress (zero or nearly zero). This is often a symptom of insufficient data. In general, you need n > 2*k + 1 points for k dimensions, and Kruskal's advice is to have n > 4*k + 1. With low number of points there can be several complete (zero stress) but different results, and no two convergent solution can be found. The warning is issued also when convergence was obtained, and information on dimensions is printed. FAQ gained an entry on the issue. * bioenv: accepts now dissimilarities or a square matrix that can interpred as dissimilarities instead of a community data frame. This allows using other dissimilarities than those in vegdist(). * update.nullmodel: explicit assignment is required to update the input object (nm <- update(nm, ...)). * ordiplot3d: the returned envfit.convert() function did not recognize 'choices'. Version 2.1-15 (closed May 11, 2012) * rrarefy, drarefy: check the data are integers -- the functions do not give sensible results with real values. * monoMDS: checks now that there is a sufficient number of non-NA dissimilarities for the analysis. People really try to use NMDS with too small data sets. The change was triggered by a user who had tried to find a six-dimensional solution for seven points (21 dissimilarities, 42 scores) using 100,000 random starts in metaMDS. With over-defined models there is an infinite number of different solutions with nearly zero stress, and no convergence is found. * ordiplot3d: function returns the projected coordinates of the origin, and function envfit.convert() that can project a three-dimensional envfit() result to the current plot. Unlike originally assumed, the function will not set equal aspect ratio for all axes. We try to compensate this by setting equal scaling to all axes. Version 2.1-14 (opened March 9, 2012) * Opened a new version with the CRAN release of vegan 2.0-3 on March 3, 2012. * Warton, Wright & Wang (Methods Ecol Evol 3, 89-101; 2012) had a paper where the analysed the confusion of location (differences between groups) and dispersion (variability within groups) in dissimilarity-based analyses. We have warned on this for long in vegan, but now we can get support from this paper. Explicit arnings added to anosim, mrpp, simper (where this is worst) and adonis (where this was already analysed by Marti Anderson when introducing the method). * adipart, multipart, hiersimu: permutation tests assumed constant full gamma diversity in all simulations even when the null model could produce variable gamma diversities. The default method ("r2dtable") had constant gamma diversity. * adipart, multipart, hiersimu: these are now generic functions with default and formula methods. The formula method is identical to the previous function, the default method can take two matrices as input, but the second argument describing the hierarchy can be missing. In this case a trivial two-level hierarchy will be assumed (each row is a seperate group, all rows are in same group). * anova of prc() objects by "axis", "terms" or "margin" failed due to NAMESPACE issues. Reported as issue #7 by Eduard Szöcs in github.com. * clamtest: wrongly used frequencies instead of the counts when calculating sample coverage to test x < coverage.limit. No detectable differences were produced when rerunning examples from Chazdon et al. 2011 (Ecology, 92, 1332--1343) and vegan help page. * envfit: failed if some of the environmental variables were factors with unused factor levels. Fixed in centroids.cca. Reported as issue #8 in github.com by Eduard Szöcs. * 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 outside the plot, and legend covered lines. The default setting of 'ylim' was improved, and the function follows R idiom more closely. Reported in a private email to J.O. by Ricardo Pita. * scoverage: new function for sample coverage based correction for calculation of relative frequencies in count community matrices (Good 1953, Biometrika 40, 237--264). Version 2.1-13 (closed March 9, 2012) * cca/rda/capscale: names of levels could be dropped if a two-class factor was used as the only constraint. Noticed in an email of Sascha Kirchner (Univ Helsinki, Finland). * scores: expand description of the default method to avoid confusion with specific vegan methods. * scores.monoMDS: did not know 'choices' and hence plot() was also unable to choose dimensions. * vegdist: Added Cao dissimilarity (CYd). Thanks to Yong Cao for consultation. Version 2.1-12 (closed February 23, 2012) * scores.default: failed if users asked scores of non-existing axes. This was reported as an error in ordiplot() when the user tried to plot 2-dim graph of 1-dim solution in https://stat.ethz.ch/pipermail/r-sig-ecology/2012-February/002764.html * simper: new function to implement "similarity percentages" of Clarke (Austral. J. Ecol. 18, 117-143; 1993) contributed by Eduard Szöcs (Uni Landau, Germany). Version 2.1-11 (closed February 9, 2012) * indpower: now can handle input objects without dimnames. This caused problems with oecosimu, because nullmodel objects have no dimnames to save memory. Extended example on indpower help page shows the p-value and heterogeneity calculations suggested in Halme et al. 2009. * adonis, anosim, mantel, mantel.partial, mrpp, permutest.cca: do not need clusterEvalQ(parallel, library(vegan)) for socket clusters. * adonis: added missing 'mc.cores=' for multicore parallel processing. * bioenv: implemented parallel processing. * metaMDS: implemented parallel processing which runs iterations (tries) in batches of 'parallel' iterations. However, it seems that this does not work completely with monoMDS: basic results are OK, but 'diss' and 'dist' vectors are scrambled (tested in Linux & R 2.15.0) which is evident if you try to run stressplot() on the result. The problematic behaviour can also be generated directly with monoMDS(): mods <- mclapply(1:8, function(i) monoMDS(d), mc.cores=2) stressplot(mods[[1]]) The 'diss' and 'dist' seem to contain random rubbish as soon as mc.cores > 1. On the other hand, there are no similar problems with isoMDS() -- but it does not directly return 'diss' and 'dist'. If this cannot be solved, the parallel processing (r2069) will be reverted. * nesteddisc: new argument 'niter' to give the number of iterations to reorder tied columns. * renyi.Rd: fixed a broken link reported by Arne Erpenbach (Uni Frankfurt, Germany). Version 2.1-10 (closed February 5, 2012) * adonis: print info that terms are added sequentially -- this seems to confuse users. Make this change in adonis() instead of print.adonis to be prepared to add other policies. * adonis, anosim, mantel, mantel.partial, mrpp: implemented parallel processing. * RsquareAdj: implemented adjusted R2 for partial RDA results. The adjusted R2 of model rda(Y ~ X1 + Condition(X2)) is defined so that it is the same as component '[a] = X1|X2' in varpart(). Removed some dead code from RsquareAdj.cca(). * varpart: do not scale constraints to unit sd -- this makes constant columns (like all zero) into NaN and causes an error in simpleRDA2. Not scaling may help in problems like that reported in "[vegan-help][5477] Nested factors in function "varpart"?" by Katie Shelef on 26 Jan 2012. * use inconsolata fonts in vignettes. * added .Rinstignore file to list inst/doc files that should not be installed (Makefile, tex, bib, sty). Background: R 2.13.0 mandated to put vignettes to their specific vignettes/ directory, but this is incompatible with R 2.12.* where vegan also should work. The inst/doc directory can still be used (it isnow 'deprecated'), but system files (such as Makefile) and intermediate files (such as tex) are silently copied to the installation. R 2.15.0 (under development) added R CMD check test for these extra files. File .Rinstignore allows maintaining R 2.12.* compatibility and silences R 2.15.0 tests. Version 2.1-9 (closed January 22, 2012) * public launch of parallel processing in vegan. First step was to explain the implementation in decision-vegan.Rnw. * DESCRIPTION: vegan suggests 'parallel'. The 'parallel' package was released with R 2.14.0. If you need to check or use vegan with older R, you should set environmental variable _R_CHECK_FORCE_SUGGESTS_=FALSE (see, e.g., discussion https://stat.ethz.ch/pipermail/r-devel/2011-December/062827.html). * oecosimu, permutest.cca: new parallel block which honours setDefaultCluster() in R-devel (becoming R 2.15.0) and automatically uses parallel processing with socket clusters if setDefaultCluster was defined. Tested in R (unstable) (2012-01-16 r58122) with full features, in R 2.14.1 without setDefaultCluster, and in R 2.13.1 (2011-07-08) without parallel processing * anova.ccabymargin failed if none of the terms was analysed (all were aliased) and no permutations were performed. This would happen with, e.g., A <- dune.env$Management anova(rda(dune ~ Management + A, dune.env), by = "margin") or in general if all marginal effects were aliased. * capscale: plotting failed for mod <- capscale(dune ~ Condition(Management) + A1, dune.env). The centroids for Management were completely removed leaving a zero-row matrix of centroids, and this caused an error in plot() and would probably fail elsewhere. The same problem can appear with completely aliased classes, or when class centroids are nearly zero. * ordistep: handle cases where the marginal effects for adding/dropping are completely aliased. This should avoid problems like that reported in https://stat.ethz.ch/pipermail/r-help/2012-January/300167.html Version 2.1-8 (closed January 8, 2012) * betadisper: failed with an error in internal function betadisper() if there were empty levels. This could happen when 'groups' was a factor with empty levels, and was reported in https://stat.ethz.ch/pipermail/r-sig-ecology/2011-November/002525.html The behaviour is now corrected in ordimedian() which will return NA for empty factor levels. * nestedbetasor, nestedbetajac: New functions that implement decomposition of Sorensen and Jaccard beta diversities into components of turnover and nestedness following Baselga (Global Ecology and Biogeography 19, 134-143; 2010). These are documented with nestedness indices and are ready to be used with oecosimu(). * oecosimu: more informative text on 'alternative' hypotheses in the printed output. Return also the mean of simulations and show that in the printed output. * plot.cca: works with degenerate solutions where constraints are aliased and 'biplot' scores have zero rows. Stops with a comprehensible error message if a user requests non-existing scores (such as "bp" scores for unconstrained ordination). * rarecurve: new function to draw rarefaction curves for each plot, optionally with sample size vertical and corresponding horizontal richness lines. Soil microbiologists with sequencing data seem to want these, and I have seen them used elsewhere as well. Version 2.1-7 (closed November 19, 2011) * adonis: speed up implemented in r1636 was not passing the transposed matrices to internal f.test function. Reported by Nicholas Lewin-Koh. * metaMDS: arguments 'noshare = 0' and 'noshare = FALSE' are now different: zero is taken as the numeric threshold and always triggers stepacross(), whereas FALSE is logical and never triggers stepacross. * vegan 2.0-2 was released on November 15, based on this version. Version 2.1-6 (closed November 12, 2011) * FAQ: correct mark-up of hyper links (@uref{} instead of @url{}), add new entries on RDA scaling, scaling of NMDS stress and scaling of environmental arrows in cca/rda/capscale/envfit, plus some minor updates of old entries. * ordiarrows, ordisegments: gained argument 'order.by' that can be used to order the points within groups before drawing the arrows or segments. This message in R-sig-ecology seems to need this: https://stat.ethz.ch/pipermail/r-sig-ecology/2011-November/002464.html * ordispider: returns invisibly the coordinates to which each point is connected. Triggered by an email query of this functionality. * ordiplot3d: expanded example to show how to use xyz.convert() to add points as per https://stat.ethz.ch/pipermail/r-help/2011-October/293955.html * oecosimu: new proposition for implementing parallel processing following suggestions of Peter Solymos. The only relevant argument is now 'parallel' which can be either the number of parallel processes (defaults getOption("mc.cores", 1)) or a pre-defined socket cluster or NULL in which case it is taken as the default cluster defined by setDefaultCluster (this last option only works in R-to-be-2.15.0 unstable, and using NULL is a user error in R 2.14.0 and hence undocumented). The 'parallel' defaults to 1 (no parallel processing), but if the user sets the "mc.cores" option, all parallel processing functions will automatically use that number of parallel processes. (The "mc.cores" argument is used by the 'parallel' package, but it is normally unset.) If 'parallel' is a socket cluster or there is a default cluster ('parallel = NULL'), this will be used without setting up and closing the cluster. This (1) saves time, (2) allows using of other packages than 'vegan' if user has given command 'clusterEvalQ(library(foo))', and (3) makes unix-like OS (incl. MacOS X and Linux) to use the socket processing instead of forking. * permutest.cca: parallel processing modelled after oecosimu(). Version 2.1-5 (closed October 30, 2011) * opened a new version with the release of vegan 2.0-1 on Oct 20, 2011. * metaMDSdist: the default value of "noshare" was inconsistent with metaMDS(), and therefore stressplot() could fail for engine="isoMDS". Usually metaMDS() sets the 'noshare' depending on the engine, but metaMDSdist() is called directly from capscale(..., metaMDSdist = TRUE) and metaMDSredist (for stressplot), and now these default to extended dissimilarities. The problem was reported by Falk Hildebrand * capscale: could fail if constrained component had zero rank, typically in partial models where constrained component was completely aliased. This was observed when checking an R-News query of October 19, 2011 (https://stat.ethz.ch/pipermail/r-help/2011-October/293077.html) Version 2.1-4 (opened October 20, 2011) * adonis, anosim, CCorA, envfit (factorfit, vectorfit), mantel, mantel.partial, mrpp, protest: user interface changed and 'permutations' can now be a matrix where each row gives permuted indices. Internally first find a permutation matrix or use the given permutation matrix, and then find the statistics with single {ls}apply. Functions adonis and mrpp already worked like this, but they gained the option of matrix input. This makes the functions ready both for the 'permute' package and for parallelization (replace {ls}apply with mclapply, par{SL}apply). Function envfit() was much simplified by generating a common permutation matrix in envfit.default() and using that as the input to vectorfit() and factorfit(). The anova.cca* cases should also be made to use a single generated permutation matrix, as permutest.cca() allows this. Version 2.1-3 (closed October 16, 2011) * added plot.preston, lines.preston and plot.fisher (that also can add points and lines). These are similar as plot.prestonfit and plot.fisherfit, but without the fitted model. Among other things, they can be used to add alternative models to fisherfit and prestonfit models. * sd() function for matrix or data.frame columns was deprecated in R r57185 (R-to-be-2.15.0). The reason seems to be that users were confused when median() did not work on data.frames, and as a solution the R developers decided to take care that mean() or sd() will not work either (it would be nice to understand how these people think). Fixed in rda.default, capscale and simulate.rda/cca/capscale. It seems that this was also implemented in soon released R 2.14.0 as r57209 | maechler | 2011-10-10 19:28:33 +0300 (Mon, 10 Oct 2011), but as message() instead of a warning(). * nesteddisc: use only max 200 tries to reorder columns: tracing showed that in most cases an improved ordering is found rather quickly, and trying up to 1000 times takes awfully long. Now faster, and usually as good as earlier, but slacker. * simulate.rda/cca: implemented 'nsim' or an option to generate an array of simulated matrices inheriting from "simmat" object and using print.simmat() for a compact display. If 'nsim = 1', similar 2-dim matrix is returned as before so that cca(simulate(mod)) still works. For 'nsim > 1', the 'indx' argument should have 'nsim' rows, but if 'nsim' is missing, number of rows in 'indx' will give the number of simulations, and 'indx' can be made with permute::shuffleSet(). Implemented for rda() and cca() results, but not for capscale() where simulate returns a "dist" object which is nasty to pack into an array. * oecosimu: An attempt to set 'parallel' processing in evaluating the statistic, and only evaluating the statistic -- the simulation of null models is not influenced. Both "multicore" (fork) and "snow" (socket) style parallelization are implemented. * permutest.cca: implemented 'parallel' processing in permutest.cca. The parallelization only works in R 2.14.0 (alpha) and later with the 'parallel' package. Function permutest.cca gets a new arguments 'parallel' (defaults 1) that gives the number of parallel process, and 'kind' that selects the parallelization style which is either "snow" (large overhead, but works in al OS's) and "multicore" (faster, but only works in unix-like systems like Linux and MacOS X). The arguments are silently ignored if the system is not capable of parallel processing. The functionality cannot be included cleanly: it depends on the package 'parallel', but suggesting 'parallel' fails R CMD check in the current R release (2.13.2) which does not yet have 'parallel'. So we get warnings: 'library' or 'require' "call not declared from: parallel", and "permutest.cca: no visible global function definition for ‘mclapply". However, with these warnings, the function passes tests in R 2.13.2. * permutest.cca: the user interface changed so that argument 'permutations' can be either the number permutations (like previosly), or a matrix of permutations like produced by permute::shuffleSet(). This was done to move RNG outside parallelized code. This will also allow much simpler and anova.cca* code. Currently, the 'strata' argument will not work, but this will be fixed "real soon now". Version 2.1-2 (opened October 4, 2011) * permutest.cca could not be update()d, because "permutest.cca" was not exported from NAMESPACE -- only "permutest" was exported. Another buglet (and this calls for checking other 'call' items that return non-exported calls). * metaMDS did not reset 'tries' when the analysis was started from 'previous.best' of a different model (except when no. of dims 'k' changed). I think this was a bug(let). Fixed in metaMDSiter.R. * commsimulator is going to be deprecated: it is no longer used in oecosimu() ore elsewhere in other functions. Currently, functions make.commsim(), nullmodel() and simulate.nullmodel() do the same, and more. As the first step, its documentation in oecosimu.Rd is moved to vegan-deprecated.Rd. * examples: cut donw some excessively time consuming examples. Profiling of all vegan examples showed that 25% of total time was spent in anova.cca, and 12.6% in ordistep, but they probably are sufficiently documented more quickly. Version 2.1-1 (opened September 20, 2011) * oecosimu: the 'comm' argument can be either 1) community data, 2) a nullmodel object or 3) a simmat object. If 'comm' is a nullmodel, simulation method is found from the nullmodel object, and if 'comm' is a simmat object, its matrices are analysed without simulations within oecosimu(), and different statistics can be swept out based on the same set of simulated matrices. * permatfull/swap is using the new simulate.nullmodel(...) infrastructure. permatfull1 and permatswap1 removed from vegan devel. * Value of 'mode' is set to "double" for the following null model algorithms in make.commsim: abuswap_r, abuswap_c, r00_samp, r0_samp, c0_samp. These can take any nonnegative real valued matrix as input. nullmodel function now handles storage mode reliably. * meandist bug fix: tapply() function used to find mean group x group dissimilarities could reorder the class levels and return a confused matrix. This could happen in particular when the 'grouping' was a vector of integers which then were ordered alphabetically so that "1" < "10" < "2". Now uses internally more stable way of applying tapply() which should have the danger of reordering the levels. Incidentally, this also seems to be faster. The problem was found by Dr Miguel Alvarez (Univ Bonn). * nestedness.c: changed interface in "swapcount" and "rswapcount" which now require integer data matrix. The first argument in .C call should now be defined as as.integer() instead of old as.double(). * str.nullmodel: new function to display the *str*ucture of the "nullmodel". The "nullmodel" is an environment and therefore does not show in usual str() although its items can be accessed with $-notation. No documentation, but alias in nullmodel.Rd. * New functions: commsim is used to define Null Model Algorithms via a function that returns n x m x nsim array of simulated matrices based on structural constraints. make.commsim contains Null Model Algorithms already defined in vegan from commsimulator and permat* functions (and some more). The nullmodel function creates an environment, where statistics of the input matrix are stored. The environment also stores updated status of sequential algorithms and current number of iterations. The update and simulate methods are used to update the nullmodel (for sequential algorithms) or simulate random matrices, respectively. The simulate method returns the n x m x nsim array (simmat class). Efficiency gains are sometimes high (because marginal statistics are calculate only once by nullmodel), but not significant in most cases. Most advantageously, this implementation can unite the commsimulator and permat* branches and can serve as basis for further extensions. Current intent is to investigate how this low level infrastructure can be used within oecosimu and permat* functions without breaking current vegan functionality. Version 2.1-0 (closed September 20, 2011) * New major version opened with the release of vegan_2.0-0 on September 8, 2011. * nestedness.c: isDiag* uses now switch(sX) where sX is the number of non-empty cells. The "swapcount" method uses new isDiagFill which finds the largest swappable element that does not change the fill, and "rswapcount" uses isDiag which finds both the largest swappable element the change in fill. The swap and trialswap also find first the fill of the 2x2 submatrix, and continue only if fill == 2. The measurable effects are small again (perhaps 1%). * tests: added tests for commsimulator, permatswap1 and permatfull1 before starting the adventures with nestedness.c. * commsimulator: a bit less overhead -- all attributes set simultaneously instead of setting separately dim, rownames and colnames. The results should be identical(), running should be marginally faster or neutral. * permatswap: there was a bug in internal C routine, and therefore not all permissible swaps were performed. Based on limited analysis, the effects of this bug seem to be negligible. It is, however, recommended to re-run all analyses. The C code was made faster by getting quickly out from isDiag* if there are only 0 or 1 filled items, because there is nothing to swap. Tests show that the C code indeed is ca 10% faster in permatswap(BCI, method="swa", thin=1000, times=999), but only a 20-25% of time was spent in C, and the new permatswap/permatswap1 spends 2.2x longer in other parts. With faster C code the net slowdown is 1.7x. * various attemps of speed-up (often in vain): The speed-up started with permatfull/permatswap which appeared to be by far the slowest functions in R CMD check --timings. Later this proved to be a feature of checking these functions in MacBook Air/MacOS X: the functions were not slow in Linux, nor in MacBook when the very same tests were run outside R CMD check. However, several changes were made: - permatfull/permatswap avoid data.frame/matrix casting, and save results in matrices. This was based on misleading test statistics in MacOS, and it is not sure what are the real effects. - commsimulator: smaller overhead. - sample.int was used in place of sample in commsimulator, nesteddisc, permuted.index and poolaccum (the effects may be measurable for permuted.index, but not large). - centroids.cca: much faster. This was perhaps real -- profiling (not timing) showed that cca.formula/rda.formula have a large overhead over cca.default/rda.default, and centroids.cca was responsible for a lot of that -- most is due to ordiParseFormula. - permutest.cca uses La.svd, but the effects are non-measurable and only concern case first = TRUE. - MDSrotate example: envfit does not do permutations. * New functions: permatfull1 and permatswap1. Both functions return a single permuted matrix. These functions are now called repeatedly by the corresponding permatfull and permatswap functions. * New function: clamtest (with summary and plot methods). The method uses a multinomial model based on estimated species relative abundance in two habitats, it minimizes bias due to differences in sampling intensities between two habitat types as well as bias due to insufficient sampling within each habitat. The method permits a robust statistical classification of habitat specialists and generalists, without excluding rare species a priori. Based on Chazdon et al. 2011 (Ecology, 92, 1332--1343). * raupcrick: new function to implement Raup-Crick (dissimilarity/ probability) index with unequal sampling probabilities of species. Brian Inouye informed about their paper (Chase et al., Exosphere 2:art24 [doi:10.1890/ES10-00117.1]; 2011) where they showed that Raup & Crick said that we should use sampling probabilities proportional to species frequencies in assessing their index, but vegdist(x, "raup") uses equal probabilities. Unequal sampling probabilities cannot be directly implemented in vegan, but the Chase et al. method can be implemented as oecosimu(x, function(x) designdist(x, "J"), method="r1"). Basically, the current function uses this, but with boosted code that is much faster than designdist(). Version 2.0-0 (released September 8, 2011) * opened the release candidate of vegan_2.0-0 on September 3, 2011. * some old functions used attributes(x)$which instead of more correct attr(x, "which"), and in addition postMDS() used attributes(x)$names instead of names(). Concerns anosim(), initMDS(), postMDS(), mantel(), mantel.partial() and mso(). initMDS() was one of the two functions that was unchanged since the first vegan release on 6/9/01, and it was changed day before it turned ten-years-old. After this, wisconsin() is the only unchanged function from the first release. * vegan-defunct: put definitions of removed "new" permutation functions to vegan-defunct and have a vegan-defunct.Rd for them. Version 1.92-2 (closed September 3, 2011) * monoMDS: saves and displays info on the dissimilarities used, and displays the number of points. Checks that input is dissimilarities, and warns on negative ones. * MDSrotate: metaMDSrotate() was renamed to MDSrotate(), and metaMDSrotate() was .Deprecated. * meandist: warns if some dissimilarities are negative (small negative values are tolerated). * vegandocs: copied branches/1.17/inst/NEWS as ONEWS (old news), and adapted vegandocs. Expanded documentation of vegandocs(). Version 1.92-1 (closed August 28, 2011) * adonis, betadisper, mrpp: check that dissimilarities are non-negative (small negative values are tolerated). The test was not added to meandist: there may be legitimate usages for correlation-like objects although summary.meandist() is invalid. The addition was triggered by a user who tried to analyse Chase et al. Raup-Crick values in the range -1 .. +1 in betadisper(). * anosim: warn if some dissimilarities are negative. Function can handle negative dissimilarities because it is based on ranks, but probably this is a user error (but can be intentional and correct). * metaMDSrotate: can rotate monoMDS() results. * monoMDS: gained argument 'pc' (defaults TRUE) to rotate the final scores to principal components. * specaccum, fitspecaccum: gained predict() methods. With specaccum() predict(..., newdata) can estimate values for 'newdata' with linear or spline interpolation if necessary. Without 'newdata' the function returns the the fitted expected richness. With fitspecaccum(), the predict.nls() is performed to each fitted model. Function fitspecaccum() is written so that default fitted(), residuals() and coef() work. * specpool: failed if 'pool' had NA values or empty factor levels. Checks that 'pool' length matches nrow of data. * NAMESPACE: imports nobs from permute_0.5-3 in R 2.12.2 and older which do not yet have nobs() generic. Do not export orderingKM & ordimedian. Remove aliases to non-exported and non-documented print and print.summary methods in Rd files (but leave documented ones). * vegandocs: shows the permutation vignette of the 'permute' package. Version 1.92-0 (closed August 23, 2011) * open new version with the release of vegan_1.17-12 on August 17, 2011. * fitspecaccum: a typo and a condition was never true. * monoMDS & metaMDS: always print types of stress and ties. * NAMESPACE: export pasteCall for analogue. * NEWS: added file NEWS.Rd for vegan release 2.0 news in Rd format. Keeping neat formatting of this file may be challenging to many text editors, but it is worth trying. This file should list the important items for regular vegan users, whereas this ChangeLog should explain the changes to other vegan developers. If getOption("help_type") == "html", should start a browser to show the NEWS, and use text console otherwise ("html" tested on MacOS R.App GUI, text mode in Linux and MacOS bash shells, no testing on Windows yet). Although the browser knows how to display NEWS.Rd, it does not format the page properly (\code{foo} shows as ordinary text etc). As a kluge we now make a NEWS.html file in the inst/doc directory. NEWS.html cannot be made in the inst/ directory since browser only agrees to show NEWS (plain) in the main directory or files in doc directory. Version 1.91-0 (closed August 18, 2011) * NAMESPACE: added namespace to vegan. Currently hides all that can be hidden, and exports only main functions: Some method functions will be probably exported later. Superfluous aliases were removed with the registration of S3 methods, and scoping was changed a bit in anova.ccabyterm, model.matrix.cca and model.frame.cca. as.mcmc is not yet registred: it need changes in Imports field of DESCRIPTION (same with vif.cca: vif is defined in car, but we could have our private vif generic here?). * Vignettes: use now jss.cls shipped with R instead of amsart.cls for better consistency with R and permute style. * plot.envfit: When `add == FALSE`, make sure we leave enough room around the plotting locations to contain the arrow and centroid labels. * plot.isomap: will always plot points or text above net so that they are visible. Gained argument 'type'. * ordiplot: expose arg 'cex' so that user can change its value. Age shows in this function, and it is badly in need of complete re-writing to improve its flexibility. Version 1.90-2 (closed August 6, 2011) * ordilabel: gained argument 'select'. * orditorp: works with NA scores. * make.cepnames: ignores duplicated and trailing dots. It is assumed that the names to be changed came via R make.names() mechanism which changes all blanks and non-accepted characters to dots, and this may give extra dots in names. Gained argument to take the second item of the name instead of the last which may help in names like "Vaccinium vitis-idaea" (which becomes "Vaccinium.vitis.idaea" -> "Vaccidae") or names which have authors or other rubbish at the end. Version 1.90-1 (closed July 23, 2011) * cca/rda/capscale support functions: cca/rda/capscale were changed to return zero components instead of NULL for completely aliased constraints (CCA) or saturated models (CA), but several support functions still checked for is.null() only, although they also should check if rank == 0. Some functions failed, and these are fixed here: anova.cca, bstick.cca, goodness.cca/rda, predict.cca/rda, screeplot.cca. The following functions did not fail, but were fixed: anova.ccanull, calibrate.cca, ordirgl, ordiresids, ordiplot3d, deviance.cca/rda (simplified), ordixyplot. * swan: gained argument 'maxit' that can be used to restrict the number of beals() passes on zeros. The default is 'maxit = Inf' which is the old behaviour: beals() passes on zero entries continue until there are no zeros or the number of zeros does not change. Probably only 'maxit = 1' makes any sense (in addition to the default 'maxit = Inf'), but all values are allowed. * metaMDSrotate: results could be a bit off with NA in environmental vector and >2D solution. The starting scores must be orthogonal, but the initial orthogonalizing PCA was run without removing NA cases. * ordiellipse, ordihull, ordispider: will remove NA scores that can appear with na.action in cca/rda/capscale (and perhaps in other cases). * betadiver: argument 'index' was renamed to 'method' for compatibility with dist() objects. Argument 'index' is still recognized with a warning. * metaMDS: Documentation and interface adapted to monoMDS(). Argument 'noshare' defaults to FALSE with monoMDS(), since tie breaking seem to handle tied maximum dissimilarities even better than stepacross(). For 'engine = "monoMDS"' 'noshare' defaults to TRUE. The 'noshare' argument now accepts logical arguments in addition to old numeric (FALSE worked previously because it was interpreted as numeric 0, but TRUE has now meaningful interpretation). Remove argument 'old.wa' introduced in rev280 on 24/3/08 for backward compatibility when calculating WA scores started to use the same transformed data as analysed. * ordiplot: Now handles non-par arguments to plot.default without warnings. Things like `axes = FALSE` in the call now just work! Version 1.90-0 (closed July 3, 2011) * vegan now depends on the permute package for new permutation designs. This initially version strips out all the old "new" permutation code from the R and Rd files, and patches up permutest.betadisper to use shuffle() to generate permutations. The 1.90-0 devel series will lead the way to vegan 2.0-0. There may well be build problems as we iron out permute / vegan meshing. * capscale: could not be embedded in another function after fixing the update() in 1.18-31 -- problems were anticipated in ChangeLog, and they were realized. * monoMDS: text for a proper help (Rd file). Other help files updated for monoMDS. Stress type 2 is printed both in monoMDS and metaMDS. stressplot() prints now R2 for monoMDS() results, and docs tell that "linear fit" of stressplot() is related to "stress 2". Version 1.18-33 (closed June 21, 2011) * adonis: made faster (much faster in tests) by polishing the f.test() in the innermost loop. Version 1.18-32 (closed June 14, 2011) * closed with the release of vegan_1.17-11. * anova.prc: new function that casts prc() result to a corresponding rda() and submits this to anova.cca(). With this is it is possible to analyse anova(..., by = "axis"). Other cases are possible as well, but not very useful as "margin" and "term" only analyse all constraints as a single matrix. Now some functions that were made refuse prc() results in 1.18-30 work again, and anova.ccabyaxis() even makes sense. This fixes a problem Jae Pasari raised in his email. * vegdist docs: Brian Inouye informed us that we are not calculating the Raup-Crick index like originally suggested: we use equal probabilities for all species, but the species probabilities should vary with their frequencies. Doing this would break vegdist.c design, and require Fisher's non-central hypergeometric distribution, and that is not available in base R. However, it seems that a simulation version could be implemented in oecosimu(). Now we document the problems in vegdist.Rd, but do not correct the behaviour. The key paper is available over http://www.esajournals.org/doi/full/10.1890/ES10-00117.1 * rda & capscale: similar changes as in cca in r1517 (version 1.18-24). CA component is always returned, even with zero rank, and CCA and pCCA components are NULL only if they were not specified originally, and if they become zero rank because of aliasing etc, they are returned as zero components (instead of NULL). * print of cca/rda/capscale: do not "Proportion" column in unconstrained ordination which only has one component. However, this will be printed also with zero pCCA or CCA (but not with NULL). Version 1.18-31 (closed May 30, 2011) * ordiR2step: more informative about rejecting 'scope': partial models are not (currently) accepted due to the design of RsquareAdj.rda(). * specnumber: gained argument 'groups' to find total richness within each group. An example shows how to use this to find one index that Whittaker suggested to estimate beta diversity. * capscale: species scores will be NA if input data were dissimilarities and no 'comm' was given. update(capscale_result) failed because LHS data were evaluated in the environment(formula). Now removed the explicit environment: I ran some tests and found no problems, but let's see what the real life brings along. The changed point is commented so that this change can be reconsidered if necessary. * oecosimu: reverted r1557 of version 1.18-26, or splitting tied values. This was introduced because Chase et al. (Ecosphere 2011, http://www.esajournals.org/doi/pdf/10.1890/ES10-00117.1) used this in their Raup-Crick index. This is against established practice in order statistics and therefore we cancelled this. * specaccum: reverted r1505 & 1507, or introduction of weighted species accumulation model in version 1.18-23. The method was introduced because of user request, but these persons lost their interest and therefore there is no reason to see the trouble that finalizing these functions would require (see comments on version 1.18-23 about some of the work needed, and there is more). Version 1.18-30 (closed May 26, 2011) * opened with the release of vegan 1.17-10 on April 27, 2011. * nobs: documented nobs() methods for vegan. These seem to be needed in R 2.13.0 and should be released soon (there is no need to add R >= 2.13.0 dependence as long as we do not use these functions ourselves within released vegan code). * treeheight: dramatic simplification and speed-up of the code. * scores.cca/rda: failed if user requested only non-existing scores. Now return an empty list of scores instead (with possible attributes). * prc: several support methods did not work with 'prc' results, and these now stop with an informative error instead of an uniformative error. Concerns anova.ccabymargin, anova.ccabyaxis, drop1.cca, add1.cca, model.frame.cca, model.matrix.cca. This was found out after a private user query about having signficance test for the sencond PRC axis. Version 1.18-29 (closed April 27, 2011) * capscale: could fail with add = TRUE in R 2.13.0. A kluge was necessary in cmdscale() pre 2.13.0, but the feature was fixed in R 2.13.0 and unnecessary fix failed. Now the kluge is used only in older versions of R and capscale should be working both in 2.13.0 and older R. * adipart.Rd, multipart.Rd: cancelled some excessive speed-ups in example code made in r1204. Some of these speed-ups never made to the release version, but were only made in the devel branch. The sped-up examples were also merged to the release (adipart.Rd, kendall.global.Rd, multipart.Rd, mantel.correlog.Rd, pertmatfull.Rd, radfit.Rd). Also reverted r1224 so that Guillaume's original r1206 (49 permutations instead of 99) is used again. Probably we should speed up some other examples. The five worst cases (timing in MacBook Air) are: ordistep (19.0 sec), add1.cca (7.2 sec), tsallis (7.0 sec), prc (5.6 sec), vegan-package (5.2 sec). * vegan-package.Rd, ordistep.Rd: speed up examples. Version 1.18-28 (closed April 11, 2011) * Peter Minchin joined the vegan team. * monoMDS: a new function with Peter Minchin's Fortran90 code for NMDS. The full Fortran90 code has global, local, linear and hybrid MDS, configurable and valid tie treatment, handles missing values, and allows adding new points to existing ordinations. The Fortran code is highly tuned, and much faster than other alternatives in R. The R interfaces allows access to most features of the Fortan90 code, except adding new points to the ordination (which will need a separate function). The missing values in dissimilarities are also handled in the R interface. The function will eventually replace isoMDS() of the MASS package as the main NMDS engine in metaMDS(). * metaMDS: uses monoMDS() as its default engine (and gained argument 'engine' to select either monoMDS() or isoMDS()). * stressplot: is generic with a specific method for "monoMDS" objects, and the old function as the default method. * goodness: got a new method for "monoMDS" objects. The function handles all monoMDS() models, but does not take into account possible missing values in input dissimilarities. * metaMDSrotate: gained argument 'na.rm' (defaults FALSE) to remove missing data from the continuous vector. Version 1.18-27 (closed April 1, 2011) * orderingKM: Kurt Hornik found a problem when inspecting the Fortran subroutines with gcc 4.6 tools when checking vegan release 1.17-9. Version 1.18-26 (closed March 31, 2011) * version closed with the release of vegan 1.17-9. * oecosimu: added argument 'tiesplit' (defaults FALSE). If TRUE, simulated values tied with the observed statistic are split so that half of them are regarded as satisfying the condition, and removed from those cases which are greater or less (as given by 'alternative'). This is usually *not* done, but implementing Raup-Crick dissimilarity in oecosimu() following http://www.esajournals.org/doi/pdf/10.1890/ES10-00117.1 (Chase et al., Ecosphere 2011) uses this option. However, cross-checking the "r0" null model against the vegdist(..., "raup") indicates that the options should be set FALSE (and this would mean that the change is reverted). * anova.ccabyaxis: I (JO) noticed in an ORDNEWS message that anova(..., by = "axis") ignores the original Conditions in partial models and so gives wrong results in partial models. The fix finds the conditioning matrix as qr.X(object$pCCA$QR), and uses this as a Condition in updated models. Added a regression test that checks that statistics and residual df match. * tolerance: new function to compute species tolerances and sample heterogeneities as Canoco does. Includes a method for objects of class "cca". * plot.contribdiv: plot now draws axes and box *after* doing the drawing - stops polygons overplotting the axis and box. Version 1.18-25 (closed March 23, 2011) * ordilabel: gained argument 'xpd' to draw labels outside the plot region. * ordisurf: got a formula interface as an alternative to define the model. Also now accepts `gam()` argument `select` to add an extra penalty to smooths so they can be penalized to zero (i.e. removed from the model). This is a form of model selection. Estimation of smoothing parameters can now be determined via argument `method`. Both `select` and `method` have been set to defaults that were implied in previous versions of the function. If smooth is penalized to (effectively) 0, countour plotting is suppressed. New argument `gamma` can be used to increase the cost of each degree of freedom used by a model in the GCV or UBRE/AIC scores used in smoothness selection. New argument `plot` can be used to stop ordisurf producing any graphical output. A plot method is now provided that can draw contour or perspective plots of ordisurf results, or plot the fitted GAM surface. * metaMDSrotate: can now rotate > 2-dim solutions so that the first axis is parallel to a given vector and all others are orthogonal to the vector (and rotated to PC if they were originally). Earlier had argument 'choices' which was supposed to select only two axes to be rotated (but failed before rev 1533), but now lost 'choices' and always uses all dimensions, and orthogonalies dim 2 and beyond against the given vector. There was a query in R-sig-ecology on having two vectors in 3-dim ordination which triggered the current changes, but this does not still answer to the question of https://stat.ethz.ch/pipermail/r-sig-ecology/2011-March/001947.html. It would be possible to have this with recursive metaMDSrotate for 1..N for first 'vec', then 2..N for the second 'vec', but the later 'vec's could be correlated with previous axes. * metaMDS: 'previous.best' can now be a user-supplied configuration, or a result of isoMDS(). If 'previous.best' is an isoMDS() or a metaMDS() result, it can have different number of dimensions than the current 'k': extra dimensions are dropped off, or noisy extra dimensions are added as needed. This may help in running metaMDS() with a range of 'k'. Not yet documented. Version 1.18-24 (closed March 10, 2011) * cca: will return NULL item for CCA only if constraints were not given. If the CCA component has zero rank (= constraints were aliased or were orthogonal to the data), will still return a CCA item with zero eigenvalue, rank, scores etc plus info on "alias". The residual component will never be NULL, but similar zero-containing component is returned even when there is no residual variation. Usually these changes only manifest in arbitrary data sets, but we have had email queries in R-sig-eco on completely aliased constrainsts when users assumed that model cca(y ~ A + Condition(A)) would be similar to a random effects model and A could be analysed both as a Condition and as a Constraint instead of being aliased. Naturally, overfitted models with empty residual components do appear often. Currently the printed output includes these zero items with Inertia and Rank 0, whereas NULL components are not displayed. The changes so far only concern cca(); rda() and capscale() are only changed after (and if) this change appears sensible and correct in cca(). * drarefy: a new function to return the probabilities that a species occurs in a rarefied sample (= sampled without replacement) of a given size, (or given sizes specified separately for each row if 'sample' is a vector).. * diversity, rarefy, rrarefy, specnumber: accept vector input. All functions documented in ?diversity now accept vector input. Function fisher.alpha and drararefy already accepted vectors. Version 1.18-23 (closed February 28, 2011) * opened with the release of 1.17-7 based on version 1.18-22 on February 16, 2011. * does not use unnecessary return() plus other stylistic twitches. This touches 24 functions, but users should see no difference. * procrustes: checks and reports different number of rows instead of failing in crossprod() with incompatible arguments. * prestonfit, as.preston: default now 'tiesplit = TRUE'. * as.preston (prestonfit, prestondistr): uppermost octave could be NA with 'tiesplit = TRUE' (a bug). * decorana: Cajo ter Braak notified about false expansion of computed zero eigenvalues in rescaling which then are used in estimating eigenvalues. They are now zeroed. Cajo's example was a 6x5 petrie matrix: petrie <- matrix(0, 6, 5) diag(petrie) <- 1 petrie[row(petrie) - 1 == col(petrie)] <- 1 decorana(petrie) Gavin Simpson had another failing case: dummy <- matrix(c(1,3,1,0,0,0,0,0,0, 0,0,0,1,3,1,0,0,0, 0,0,0,0,0,0,1,3,1), nrow = 3, byrow = TRUE) which also failed in orthogonal CA ('ira = 1'). Now the zeroing is done after estimating each axis, and the results are similar as in Canoco. However, the results of orthogonal CA with 'dummy' are wrong in both: there should be two eigenvalues of 1, but only one is reported. This is a fundamental problem in the orthogonalization algorithm in the Fortran code presumably shared between vegan:decorana and Canoco. * specaccum: first step in implementing weights on method="random". Not yet documented nor supported. Issues that must be solved are plotting (all lines? summaries?), summarizing (use approx to get average predictions?) and the very natural link to fitspecaccum models. * nobs: R 2.13.0 will introduce new generic nobs() that will return the number of observations. This is at least needed in functions to evaluate BIC and in step() and functions it calls. Implemented nobs() for several vegan classes -- some of these may be unnecessary. Not yet documented but aliases in vegan-internal.Rd. * FAQ updates: using 'select' in ordination text() and points(), using 'xlim' to flip axes or zoom into ordination plot(), the non-effects of 'strata' in adonis(). All these indeed are frequently asked. * scores.default: clarified documentation (PR#1300). * vegdist: rephrased Chao index following PL. Version 1.18-22 (closed February 16, 2011) * nestednodf: did not go to 'weighted = FALSE' with quantitative data if 'order = FALSE'. Reported by Daniel Spitale. * eigenvals: learnt to know 'dudi' objects of the ade4 package, and 'pco' an 'pca' obejct of the labdsv package. * betadisper: streamlined code somewhat. * prestonfit: implemented splitting "tied" counts (1, 2, 4, 8 etc) between octaves following Williamson & Gaston (J Anim Ecol 43, 381-399; 2005) with argument 'tiesplit = TRUE' * specaccum: fixed typo -- 'individuals' instead of 'invidividuals'. plot() gained argument to use "individuals" as x-axis instead of "sites" with method = "rarefaction". Version 1.18-21 (closed January 19, 2011) * Fixes bug report #945 at R-Forge: anova.cca should now work with subset, missing data, functions of constraints (like log(x)), constraints or subset variables in data=, attached data frames or in working environments. * capscale: return additive constant ('ac') when 'add = TRUE'. * fitted.capscale, predict.rda: additive constant ('ac') subtracted from the estimated distances when 'add = TRUE' was used in capscale(). * predict.rda: type = "working" for capscale returns now scaled scores that produce the dissimilarities as Euclidean distances -- like was claimed in the help page. * simulate.capscale: implemented simulate() for capscale. This uses internal metric scaling mapping to simulate data and add error, but returns Euclidean distances adjusted to the original scale of input dissimilarities. The function uses only the real axes, and imaginary dimensions are ignored. * anova.cca: by = "term" and by = "axis" work now both with the data= statement and with variables in the GlobalEnv and subset= both in cca/rda. It seems that 'subset' is not implemented for capscale(), but otherwise models work. * cca/rda: added item 'subset' that is the subset argument evaluated to a logical vector. * capscale: implemented 'subset' (and this also works with anova.cca). It looks like all anova.cca tests pass also with capscale (but more thorough test will be run before closeing the anova.cca bug in vegan-forge). It seems that subset and na.action also work. * anova.cca: most cases work now when terms are given in attach()ed data frame after changes to anova.ccabyterm() and ordiParseFormula(). * anova.cca: works (mostly) when there are missing values. The exception found was 'by = "term"' when the data frame is not given as a 'data=' argument, but as an attached data.frame. In this case 'by = "term"' detects a change in the number of rows and stops with a message. Version 1.18-20 (closed January 9, 2011) * base of vegan release 1.17-6 (released on Jan 10, 2011). * capscale: the total inertia was defined as the sum of absolute values of inertia so that negative eigenvalues of imaginary dimensions increase inertia (changes in 1.18-17 and release 1.17-5). Torsten Hauffe reported this as a bug in vegan open-discussion forum in R-Forge on Dec 22, 2010. I (JO) answered on Jan 1, 2011 and justified the change, and said this is a design decision, and not a bug. Now I have reconsidered this design decision, and it really seems to me that it was wrong. Now the negative eigenvalues again reduce the total inertia, and are similar as in vegan 1.17-4 and earlier. The capscale() output got a new item of "Real Total" that gives the sum of eigenvalues without the imaginary component, and the proportions are given only within this real component (if there are negative eigenvalues). The eigenvalues of negative eigenvalues are not added to the result, because they are not strictly for the unconstrained component only like previously indicated. However, summary.eigenvals() estimates the proportions explained using absolute values of eigenvalues since this seems to make sense there (the proportion explained is now based on absolute eigenvalues to give more sensible output). Version 1.18-19 (closed January 3, 2011) * new version opened with the release of vegan 1.17-5 (submitted Dec 17, 2010, released at CRAN on on Dec 18, 2010). * CCorA: Pierre Legendre's minor fixes, including scaling of scores Cy an Cx, and removing requirement of MASS. * wascores: checks input -- weights (species abundances) must be non-negative and not all zero. * metaMDS: function was written for community data with all entries non-negative, but it is used increasingly often with other data types with a risk of failure (especially in wascores()). Now data are checked for negative entries, and arguments wascores, autotransform and noshare are set to FALSE with negative data entries. Triggered by email queries and problem reports. Version 1.18-18 (closed December 17, 2010) * mantel.correlog: proper treatment of ties in permutation statistics. Function uses mantel() to evaluate p-values, and this uses one-sided test. If the statistic is negative, the test direction is reversed, but then p-value cannot be directly complemented if there are ties: the observed statistic must be switchec to another side of the tied block. Therefore mantel.correlog() now evaluates the p-value directly in reversed test. * nestedtemp: updated the literature reference to Almeida-Neto & Ulrich (2011). * vegdist.Rd: fixed legends to Gower indices and checked binary formualations (ok). * vegan-package.Rd: added a package intro file (to be merged to the release version 1.17-5). * sipoo.rda: got island names, and decision-vegan.Rnw vignette was changed accordingly. * ordistep: Pierre Legendre's edits of the help page. * prc: got back the formula interface and with that the na.action lost in r1356 (9 Nov, 2010). * plot.procrustes: user can select the direction of the arrow with argument 'to.target', and the 'type' of the plot. With 'type = "text"', ordilabel() is used to mark the tails of the arrows. * plot.betadisper: would fail when plotting anything other than axes 1 and 2. Now fixed and an example included in the Rd file to make sure this doesn't happen again. Reported by Sarah Goslee. Version 1.18-17 (closed December 1, 2010) * predict.procrustes: gained 'truemean' so that new points can be added to the plot.procrustes() graph. * alpha release version: preparing release (1.17-5) of vegan. Mainly clean up and checking of functions intended for the release. * mantel.correlog: vegan mantel() was used standard order statistics or (hits+1)/(nperm+1) since May 2009, but mantel.correlog() did not notice the change and still tried to correct the mantel() result. * as.mlm.cca/rda and intersector: should get the pivoting of names in qr.X() correct both in the current buggy R and hopefully fixed next version 2.12.1. * vif.cca: aliased terms must be removed when calculating VIFs. Test case vif.cca(cca(dune ~ Manure + Management, dune.env)) should give decent values all below <100 (used to give magnitude 10^31). VIF of aliased terms is NA. Pierre Legendre noticed this. * print.eigenvals uses zapsmall. Version 1.18-16 (closed November 17, 2010) * procrustes: fixed centring of fitted(). Added predict() method that can be used to add new rotated coordinates to the target. The function cannot be used for symmetric analysis with 'newdata'. * vignette on design decision: updated to changes in 'const' in scores.rda() in 1.18-15 and to Canoco 4. Explains now 'const' more thoroughly. * pcnm: gained argument 'dist.ret' to return the distance matrix on which PCNMs were based. * cca/rda/capscale: JO yielded to the pressure, and added proportions of inertia components in the printed output. * capscale: failed with na.action -- fix in ordiParseFormula(). na.action was introduced in rev1002 (Sept 11, 2009), and then ruined with a change in ordiParseFormula() in rev1007 (Sept 15, 2009) so it lived four days and was broken when released. The problem was reported by Nevil Amos. * SSgleason: a new SS-species-area-model. * SSlomolino: improved starting values for 'xmid' (and 'Asym'). Now fitspecaccum(..., "lomolino") works in several cases, including BCI and bryceveg (but fails in <1% of cases). Now 'Asym' and 'xmid' are estimated from Arrhenius at log-log scale: 'Asym' is the predicted value at max(x), and 'xmid' is the value of x giving 'Asym/2'. * capscale: defines total inertia as the sum of absolute values of eigenvalues to be consistent with cmdscale(), wcmdscale(), eigenvals(), Gower and Mardia, Kent & Bibby. * eigenvals: added a method for "pcnm" and docs discuss handling negative eigenvalues in summary.eigenvals(). Function is ready for the new version of cmdscale() in R 2.12.1. * prc: Cajo ter Braak wrote new code for more direct implementation of PRC. This drops formula interface and directly finds model matrices avoiding aliased terms. Version 1.18-15 (closed November 9, 2010) * procrustes: 'translation' needs to take into account 'scale', although Mardia et al. omit it. Reported, analysed and fix suggested by Christian Dudel (Bochum). * fitspecaccum: uses now new SS-models for species-area relationship and several of standard SS-models for nls(). Placeholders for documentation added. Has a plot() function. * Self-starting nls() models for species-area relationship: added Gitay and Lomolino models from Dengler 2009 (J Biogeog 36, 728-744). Some more should be added, but these were among the best in Dengler's simulation. The starting values of the Lomolino model (SSlomolino) need work, as do several other candidate models. The purpose is to use these also in fitspecaccum(). * rda: the scaling 'const' can now be a vector of two items: the first is used for species and the second for sites. This allows compatibility with Canoco 3.x (but Canoco 4 changed scaling): if 'mod' is an rda() result, and 'nr' is the number of rows in data, then "scaling = -2, const = c(sqrt(nr-1), sqrt(nr))" in scores(), summary() or plot() will use default scaling of Canoco 3.x. Help page now points to decision vignette explaining scaling and 'const' (and the vignette needs updating). * prc: coefficients folded in a wrong way. Diagnosed, reported and fixed by Cajo ter Braak. CtB also fixed the scaling of species scores and coefficients to be more consistent with Canoco and common standards. The function now ignores user settings of contrasts and will always use treatment contrasts. Cajo ter Braak is now recognized as a co-author of the function. * nestednodf: breaks ties in column and row totals by row sums and column sums in quantitative data ('weighted = TRUE'). Version submitted by Gustavo Carvalho in a follow-up to Feature Request #1097. Version 1.18-14 (closed November 1, 2010) * treedist: works now with zero-height trees (for instance, only one item in a tree). Function gained a new argument 'relative' (defaults TRUE): if FALSE, finds raw dissimilarities of tree heights. Help page now tells that relative tree distances are in range 0..2 instead of 0..1, since combining two trees may add a new common root. * isomap: returns only axes associated with positive eigenvalues. * wcmdscale: give two goodness of fit statistics for 'k' axes: one is for the real part and based on the sum of positive eigenvalues, and second is for all axes and based for the sum of absolute values of all eigenvalues. * summary.eigenvals: handle now possible negative eigenvalues from capscale() or wcmdscale(): cumulative sum and proportions are now based on the sum of absolute values of eigenvalues, and all real eigenvalues explain less than 100% if there are negative eigenvalues. Version 1.18-13 (closed October 15, 2010) * anova.cca(..., by = "axis"): now really uses marginal tests for every axis. Significance of axis k with LC scores lc is from model update(object, . ~ lc[,k] + Condition(lc[,-k])). That is, axis k is used as constraint and all other axes as conditions, when axis k is analysed. This also solves the failure of anova(..., by = "ax") of rda(dune ~ poly(pH, 2) + Baresoil, varechem) of PR#945, but no other problems of the same report. * treedive: handles trivial cases of zero (diversity NA) or one species (diversity 0). * oecosimu: handles NA values as na.rm = TRUE in simulations for cases where these are produced by the function to evaluate statistics. * oecosimu: takes care that the statistic is evaluated with binary data when null models are binary. This was a one-year old bug introduced in rev 967 on Aug 31, 2009. Previous time this bug was corrected in rev 438 on June 28, 2008. * nestednodf: Gustavo Carvalho sent a new upgraded version which also implements a new quantitative method of Almeida-Neto & Ulrich (Env Mod Software, in press; 2010). Based on feature request #1097 in R-Forge. * ordistep: name clash if the fitted model contained item or term called 'mod'. Reported by Richard Telford (Bergen, Norway). * fitspecaccum: Stephen Sefick suggested adding Michaelis-Menten fit to random species accumulation and sent his model function. These ideas were used to add a new more general function. In addition, there is an option of fitting Arrhenius model S = c*A^z with a new self starting function SSarrhenius() for nls(). No documentation yet: needs work. * decorana: gives a warning if residual is bigger than tolerance. Version 1.18-12 (closed September 26, 2010) * swan: no eternal loop with disconnected data where zeros will remain in the matrix. * ordilabel: gained argument 'col' to set the text colour of the labels separately from 'border' (default action is to use 'border' colour). * ordiellipse: gained argument 'col'. For draw = "lines" this works similarly as previously when 'col' was passed on. For draw = "polygon" 'col' sets only the polygon fill, and the text of the labels will use the colour of the border or of the foreground. * ordiR2step: gained argument 'direction = c("both", "response")', and with "both" gives also adjusted R2 when dropping terms. I have not yet seen a case where a term is dropped. Abandoned dangerous practice of getting the R2.all directly from a fitted model of the 'scope' since this may have different lhs. * anova.ccalist: removed. Revisions were 1273, 1274, 1276. Could not make this work consistently with other anova models, except with 'model = "direct"'. The function would also change the API so that "..." come as the second argument breaking partial matching of other arguments. Version 1.18-11 (closed September 17, 2010) * diversity: example says that rarefy(x, 2) - 1 is the same as unbiased Simpson of a true random sample of Hurlbert (1971, eq. 5). Added after several wishes to have this function. * metaMDS: more verbose about connectivity. Use na.rm = TRUE in metaMDSdist(). * FAQ: entry on ade4:cca name clash triggered by an invalid bug report #1066 and queries in r-sig-ecology. Version 1.18-10 (closed August 31, 2010) * New version opened with the release of vegan_1.17-4 on August 20, 2010. * rankindex: can take a list of dissimilarity functions as an argument. * deviance.cca/rda: return 0 (instead of NULL) if there is no residual variation. * vegdist: help page gives equations for binary variants of the indices. * biplot.CCorA: resets par that it sets. * ordiR2step: can go to the end and include all variables of the scope (and checks there is a scope). Additional stopping criterion of exceeding P-value. Looks like being up to specs and left for approval. * permutest.cca: defaults to 99 permutations instead of 100 (to be consistent). Item 'call' now stores the call to permutest() instead of the call of the ordination which is now saved in 'testcall'. This means that update() works now. * anova.cca: use correct degrees of freedom when there is no constrained or no residual component. * anova.ccalist: Started to work on the concept of permutation test comparison of several cca/ rda/ capscale models. The basic function was added to the R-Forge (undocumented!). First idea is to run permutest.cca with the same RNG seed and collect the permutations from the differences of these models. This won't be consistent with other anova.cca* because permuted residuals differ from the corresponding partial model (except with model = "direct"). Another option that I have on my mind is that I use model.matrix.cca to reconstruct a matrix of RHS of each model, and then run a series of partial model ANOVAs. Here the problem is that the statistics will be sequential, i.e., the residual of each model is from the next model and not from the final model, and the models must be in increasing order or ordered programmatically; the current test will study differences of any sequence. Naturally, we have to figure out how the permutation should be done. Probably a note to R-Devel to open up discussion on the issue. NOTE: there is no automatic delegation to this function. If you try this, you must explicitly write "anova.ccalist(model1, model2, model3). NOTE2: There are no tests of the sanity of the input: be careful. NOTE3: Does not work with saturated model with null residual variance. Version 1.18-9 (closed August 20, 2010) * mrpp & meandist: John Van Sickle notified us that his Classification Strength (CS) uses 'weight.type = 1' (or n) insteaad of 'weight.type = 3' (or n(n-1)/2). Calculation of CS was dropped from mrpp(), because with this weighting it no longer has an exact relation to the corresponding MRPP statistic and the function mrpp() cannot provide a significance test for both statistics together. CS is kept in meandist(), where its calculation is corrected for the correct weight type. * vegdist: Anderson et al. (Ecol Lett 9, 683-693; 2006) defined their "alternative Gower" without range standardization of columns. Reported as bug #1002 in http://r-forge.r-project.org/ by Sergio Garcia. Also some small edits of vegdist man page. * msoplot: legend mixed symbols and labels. * Rd (help) files: removed some superfluous \-characters that were visible in rendering text (accented letters, Latex notation in wrong places). * predict.rda/cca: document 'newdata' with 'type = "response"' or 'type = "working"'. The feature was added in vegan 1.18-4 (rev1180, April 15, 2010). Version 1.18-8 (closed August 12, 2010) * DESCRIPTION: does not suggest package 'ellipse'. * FAQ: new entry on negative or non-numeric data, and updates of variance explained by ordination. * intro: ordispider uses label. * adonis: uses print.anova for cleaner output. * plot.MOStest: uses veganCovEllipse instead of ellipse:::ellipse.glm. * ordiellipse: failed to plot labels with filled polygons, since the same colour was used for polygon filling and labels. Now uses ordilabel() with draw == "polygon" (but still text() with draw == "lines"). * decorana: change order of data checks so that non-numeric data is detected (by rowSums()) before checking negative data entries. * ordigrid: arguments lty, col and lwd to use different lines for levels and replicate of the grid. Version 1.18-7 (closed July 19, 2010) * new version opened with the release of vegan_1.17-3. * veganCovEllipse: new internal function for drawing covariance ellipses (to be used both with ordiellipse() and plot.MOStest()). * ordiellipse: uses veganCovEllipse. Version 1.18-6 (closed June 16, 2010) * Version 1.18-6 closed simultaneously with the release of vegan_1.17-3 on June 16, 2010). * mantel, mantel.partial: considerable speed up by cleaning innermost loop and replacing as.dist() with direct extraction of lower diagonal. * treedist: documenting tree dissimilarity function that has been in vegan devel since Aug 17, 2009 (rev928). * betadisper: 'type = "median"', the default, was not computing the spatial median on the real and imaginary axes separately. Reported by Marek Omelka. * permutations: First attempt to document within Vegan the general workings of permutation tests. See ?permutations for details. Version 1.18-5 (closed May 31, 2010) * cca, rda: plot() failed if Condition() had factors, but constraints had no factors. An example of failure: m <- cca(dune ~ A1 + Condition(Management), dune.env) plot(m) ## failed * ordiarrows: gained 'label' argument which uses ordilabel() on arrow starts. * ordisegments: gained 'label' argument which uses ordilabel() on both ends of the segment. * ordispider: gained 'label' argument (uses ordilabel()). Can now handle ordihull() result objects: connects points in the line to the hull centroid. Extended examples. * ordiR2step: new function to perform forward model selection following Blanchet, Legendre & Borcard (Ecology 89, 2623-2632; 2008) or by adjusted R2 until the adjusted R2 of the full model (scope) is exceeded or adjusted R2 starts to decrease. * RsquareAdj.default: handles vector arguments. * ordiellipse: works only with 2D data, and now uses only first two dimensions of input if more given. For instance, the following works now, but gave very cryptic error message previously: m <- decorana(dune) plot(m) with(dune.env, ordiellipse(m, Management)) * ordiresids: removes now the row weights from Residuals and Fitted in CA. Now shows the same values that are shuffled or resampled in simulate.cca() where they are again weighted after being added to the new fitted value. * mantel.correlog: changes the Sturges rule to conform with the standard R nclass.Sturges ('ceiling' instead of 'round'). Extends and corrects documentation and messages. Version 1.18-4 (closed May 21, 2010) * envfit: defaults now to 999 permutations. Used to be 0 or no permutations. * metaMDS: can handle NA values in dissimilarities (but I do not know if isoMDS can handle them correctly). * mantel.correlog: accepts now user supplied breakpoints or number of classes like intended. * RsquareAdj.rda: uses now correct model df in rank deficit RDA models. * adonis: implemented tie handling in permutations. * predict.cca/rda: implemented 'newdata' for type = "response". For CCA, 'newdata' must be constraints (environmental data), and for CA they must be community data. Test version, not yet documented (except here). Version 1.18-3 (closed April 15, 2010) * new version opened with the release of vegan 1.17-2 (March 8, 2010). * DESCRIPTION: Corrected the name of Bob O'Hara (also in release 1.17-2). * scores.cca/scores.rda: scores will always have names even if the input data have no names. This fixes some display issues that Pierre Legendre had with biplot.rda(), and makes redundant the name checking code in summary.cca (the redundant code was not yet removed, but I see that this fix here was sound). * permutest.cca: re-weighting of permuted CCA data matrix is now done with compiled code using existing C function 'wcentre' (in goffactor.c). This may give huge speed-up (>50% time save in first tests) both in CCA and pCCA. The print function of permutest puts now the observed statistic among permutations (the P-value is only evaluated at printing so that this does not influence any anova.cca function using permutest.cca). Version 1.18-2 (closed March 8, 2010) * ordistep: documented the 'anova' component added to the result object. * densityplot.oecosimu: gives no warning if there is only one statistic and hence only one panel. * nesteddisc: failed if highest species frequencies were tied. The error message was "Error: dims [prodcut 15] do not match the length of object [0]". Found by Eric Fuchs in the help forum of vegan.r-forge.r-project.org. The function does not try as hard to optimize the index, and hence it is much faster (but slacker). * screeplot: New argument 'legend' for all methods (except 'decorana') to draw a legend if the observed and broken stick distribution are both plotted. Now also respects 'pch' for the broken stick line. * permutest.betadisper: print method got ordering of permutation p-values wrong in displaying the matrix of pairwise tests. The computed values were correct. The formatting for printing contained the bug. Reported by Dan O'Shea. Version 1.18-1 (closed February 18, 2010) * closed with the release of vegan 1.17-1. The release contains bug fixes and multipart of 1.18-1, but excludes MOStest and 1.18-1 upgrades to ordistep. * ordistep: saves model changes in the 'anova' item similarly as standard step(). Experimental feature: not yet documented. * envfit: did not pass weights to factorfit or to vectorfit when the environmental variable was a single vector. Reported for vectors by Richard Telford. Broken in rev1004 (Sep 12, 2009). * CCorA: Fixed bug in presentation of variables in plots. Adds new biplot types. General improvement in checking exceptional cases improve stability. * predict.cca, predict.rda: match 'newdata' by row names or column names in type = "wa" and type = "sp". This is similar as predict.prcomp/princomp. Gained choice type = "working" for working residuals (as fitted.cca/rda). * simulate.rda, simulate.cca: gained argument rank passed to predict.rda() or predict.rda(). This also allows simulation under null model by setting rank = 0. * permatfull.Rd: fixed braces in the help file + mark-up. Version 1.18-0 (closed January 11, 2010 with release 1.17-0) * Documented na.action in cca.object. * Opened concurrently with copying 1.16-34 (at rev 1087) to branches/1.17 for a new release. * betadisper: 'type = "median"' is now the default type of analysis. * fieller.MOStest: removed erroneous multiplication of variances by overdispersion, because this was already done in cov.scaled, and therefore was doubled and gave much too wide (up to Infinite) limits. * MOStest uses now ANODEV of free model and model where the hump/pit is forced to a given location instead of the test based on the Wald statistic (coefficient/sd) of the coefficient of the linear term. The ANODEV and Wald statistic are equivalent in Gaussian models, but in with other error families the ANODEV is more correct. This fix removes the conflict between the basic MOStest() and its profile() and confint() methods in non-Gaussian families. Version 1.16-34 (closed January 2, 2009) -- (codename: Lucia) * twostagechao: deleted, because question regarding the notation in the original article remained unanswered. * permat* cleanup: permat.control deleted, not needed any longer due to changes in oecosimu, documentation for plot.permat merged with permat* help page. * goodness.cca: was not using correct weights. Broken in r992 (Sep 6, 2009). * vegdist: added UI for the alternative Gower index ("altGower") that skips double zeros. The C code has been in vegan since Oct 24 (r1051), but no R interface. Together with decostand(..., "log") of r1052 this closes Feature Request #473 submitted by Etienne Laliberte in R-Forge. * anova.cca: tied values could be randomly broken due to numerical precision, and this gave false P-values, for instance in anova(cca(dune ~ Management, dune.env), strata=dune.env$Management). Now rounds statistics to 12 decimal places in permutest.cca and in anova.ccabyterm. * permutest.cca: uses pasteCall() in print. * betadisper: added spatial median code written by Jari to betadisper. All associated methods work OK, and this should be the default method but needs a little checking first. This requires the new function 'ordimedian', which is currently undocumented in ?betadisper. Version 1.16-33 (closed December 13, 2009) * DESCRIPTION: Guillaume Blanchet added to the Authors. * spandepth: New function to find the depths of nodes in a spanning tree from spantree() function. Per request of W. E. Sharp. * bstick: refuses to analyse capscale() models with imaginary components because I have no idea how to do it. Reported by Richard Telford, Bergen (who probably wanted another solution...). * predict.rda: works now with rank = 0 -- returns matrix of column means. (Not yet done for predict.cca.) * simulate.rda: can now add permuted residuals to the fitted values. Experimental, low level interface that requires giving the index of right length. The permutation index can contain duplicates such as from sample(nrow(data), replace = TRUE) so that bootstrapping is possible unlike in anova.cca/permutest.cca. Works now with partial model: adds partial fit to the constrained fit. * simulate.cca: implemented by cloning simulate.rda. Function works with internal Chi-square standardized form and back-transforms the result by marginal totals and matrix grand total at the end. The marginal totals may still be negative. Not explicitly documented, and needs a connoisseur user. Version 1.16-32 (closed November 13, 2009) * alias.cca: gained argument 'names.only' (defaults FALSE) to only return the names of the aliased variables insted of their defining equations. * rarefy: failed with one site and many sample sizes like rarefy(rpois(10, 2), sample=2:3). * msoplot: uses standard legend() to display info instead of hand crafted positioning of the legend information. * ordisurf: plotting main title was broken with NA handling in 1.16-31 (r1049). Also increased grid density and adjusted pushing out limits of convex hull. * pcnm: new function for PCNM (Principal Coordinates of Neighbourhood Matrix) with option for row weighs allowing PCNM for cca. Based on Stéphane Dray's PCNM function in his (unreleased) SpacemakeR package. Imported with history from sedarVegan in http://sedar.r-forge.r-project.org/. Has scores.pcnm to select all (default) or some vectors of 'choice'. * decostand: implemented Marti Anderson's log scaling of type log(x, base = logbase) + 1 as a part of Feature Request #473. The coding follows closely Etienne Laliberte's suggestion, and also handles non-negative non-integer data. * vegdist: C code for an alternative version of Gower Index that skips double zeros. No R level interface yet. If this function is to be used from vegdist.R, it should be added as item 14 in 'method' list, and the R level preprocessing should be done similarly as for "gower" (method choice 6). This was implemented for inspecting the implementation of second part of Feature Request #473, but may be removed if that part of the request is not implemented. Version 1.16-31 (closed October 24, 2009) * ordisurf: removes observation with NA in scores (as result of na.action) or in predicted variable. * specaccum: "accumulations" in one-site collections are handled with a message() instead of stop()ping with error. Per request of Roeland Kindt. * constrained ordination (cca, rda, capscale) could not handle all anova(.., by= "something") cases when the data were not defined by data=, but were in the working environment or given using with(). The attach'ed data frames that were later detach'ed won't work. This means some potentially unstabilizing changes in scope: please report all problems. * envfit: could drop data frame to a vector with na.action (broken in 1.16-28). * model.frame.cca, model.matrix.cca: new support functions to reconstitute the model frame and model matrix (or a list of condition and constrain model matrices) from a cca/rda/capscale result object. Documented separately. * constrained ordination (cca, rda, capscale) did not analyse constrained component in model like cca(varespec ~ Al:P + Condition(Al + P)) or in constrained interaction terms if the corresponding main effects were partialled out. * constrained ordination (cca, rda, capscale) failed if they only had partial term Condition() without constraints. * ordistep: new function for automatic model choice in the cca family of methods. This is similar to step(), but uses permutation P-values instead of AIC (that does not exist for these methods, and sometimes fails). This is similar to forward.sel() in Stephane Dray's 'packfor' package at R-Forge. Better things here are that the function has both drop and add instead of only forward selection, handles correctly factors, and works with cca(), rda() and capscale(). On the other hand, it is much slower than forward.sel(). The function has similar user interface as step(): it knows 'scope' and 'direction'. * ordisurf: pushes out limits of convex hull so that contours better cover corners and margins of points. * plot.decorana & plot.cca: use linestack() if only one dimension was chosen. * scores.lda: new function to extract row scores and predictor coefficients from "lda" objects (MASS package). Magically, ordiplot() started to work with "lda" results. Not yet documented, but alias in scores.default.Rd. * ordiplot: uses linestack() to plot 1-col results, and now really is able to identify if there were no species scores (tried earlier, but failed because species had different names than sites). * scores.default: returns vector scores as 1-col matrix. * linestack: passes "..." to plot(), handles missing names. Version 1.16-30 (closed October 3, 2009) * manual pages (Rd files) were run through aspell. With this, an error in an argument choice was corrected also in plot.nestedtemp function. * meandist: plot method has a new alternative of drawing histograms (van Sickle 1997) as an alternative to dendrograms. A histogram connects groups at theri within-cluster dissimilarity level to the average between-cluster dissimilarity. * oecosimu: gained new keyword 'alternative' for "two.sided", "less" and "greater" one-sided tests. * oecosimu: tied values in simulations and observed statistics treated more correctly. * oecosimu: if all simulations were constant, their sd became zero, and z became NaN. Now z = 0 for these cases. A response to the query of Martin Kopecky at the vegan-help forum in R-Forge. * densitplot.oecosimu: panels keep the order of statistics. The panels were ordered alphabetically, but the vertical line for the observed statistic was in the original order (and thus often in the wrong panel). * calibrate: is now a a generic function and has a new method for the 'ordisurf' object in addition to the old 'cca' method. * FIXED BUG in cca, rda & capscale interpretation of formulae. This was introduced in rev 972 (Sep 1, 2009), and fixed in rev 1011 (Sep 18, 2009). Basically, all evaluation of 'subset' and 'na.action' is done after extracting the model frames with proven methods so that the first half of 'ordiParseFormula' is more similar to pre-972 versions. Function 'ordiParseFormula' could be re-written more elegantly, but deliberately breaking it twice instead of breaking it once is just too much. * cca/rda/capscale: cca(dune ~ poly(A1, 2), dune.env) failed. Internal changes in 'ordiTerminfo' which now always looks at the model frame returned by 'ordiParseFormula' instead of looking at the 'data' (and the 'data' arg is now unused in 'ordiTerminfo'). * FIXED (minor): cca(dune ~ Management, dune.env, subset = Management == "SF") failed in 'contrasts()' called from 'model.matrix()' because there is only one level in Management. Now 'ordiParseFormula' adds a level with an unlikely name of .ThisVarHasOnly1Level, so that model.matrix works, but predict.cca(..., newdata=, type = "lc") rejects unknown factor levels. Version 1.16-29 (closed September 18, 2009) * meandist: plot got an 'ylim' argument. This is practical when users want to display several plots side by side, and requested by Heli Suurkuukka. * WARNING OF A BUG in cca, rda & capscale: all versions have failed since rev 972 (Sep 1, 2009) if an argument in a model was a matrix. Now these things work so that tests pass, but results are wrong , because get_all_vars() does not get names right for matrix columns in the model frame. This is manifest in the example of varpart() that uses matrix items (such as mite.pcnm). It can be also seen with this: p <- poly(dune.env$A1, 3) cca(dune ~ p + Management, dune.env) The following seems to work: cca(dune ~ poly(A1, 3) + Management, dune.env) * cca, rda etc. drop unused levels of factors. This became actual with 'subset' and 'na.action'. * cca & rda (but not (yet?) capscale) gained argument 'subset' to select rows for analysis. A 'subset' can be a logical vector (TRUE for kept rows), or a logical expression which can contain variables in 'data' or species (variable) names of the dependent data. Some valid examples are: cca(dune ~ A1 + Moisture, dune.env, subset = Management %in% c("HF","BF")) cca(dune ~ Moisture, dune.env, subset = Lolper > 0 & Management != "SF") S <- specnumber(dune) cca(dune ~ 1, subset = S > 9) Version 1.16-28 (closed September 15, 2009) * drop1.cca: 'scope' given as a formula was not recognized and permutation tests were not run. Only character vectors of names worked. * envfit: handles missing values in ordination scores or in environmental variables using na.rm argument. This also changes the user interface so that 'vectorfit' and 'factorfit' clearly become low level functions which only accept scores (no ordination objects), and all processing is done in envfit.default. * wcmdscale: scores (points) with zero weights (w = 0) and other non-finite entries will be NA. * capscale: implemented na.action. The WA scores are always NA for missing observations in capscale. Version 1.16-27 (closed September 10, 2009) * cca & print.cca: no warning on removed species in cca.default, but print information on their number. * predict.rda: failed when rda was based on correlations (scale = TRUE), and there were missing data (0/0 division in scaling). * cca & rda: New way of handling na.action. Function ordiNAexclude adds items CCA$wa.excluded or CA$u.excluded for NA rows into ordination result, and function ordiNApredict called in scores.cca and scores.rda pads the results with these excluded data. In this way the internal structure of the cca object remains unchanged, but functions accessing the result with scores will get the NA data. * anova.cca(..., by = "term") and step() did not work correctly with na.exclude or na.omit. These fitted sequential models, and due to missing value removal the data set could change in the sequence. The problem case was step() which relies on standard stats functions add1.default and drop1.default. They detect the change in data by length(object$residuals). Therefore ordiNAexclude adds item 'residuals.zombie' to the ordination result so that step() works. The same mechanism is also used in anova.ccabyterm (not all NA deletions change the numbers of observations). * weights.cca and weights.rda know na.action. * Fixing cca/rda functions for changes in weights(). The rule is that you can mix scores() and weights(), but if you have internal cca object stuctures (like x$CCA$u), you should have internal weights x$rowsum. Concerns as.mlm.cca, goodness.cca, permutest.cca, spenvcor, inertcomp and intersetcor. (The inertcomp solution is a kluge.) * plot.cca: works when there are NA values in scores. * anova.cca(.., by = "axis") works when there are omitted or excluded observations due to missing values. Version 1.16-26 (closed September 1, 2009) * cca and rda: can now handle missing values in constraints or conditions. With 'na.action = na.omit', the rows with missing values are removed, and with 'na.action = na.exclude' all rows are retained but results that cannot be computed are NA. The LC scores cannot be computed with missing values, but WA scores (usually) can be computed. The results with 'na.exclude' probably fail with most support functions because these do not expect missing values in the results. These functions are fixed with time. capscale does not (yet) handle missing data. * oecosimu: does not depend on permatfull/permatswap, but method can be a function. The r2dtable method implemented also to be used with adipart and related functions. * bioenv: uses standard R function combn() and removes ripley.subs() and ripley.subsets() from vegan. The result should be unchanged. * ordiNAexclude: internal infrastructure to implement na.action = na.exclude for cca and rda (and capscale?). The option returns scores where the excluded sites get NA results and are not omitted. In constrained ordination, LC scores will be NA, but WA scores are found from the community data, and the current function uses predict.cca/predict.rda with 'newdata' of removed observations to estimate WA scores of excluded observation. * ordiParseFormula: handles missing values with na.action. Version 1.16-25 (closed August 31, 2009) * mantel.correlog: updated to the version 1.4 of Pierre Legendre's package. * RsquareAdj: documented. * ordiellipse & ordihull: argument 'draw' got a new alternative "none". With this, nothing is drawn but the invisible plotting structure is returned. This was added so that it is easier to develop permutation tests for hulls and ellipses. Version 1.16-24 (opened August 17, 2009) * ordiellipse & ordihull: gained new argument 'label' to put the name of the group in the centre of the ellipse or the hull. The functions now return invisibly data on their plots for each plotted item: ordiellipse() the covariance matrix (cov.wt() result), and ordihull() the coordinates of the hull vertices. These inivisible results have a summary() method that displays the centres of the hulls or ellipses and their surface areas. * ordiellipse: does not depend on the 'ellipse' package, but finds the coordinates of ellipse using the equation taken from the 'car' package. However, this devel version of 'vegan' still must SUGGEST 'ellipse', because 'plot.MOStest' requires 'ellipse'. The current release version does not include 'plot.MOStest' and could be liberated from the 'ellipse' dependence. * spantree: first argument 'd' like in hclust()instead of 'dis'. Got a 'call' item so that update() works. * treedive & treeheight: accept 'spantree' objects. EXPERIMENTAL CHANGE THAT MAY BE CANCELLED. * treedist: average distance of species trees for two sites. Generalization of treedive(): builds a species tree of two sites and sees how much of the tree is shared between two sites, and how much is unique to the combination. The measure is similar to Jaccard index: the proportion of unique (unshared) tree of the combined tree. In principle, this is similar to UniFrac metric (C. Lozupone & R. Knight, Appl. Environ. Microbiol. 71:8225-8235; 2005), but numerically and computationally different (and the current implementation may specify a new unpublished method). AN EXPERIMENTAL CHANGE THAT MAY BE CANCELLED. Version 1.16-23 (closed August 17, 2009) * poolaccum: new function to find the extrapolated richness values (or specpool() estimates) for random accumulation of sites (with summary and plot methods). * specaccum, specpool, specpool2vect and friends: index names are now all lower-case. * estaccumR: new function similar to 'poolaccum', but uses 'estimateR' for individual (count) based estimates of extrapolated richness. Inherits from 'poolaccum' and shares its print, summary and plot methods. Version 1.16-22 (closed August 11, 2009) * metaMDS: accepts now user supplied dissimilarities either as a "dist" structure or as symmetric square matrix (Susan Letcher's wish). As a side effect, dissimilarity matrices are now correctly detected and will not be wrongly treated as raw data. * summary.cca: fix in 1.16-20 failed if all variables were continuous and there were no centroids of factor levels. * indpower: new function to calculate indicator power for a species (Halme et al. 2009, Cons. Biol. 23: 1008-1016) * mantel.correlog, print.mantel.correlog & plot.mantel.correlog: new functions to construct multivariate mantel correlograms --- use in ecology: to describe the spatial structure of species assemblages. See Legendre and Legendre, Numerical ecology; 1998, section 13.1.5. Written by Pierre Legendre. Version 1.16-21 (opened July 4, 2009) * capscale: has now 'fitted' method (and hence, 'residuals'), and 'predict' works with 'type = "response"'. These give dissimilarities that produce same ordination as original data, or their low-rank approximations. Function 'fitted' has 'model = "Imaginary"' that returns correction distances of complex eigenvectors with negative eigenvalues. The dissimilarities are not additive, and the "Imaginary" component is not used in estimating the unconstrained component. * capscale: really works now either with argument 'dfun' or 'metaMDSdist' (but not with both!). * wcmdscale: returns negative eigevalues scaled by sqrt(abs(eigenvalues)) if 'k' is not given or 'k' would include any negative eigenvalue. Version 1.16-20 (closed July 4, 2009) * new version opened concurrently with the release of vegan 1.15-3 on June 17, 2009. * orditorp: works now when axes are reversed like xlim = c(1,-1). * rrarefy: a new function to generate randomly rarefied communities. * betadisper: fix bug in removal of (effectively) zero Eigenvalues. * summary.cca: takes care that all scores have rownames -- head/tail fail without names. No ugly printing for constrained eigenvalues when these do not exist in unconstrained models. * biplot.rda: honour args to scores ('scaling', 'const'). * points/text for cca: accept 'const' argument for rda scores. * ordilabel: no superfluous warnigns when args ('scaling', 'const') are given to scores. * ordiplot3d: honour args to scores ('scaling', 'const') and without warnings. * ordixyplot: honour ags to scores ('scaling', 'const'). * spantree: plot honours args to scores ('scaling', 'const'). Version 1.16-19 (closed June 17, 2009) * capscale: handles now negative eigenvalues with semimetric indices. These cause no more warnings. The MDS engine is now 'wcmdscale' instead of 'cmdscale' unless 'add = TRUE' was specified (and then negative eigenvalues are not produced). The negative eigenvalues are listed after positive unconstrained eigenvalues, but no scores are given for them. The total inertia is now the sum of all eigenvalues, including the negative ones, and inertia components adds item 'Imaginary' for negative eigenvalues after 'Uncostrained'. New argument 'sqrt.dist' makes square root transformation of dissimilarities, producing metric indices in many cases (e.g., Bray-Curtis, Jaccard). Help page and examples now show all these, and therefore the entry on negative eigenvalues was dropped from FAQ-vegan.texi. The closed (max 1) indices are now correctly adjusted for 'rda' and hence the eigenvalues and inertia components are now sqrt(n-1) smaller and similar as in 'cmdscale' and 'wcmdscale'. * wcmdscale: remove zero eigenvalues, keep negative, and do not assume that the last eigenvalue is zero. * RsquareAdj: 'cca' returns R2, but no adjusted R2 (which is NA). The adjusted R2 is always NA for partial models. * kendall.global: fixed a bug that caused incorrect counts of ties in large data sets. * tsallis: division by zero occurred with hill=TRUE, scale=1, this bug has been fixes to give exp(x) as scales goes to 1. * multipart: a sequel to adipart, but implements multiplicative diversity partitioning based on Hill numbers (Jost 2007, Ecology, 88, 2427-2439.) * eigenvals: new function to extract eigenvalues of cca, rda, capscale (constrained & unconstrained), wcmdscale, prcomp, princomp, eigen and svd. For svd returns squares of singular values, and for prcomp and princomp squares of 'sdev'. The 'summary' of eigenvals() retrurn eigenvalues with the proportion explained and cumulatitive proportion explained. * summary.cca: uses summary.eigenvals to display eigenvalues. * protest: observed value of test statistic is now considered as one of the permutations. Default N.perm decreased to 999 to account for this. * envfit (vectorfit, factorfit): observed value of test statistic is now considered as one of the permutations. * mantel, mantel.partial: observed value of test statistic is now considered as one of the permutations. * anosim: observed value of test statistic is now considered as one of the permutatons. * mrpp: argument defaults and printing adated for having test statistic among permutations (like the function always had). Version 1.16-18 (closed May 14, 2009) * tsallis: got new argument 'hill' similar to that of renyi. * twostagechao: function that calculates multiple-community similarity based on Chao et al. 2008 (Biometrics 64, 1178-86). Some debugging is needed since it cannot reproduce the numbers in Table 3 exactly (lower estimates and SEs). The Rd file also needs more details. * anova.cca: there was a name clash and failure in anova.ccabymargin, anova.ccabyaxis and anova.ccabyterm if data were indexed with 'i' in the fitted model. Now the internal indexing uses less likely name (.ITRM) to avoid name clashes. * orditkplot: copes with missing or NaN scores (omits them). * ordixyplot: failed in constrained ordination (cca, rda, capscale). Was broken in rev108 on Nov 7, 2007(!). The biplot was rotated 90 degrees: it seems that lattice calls x y and y x. * ordixyplot & ordisplom: Gained a new type = "arrows" that is a Lattice version of ordiarrows. * RsquareAdj: defined as generic function. The old RsquareAdj is now the "default" method, and there are specific methods for "rda", "cca" (= NA), "lm" and "glm" objects. Not yet documented, but functions are listed as aliases in varpart.Rd. On Pierre Legendre's request. Version 1.16-17 (closed April 15, 2009) * closed concurrently with the release of vegan 1.15-2. * spantree.Rd: example plots use type = "t" to demonstrate the use of ordilabel(). * nestedtemp: docs tell that Carsten Dormann's bipartite package has a direct port of BINMATNEST programme of Rodriquez-Girones & Santamaria. * anosim: uses much less memory allowing analysis of larger problems (number of rows, number of iterations). The change concerns only internal data structures, and the permutation results should be identical with old and new code when the same random number seed is used. The Rd file got an example of using 'strata' in permutations. * meandist: a new sister function for mrpp. Function meandist calculates a matrix of mean within and between group dissimilarities. Its summary function returns the overall averages of those distances, and all three variants of MRPP A statistic, and classification strength. The plot method draws a dendrogram based on the mean dissimilarity matrix, with leaves hanging to within-group dissimilarity. * betadisper: Fix bug corrects the way distance to centroid is computed when only one group is present in the data. betadisper can now also detect if 'd' is Euclidean, zapping zero Eigenvalues. Bug report and suggested improvements provided by Etienne Laliberté. betadisper now also handles missing observations in either the dissimilarity matrix or the grouping variable. * decostand: added dots to the argument list to pass (ignored) arguments to decostand(). This was done to to fix stressplot(metaMDS(x, dist="gower", trymax=40)), which failed because metaMDSdist/vegdist were passing 'trymax' to decostand() while evaluating "gower" dissimilarity. * ordisurf: will fit a linear trend surface if knots = 0 or knots = 1, and a quadratic trend surface if knots = 2. All these are below the lowest permissible values of 'gam' smoothers and free for creative reuse. Version 1.16-16 (closed April 2, 2009) * metaMDS: scales ordination scores to the same range as input dissimilarities if halfchange = FALSE. Better heuristics to decide whether to use halfchange scaling: the old heuristics failed if Euclidean or other open-ended dissimilarities were small (max < 1), like after wisconsin() in metaMDSdist. The heuristics are now in postMDS instead of metaMDS wrapper, and this changed the default of internal argument 'halfchage' in postMDS, and now the user can set the 'halfchange' argument in metaMDS. The undocumented internal 'maxdis' argument is changed to logical in metaMDSdist (TRUE if maximum dissimilarity = 1 for a pair of sites with nothin shared). * mrpp: reports now "classification strength" when weight.type = 3 or weights n*(n-1) are used. Returns mean dissimilarities and counts for classes. Expected delta is now the mean of original dissimilarities instead of mean of permutation deltas. Version 1.16-15 (closed Mar 25, 2009) * envfit help page: explains the automatic scaling and 'arrow.mul' argument. * add1/drop1 help: better example after a query of usage in R mailing list. * oecosimu & permatswap: much faster 'burnin' implemented through 'thin', and hence using a single C loop instead of multiple calls and assignments to an R object. * as.mcmc.permat: provides same functionality for permat objects as as.mcmc.oecosimu for oecosimu objects. * permatswap: same default values of 'burnin' and 'thin' (0 and 1, respectively) are set for permatswap and oecosimu functions. Previous defaults for permatswap were in conflict with oecosimu when called by permat.control. * hiersimu: new function to evaluate a statistic value at different levels of a nested hierarchical sampling design. Based on oecosimu and null model testing, but with evaluation process similar to adipart. * metaMDS: automatic stepacross works with Euclidean, Manhattan and other distances with no fixed upper limit. However, this may be meaningless, and a warning is issued. Fixed after a query to R-sig-ecology by Manuel Spinola. Version 1.16-14 (closed Mar 10, 2009) * as.mcmc.oecosimu: a new function to translate sequential null models to "mcmc" object of the coda package. The coda package provides a wealthy source of the analysis of things like stationarity, adequate sample size, autocorrelation, length of needed burnin-in etc. * density and densityplot: new methods for "oecosimu" objects. * as.ts.oecosimu: new function for applying time series methods for sequential null models ("swap", "tswap", "abuswap"). * metaMDSrotate: a new function to rotate metaMDS configuration so that the first axis is parallel with a continuous site variable. * as.ts.permat: extracts summary statistics from 'permat' objects as time series, to use for time series diagnostics. * permatswap: two new methods (under "abuswap") added based on the paper of Hardy 2008 (J Ecol 96, 914-926). These preserve row *and* colunm occurrences, and row *or* column sums at the same time. Thus these complement the methods available in vegan. Uses C code (not thoroughly tested yet). Needs some more work, and documentation (examples and reference in Rd file). Version 1.16-13 (closed Feb 24, 2009) * anova.cca: documented the 'cutoff' argument for by = "axis". * text.procrustes: added text() function for procrustes() result plots. * rad.null: failed with family = gaussian and Gamma. * simulate.rda: new method to simulate responses with random error for an rda() result object. The function uses Normal error, and estimates the sd separately for each species from their rda residuals. Normal error is justified by least squares fitting in rda. This could be made to use permutations of residuals. Not yet implemented for cca or capscale results. For cca we -- at least -- need to handle weights, and the capscale result would be rda result, since the method cannot be directly implemented for dissimilarities. The function was triggered by Ben Bolker's email to R-devel mainling list https://stat.ethz.ch/pipermail/r-devel/2009-February/052116.html Version 1.16-12 (closed Feb 15, 2009) * anova.ccabyaxis: gained keyword 'cutoff' (defaults 1) to break from permutation tests after exceeding the P-value given in the argument. The keyword was introduced because rda and cca are occasionally used with a huge number of constraints (like PCNM vectors) where tests take a very long time, although only a couple of first axes are significant. The keyword is still undocumented, and will remain so because this change is still experimental. * contribdiv: new functions for contribution diversity as an alternative to simple additive diversity following Lu, Wagner & Chen, Basic and Applied Ecology 8, 1-12 (2007). Version 1.16-11 (closed Feb 9, 2009) * anova.cca: used different random number sequence for the second term with by = "margin". * ordirgl & orgltext: removed work arounds for very old versions (pre-0.65) of the rgl package. Version 1.16-10 (closed Jan 28, 2009) * commsimulator: failed if input data (x) were a data.frame. * metaMDS: really do not evaluate no.shared() if set noshare=0. Triggered by a problem report with missing data. * vegdist doc: Morisita and Horn-Morisita were given as similarities in the help. * ordirgl: fixed wrong warnings in ordirgl(..., type="t"). * kendall.post, kendall.global: knows now all P value adjustment methods of 'p.adjust()' plus "sidak". Version 1.16-9 (closed Jan 20, 2009) * kendall.post: added one line that was accidentally lost in editing. * Checked with R version 2.9.0 Under development (unstable) (2009-01-13 r47593) having experimental strict Rd parser, and corrected the reported problems in Rd files so that vegan is R 2.9.0-ready. * adonis: uses now canonical (hits+1)/(tries+1) for P-values instead of hits/tries. Default number of permutations increased from 5 to 999. Added terms component so that things like update() and drop.scope() magically started to work. Renamed design.matrix into model.matrix (and documented the item). * permatswap: new algorithm "swsh" is added to keep row/column incidences (but not sums) constant. The name refers to the two steps: (1) binary *sw*aps are made then (2) individuals in non-zero cells are *sh*uffled. * permat methods: calculations of the Chi-squared statistic is added to summary, and the type argument can be used in the plot "bray" or "chisq" values. * nestednodf: gained argument 'order = TRUE' allowing tests for other orderings than using marginal frequencies (default) following suggestion by Almeida-Neto et al. (2008). * summary.cca: cumulative "accounted for" statistics failed in unconstrained models. Version 1.16-8 (closed Jan 7, 2009) * Fixed unescaped $-signs in documentation files after Ripley told to do so ("[Rd] Misuse of $$ in Rd files", https://stat.ethz.ch/pipermail/r-devel/2008-December/051634.html) * kendall.global & kendall.post: new functions to analyse the Kendall's coefficient of concordance --- use in ecology: to identify significant species associations. See P. Legendre, J. Agric. Biol. Envir. Statistics 10, 226-245; 2005. Written by Guillaume Blanchet and Pierre Legendre. * nestedness: added nestedness index based on overlap and decreasing fill (Almeida-Neto et al., Oikos 117, 1227-1239; 2008). Not yet all properties of the Oikos paper are implemented, and the UI needs work (print, plot methods). Coding by Gustavo Carvalho as a part of R-Forge Feature Request #265. Documented with nestedtemp. Version 1.16-7 (closed Dec 17, 2008) * permat*: functions were rationalised, strata argument is used instead of reg and hab, and returned object got several new arguments. The tide of changes affected methods as well, and some other function (adipart, oecosimu). Stratification was tested and corrected. Version 1.16-6 (closed Dec 7, 2008) * adipart: got a formula interface, and aggregate() was replaced by matrix multiplication. Now it is 10 times faster. The formula interface has some consequences on the specification of the sampling design. * permatfull: Jari Oksanen made the C port for the quantitative quasiswap algorithm. So the permat* null model family now can be used for a wide array of null model analyses and is quick enough to make reliable testing. The permatswap function and help page were modified accordingly. * plot.rad: gained argument log = "y", allowing log = "xy" so that Zipf model is a straight line, or log = "" with arithmetic scales. Not (yet) implemented for Lattice alternatives. Version 1.16-5 (closeed Dec 4, 2008) * adipart: new implementation of adipart is now ready to be released (needs some testing). Summary and plot methods have been removed. The new implementation is based on oecosimu and quantitative null model settings via permat.control. It contains only traditional diversity indices. More features will be added later, gradually. * plot.nestedtemp: label argument accepts a vector of length 2 with elements for row and column labels, respectively. * mite.rda: Oribatid mites got species names (from Pierre Legendre's web pages). * text.decorana: failed (bug introduced in rev344, on May 9, 2008). * commsimulator: simulated null models have same column and row names as the original input (as.)matrix. There was a problem report by a user who tried to use column names during evaluation of the statistic. Done by setting attributes (and it would be possible to replace dim() setting by attributes() setting in the code). * ordisurf: gains argument 'bubble' to use bubble plots for points, and 'cex' to set the symbol size (or the maximum size with 'bubble = TRUE'). Version 1.16-4 (closed November 25, 2008) * oecosimu: got a new control argument for quantitative null model analyses; this is available if method = "permat". The print method and help file modified accordingly. * vignettes: Figures with narrower margins. Vignette "diversity-vegan" adds functional diversity ('treedive'), 'beals' and 'radfit' graphics updated to current vegan. Still missing pieces: nestedness & null models, quantitative null models, additive diversity partioninng, Tsallis entropy. * radlattice: a new function to display each radfit model in a separate panel together with their AIC or BIC values. * plot.cca: takes care that plotted items have non-NULL names that plot neatly. This was already take care of with formula interface, but now it should work also in other cases in plots. Reported by Daniel Borcard. * permatwsap: quasiswap method is implemented for count data based on the idea of Carsten Dormann in the bipartite::swap.web function. This takes a random matrix first with same row and column sums as the original (via r2dtable), and then restores the original matrix fill through steps of swapping 2x2 submatrices. The current R code is slow. * permatfull: when both cells and individuals are shuffled, the matrix fill remains constant. * nesteddisc: replaced with a new function that orders tied columns to minimize the discrepancy statistic. If there are <=7 tied columns, all upto 5040 permutations are inspected, and if there are >7 tied columns, 5000 random permutations are inspected. The ties are inspected only if they could change order of columns within range of row sums (species richness). A warning with results is only printed if there were >7 tied columns that could influence the statistic, because in other cases the search for solution was exhaustive. The new function may be slow, and a more clever solution should be found (or nesteddisc dropped from vegan). With this code, the discrepancy statistic of the 'sipoo' data is 50 (cf. notes on 1.16-3) instead of the original 55. * betadisper: now works for cases where there is only a single group. 'scores', 'plot' and 'boxplot' methods updated to work in such cases. 'anova' and 'permutest' methods stop with an error if used for such cases as they implement tests that do not make sense for a single group. Version 1.16-3 (closed November 1, 2008) * spantree: saves labels of points, and 'cophenetic' and 'plot' use these labels. Function 'plot' uses 'ordilabel' for text labels. * orditkplot: added option to copy the current graph to a TIFF file. The capabilities("tiff") check was added in R-2.8.0, but the test works in R < 2.8.0 as well. * nesteddisc: Carsten Dormann (UFZ, Leipzig, Germany) turned my attention to the sensitivity of discrepancy to ties in column frequencies. These are not handled by any way (yet), but the users are warned now about ties. For instance, the example matrix 'A' on page 259 of Brualdi & Sanderson (Oecologia 119, 256-264; 1999) can be ordered to give discrepancy value = 2 instead of value = 3 reported in the paper with a different ordering of columns. Different random reorderings of species in the 'sipoo' data in vegan can give discrepancy values 51 to 58 (and the original arbitrary ordering gives 55). This means that discrepancy values are not very reliable, but ties should be handled better or the function withdrawn from vegan. * ordisurf: returns x, y and z used by contour() following a query "[R-sig-eco] output from ordisurf" on Oct 23, 2008. Version 1.16-2 (closed October 27, 2008) --- for Annukka * beals: replaced old beals.R with the new code by Miquel de Caceres with new methods described in De Caceres & Legendre (Oecologia 156, 657-669; 2008). This also implements the cross-validatory Beals of Munzbergova & Herben (Oikos 104, 408-414; 2004) plus many new options of unbiasing estimates. * permatfull: bug of row/col margins is fixed, shuffle argument is added to enable individual and sample based randomisation of count data (or both) when not all the margins are fixed. * anosim: API and documentation made similar to mrpp to combine their documentation. Now anosim can take data frame input and find the dissimilarities internally. Version 1.16-1 (closed October 10, 2008) * dispindmorisita: function to calculate Morisita's index of dispersion, and its standardized version. Uses the correct way of standardizing, see Note section in help. * radfit: Should work with empty sites (no species) or when the number of species is less or equal the number of parameters estimated (like may happen in sweeping analysis of data frames or simulations). Takes care that input data frames have row names which are necessary for displaying results. * head.summary.cca & tail.summary.cca: shortcuts to print(summary(x, ...), head, tail) for nicer Sweave tutorials. Version 1.16-0 (closed on September 30, 2008) * New devel version after branching the release version 1.15-0. Identical to the release version, but includes MOStest and adipart functions that were removed from 1.15-0. Version 1.14-12 (closed September 26, 2008) * add1.cca, drop1.cca: new functions that also implement permutation tests with argument test = "permutation", but only use default methods with test = "none". Function drop1.cca uses anova.cca(..., by = "margin"), and add1.cca implements a new type of analysis for single term additions. The immediate reason for implementing these tests was that I found out that step(..., test = "Chisq") worked(!) producing parametric likelihood ratio tests, and this hole had to be closed before users notice this. * anova.cca: improved treatment of models where constrained or unconstrained models are NULL so that permutation tests are impossible. These used to stop with error, but now they return a zeroed result so that things like anova(..., by = "term") and drop1() work. Added function anova.ccanull to handle these cases. * anova.cca(..., by = "margin") was handling wrongly 'x' in ~ Condition(x) + x + z, or model formulae where same variables were used both as Conditions and (aliased) constraints. * anova.cca(..., by = "margin") or function anova.ccabymargin gained a 'scope' argument which is used in drop.scope(). * orditkplot & ordipointlabel: improved interface allows passing font type from ordipointlabel to orditkplot. * copied to version 1.15-0 at rev506. Version 1.14-11 (closed September 10, 2008) * anova.cca/permutest.cca: default permutation model changed from "direct" to "reduced" after Pierre Legendre's simulation test demonstrated slightly better Type I error for "reduced" models in by = "axis" and other partial models. This is also consistent with CANOCO (but permutation of CCA residuals differs from CANOCO). For compatibility with old versions of vegan, you must set model = "direct" explicitly. * ordiplot: did not use partial match for "sites" and "species". Version 1.14-10 (closed September 5, 2008) * treedive: tries to match 'comm' and 'tree' names if forced (by an arg), or when sizes do not match. Output vector has names. Docs discuss estimating signifcance using oecosimu(). * oecosimu: accepts now a vector of statistics and plain statistics instead of the list item statistics, and the user can define the name of the statistic in the function call. This means that things like functional diversity (treedive) for sites can be analysed with approprite simulation model. * nestedtemp & oecosimu documentations split. * ordiParseFormula: formula of the partial terms has the same environment as the general formula. Cures some tricky issues when the partial term of cca/rda/capscale model is updated within a function. (The environment() drives me crazy, says J.O.) * ordiParseFormula gains new argument 'envdepth' to define the depth where the community data (dependent data) is evaluated. Most functions evaluate community data in the parent environment of the calling function, but capscale() creates new dependent data and needs evaluate the community within calling function. (The environment() drives me absolutely crazy, says J.O.) * specaccum: empty (all zeros) species removed from input data. These confused method = "exact" which gave sd = NA. * permutest.cca: tells whether the test was for all eigenvalues or for the first (this is implicit in anova.cca). * vegan-internal.Rd: brief documentation of internal functions for developers with some guidelines of good practices. Version 1.14-9 (closed August 20, 2008) * closed concurrently with the release of vegan 1.13-2: changes up to this version may have been there. * adipart: new function to perform additive diversity partitioning with corresponding S3 methods. * tsallis: new function to calculate Tsallis-entropy, a scalable diversity index family * treedive: new functions for estimating functional diversity defined as the height of a dendrogram of species properties for a site (Petchey & Gaston). Still very preliminary. * plot.procrustes: could fail if two solutions were *exactly* *exactly* identical (noticed by Peter Solymos with wcmdscale example). Version 1.14-8 (closed August 10, 2008) * wcmdscale: new function to perform metric scaling (a.k.a. principal coordinates analysis) with weights for points. * ordiArgAbsorber: now knows about 'choices' and 'display' args of scores(). Reported by Michael Denslow. * orditkplot: plotting text labels was broken in the default case. Zooming works again. Plotting character (pch) is now better centred on the canvas, and the code was simplified. Version 1.14-7 (closed July 30, 2008) * orditkplot: imitates now plotting character (argument pch). Zooming maintains graphical parameters (such as mar). Label selection shown by a rectangle, since label may already be red. Label family, size and font can be vectors. * permat.R, swapcount.R: summary method was modified according to standard R ways, ylab argument was deleted from plot method. The R version of swapcount was deleted and replaced by the C version. Help file was modified accordingly. * ordilabel: new function for cluttered ordination plots -- text is written on a non-transparent label. Similar to s.label() function in ade4. * ordipointlabel: new function for cluttered ordination plots -- points are in fixed positions, but their text label is located to avoid overlap. The optimization is based on optim(..., method = "SANN"). Similar to pointLabel function in maptools. Returns an "orditkplot" object, but orditkplot cannot yet completely handle this (and this feature is undocumented). * permutations: permuted.index2 and associated functions now allow for restricted permutations of strata (i.e. restricted shuffling of the blocks). This changes the acceptable 'type' options and adds a new argument 'permute.strata' to permControl(), to control how and what is permuted. Version 1.14-6 (closed July 5, 2008) * permatswap (nestedness.c): translated Peter Solymos's swapcount.R to C. This is still experimental code, and the user interface is undocumented, except here: use method = "Cswap" in permatswap. * permatswap: was not updating swap matrix but using the same starting matrix after burnin for every swap. * swapcount.R: was advancing 'thin' counter even when a swap was rejected so that fewer than requesed 'thins' were done. * permat.R, swapcount.R: genereal cleanup, most importantly replacing vector operators & and | with logical operators && and ||. * commsimulator: "quasiswap" written in C and *much* faster now. Times are for MacBook Intel 1.86 GHz and 100 matrices: "sipoo" from 7 min to 4 sec, "BCI" from 2+ hrs to 45 sec. Actually, quasiswap is now much faster than ordinary swap which also should be written in C. "Backtracking" is so much more complicated code that it could probably never reach "quasiswap" even if written in C, and it may be dropped in the future. * commsimulator: "swap" and "tswap" written in C, and clearly faster now. In MacBook, 100 swaps with "sipoo" went from 8 sec to 0.5 sec, and thinning hardly influenced timing (it used to thin-fold times). * oecosimu: takes care that original statistic is found from binary data. Version 1.14-5 (closed June 19, 2008) * scores.rda: scaling = 0 returns now unmodified scores from the object (like documented) without multiplying by the scaling constant. Gains argument 'const' for user-settable general scaling constant of the scores. The default 'const' is found internally to giv a biplot scaling so that species and site scores together approximate the original data. The value of 'const' is returned as an attribute of 'scores'. * summary.cca: prints the value of general scaling constant used in 'rda' or 'capscale'. * summary.cca: prints 'capscale' like 'rda' (used to have some 'cca' style output, like calling site scores "weighted averages" instead of "weigthed sums"). * permutest.cca: estimates now residual df as number-of-rows - rank-of-constraints-and-conditions - 1 so that df and pseudo-F are equal to those reported by lm() for single response variables in rda. anova(..., by = "ax") needs rethinking though: it only had one df. Because the test was based on permutation and order statistics the change of df does not change the significances: the observed pseudo-F and permuted pseudo-F's are influenced similarly by the change of df, and order statistic does not change. * varpart: long formulae were cut off in printoutwith a cryptic warning. Version 1.14-4 (closed June 12, 2008) * permatfull, permatswap and swapcount: functions to generate unrestricted and restricted null model community data matrices under diferent constraints (preserving row/columnsums, or incidence pattern), with print, plot and summary methods. (submitted by PS) * adonis: speed-up and doc updates. Version 1.14-3 (closed June 9, 2008) * rda.default, cca.default: vegan naively used only the rank of the ordination, but indeed, there are three cases of ranks: rank of the ordination or number of axes (returned as rank like before), rank of the constraints after conditions (now returned as qrank), rank of conditions + constraints (returned in QR$rank). When only 'rank' was used, vegan for instance aliased terms beyond rank of ordination axes, extractAIC did not get df right when going beyond rank of ordination, anova(..., by="t") gave zero df for constraints beyond rank of ordination, and calibrate.cca ignored those extra variables (now stops). In addition predict.cca and predict.rda(..., type="lc", newdata=somedata) gave wrong results in partial model. The following changes were made if necessary to cca/rda support functions: * alias.cca: QR$rank * anova.ccabyaxis: OK * bstick.cca: OK * calibrate.cca: stop with error if qrank > rank * extractAIC: qrank * mso: OK (HW confirms) * msoplot: OK (HW cofirms) * permutest.cca: qrank, also fixes anova.ccabyterm * predict.cca/rda: QR$rank with type = "lc" & newdata * summary.cca/rda: OK * scores.cca/rda: OK Version 1.14-2 (closed June 5, 2008) * Helene Wagner joined the vegan team. * mso: automatically collapses distance classes larger than half the maximum distance into a single distance class. * mso: plot.mso renamed to msoplot so that plot.cca also works, and the example uses now Oribatid mite data set. * mso: gained a print method that also shows the variogram (Helene, please check this!), and mso knows about its own call. * lines.spantree: did not pass graphical arguments to lines (broken in 1.12-15). * ade2vegancca: a new function which tries to change an ade4:::cca object to vegan:::cca object (and manages partially). This is used internally in print.cca, scores.cca and summary.cca so that vegan can display some information from ade4:::cca (with a warning). Since scores.cca works for ade4, so do plot, orditkplot etc which rely on scores. Version 1.14-1 (closed May 29, 2008) * plot.mso: passes extra arguments (...) to graphical functions. * mite.xy: new data set with spatial coordinates for the Oribatid mite data. From Pierre Legendre's web page. * weights failed in several ordination utilities, because weights.default in R 2.7.0 (stats) could not cope with objects that do not have weights. R 2.6.2 still returned NULL for those objects, but now weights.default gives an error. As a workaround several vegan functions define internally weights.default <- function(object, ...) NULL to get back the old behaviour. Concerns orglspider, ordicluster, ordispider, ordiellipse, ordisurf, factorfit, vectorfit. * inertcomp and intersetcor only work with objects inheriting from "cca", but they did not check that the object was of the correct type and so could end up with calling weights.default or give obscure error messages. * permutest.betadisper: Could give the wrong pair-wise permutation p-values. Reported by Daniel O'Shea. Version 1.14-0 (closed May 21, 2008) * The base of the release version 1.13-0. Version 1.12-15 (closed May 14, 2008) * closed the revision and made it as the base of release branch 1.13-0 at rev353. * capscale: prints info on possible metaMDS transformations, and uses metaMDSdist transformed data for getting species scores (similarly as metaMDS recently does). * ordiTerminfo: does not give superfluous warnings if constrained ordination called without constraints and without data=, like capscale(x ~ 1). * graphical functions: Graphical functions that also pass '...' to non-graphical functions (such as scores) now accept non-graphical arguments without issuing an warning. These warnings were harmless but it is neater to stop them happening in the first place. This is facilitated by the new internal function ordiArgAbsorber(). * MOStest: added fieller.MOStest for approximate confidence intervals of the location of the hump or pit. The method is based on Fieller's theorem following ter Braak & Looman (Vegatatio 65, 3-11; 1986) and profile based condifence limits following Oksanen et al. (Ecology 82, 1191-1197; 2001). Both are based on the code from the ESA Ecological Archives accompanying Oksanen et al. (Ecology 82, 1191-1197; 2001) and published in package optgrad (http://www.esapubs.org/archive/ecol/E082/015/default.htm), but profile methods heavily borrow from the MASS package. Version 1.12-14 (closed May 9, 2008) * mso: added Helene Wagner's mso function for direct multi-scale ordination or spatial partioning of 'cca' and 'rda' results (Ecology 85, 342-351; 2004). Thanks to Helene Wagner for allowing the inclusion of the code. * MOStest: new function to implement Mitchell-Olds & Shaw test for the location of quadratic extreme in a defined interval. * capscale: accepts now other dissimilarity function than vegdist, and optionally uses metaMDSdist to manipulate dissimilarities similarly as metaMDS. This provides now a one-shot unconstrained principal coordinates analysis ("metaPCoA"), optionally with extended (flexible shortest path) dissimilarities. Incidentally this also implements a "new" possibly unpublished ordination method: extended distance based redundancy analysis. * metaMDSdist: argument 'add' gained new alternative "ignore" to do nothing with zero distances. This can only and should be used with metric scaling (cmdscale(), capscale()). * ordispantree: removed after being deprecated and defunct for a long time. Use lines.spantree instead. Version 1.12-13 (closed May 7, 2008) * orditkplot: labels can be edited with double clicking, and shift-mouse allows zooming into smaller are in the plot. Version 1.12-12 (closed May 1, 2008) * adonis: added calculation of coefficients both for the species (when data matrix was given) and for sites (both with the data matrices and dissimilarities). * betadisper: was not calculating distance to centroid correctly for observations where the imaginary distance to centroid was greater than the real distance (resulting in negative distance) which resulted in NaN when we took the square root. betadisper() now takes the absolute value of the combined distance before taking the square root. This is in-line with Marti Anderson's PERMDISP2. Version 1.12-11 (closed April 23, 2008) * adonis: permutation tests fixed. The permutation statistics were wrongly calculated. The results will now be different than in older version, including the example(adonis). Basically, the reported statitistic used SS improvement compared to the residual of the complete model, but permutations used SS accumulation compared to the residual after the current model. * specaccum: returns item "individuals" or the average number of accumulated individuals with method = "rarefaction". A user request. * rarefy: accepts now a vector of sample sizes, and then returns a matrix with a column for each sample size. If also 'se = TRUE', returns two rows for each case, one for rarefied richness, and after than one for its standard error. This was a recurrent user request. * zzz: vegan got package startup message. Version 1.12-10 (closed April 19, 2008) * adonis: the fix for the unused factor levels (r312) revealed that adonis did not handle properly aliased variables and pivoting. Results need checking. * designdist: gained argument 'abcd = FALSE' to use the 2x2 contingency table notation instead of the more tangible default notation. Version 1.12-9 (closed April 13, 2008) * ordiArrowMul: added function 'ordiArrowMul' to improve automatic scaling of biplot arrows (in plot.cca, text.cca, points.cca) and fitted vectors (in plot.envfit). Reversed axes 'xlim=c(1,-1)' work now, and shifted origin 'at = c(1,1)' taken into account in plot.envfit. * plot.cca: scaling used for biplot arrows is returned as an attribute to the 'biplot' item in the 'ordiplot' object (but this attribute is not used for anything useful yet). * summary.cca: contributions of eigenvalues accumulated for constrained and unconstrained axes, and separately (new) for constrained axes. * allPerms: Now accepts a vector from which number of observations can be deduced. This was the intended behaviour but allPerms failed in such cases. * adonis: Was not dropping empty levels of factors, which was leading to incorrect results (d.f. was inflated). Reported by Tyler Smith. Version 1.12-8 (closed April 6, 2008) * permute: New high-level untility function for facilitating the production of permutation tests using the new permutation designs allowed by permuted.index2(). An example of the new API is shown in ?permute. * permutest.betadisper: Pairwise t test function made more computationally stable. Version 1.12-7 (closed Mar 30, 2008) * permuplot: New function, produces a graphical representation of a permutation design given a number of observations and a object returned by permControl(). The function handles all the permutation designs currently handled by permuted.index2(). * permuted.index2: was not returning correct sample indices for grid designs within strata. Also, was not consitently mirroring series and grid designs when 'constant = TRUE' (i.e. mirroring was not applied the same way within each level of strata). * permCheck: Now includes several sanity checks for balance in permutation designs ('grid' & 'strata') and when using same permutation in each level of 'strata' (constant = TRUE). Also works if object is a (numeric or integer) vector of length 1, by expanding it to seq(from = 1, to = object). This is now in-line with the way numPerms works. New argument 'make.all' in permCheck() allows greater control over the checking process. Allows user to check a permutation design without generating the matrix of all possible permutations. Used in allPerms() to allow that function to check permutation designs without getting stuck in infinite recursion, as permCheck() calls allPerms() if complete = TRUE. This change allows allPerms() to be called by a user without having to make sure the supplied design makes sense - the design is checked using 'make.all = FALSE'. * screeplot: functions return now invisibly the xy.coords of bars or points for eigenvalues. They used to return invisibly the input data ('x'). Concerns screeplot methods for 'decorana', 'cca', 'princomp' and 'prcomp' objects in vegan. * varpart4: result could be wrong if 'varpart' was bypassed and 'varpart4' was called directly, because 'Y' was not centred before calculating sum of squares in 'varpart4' ('varpart2' and 'varpart3' were OK). Reported by Guillaume Blanchet, Uni Alberta. * permutest: Now a generic function. permutest.cca is now the 'cca' method. * permDisper: This function has been renamed to permutest.betadisper and documentation updated. * TukeyHSD.betadisper: Function is now documented with betadisper. Version 1.12-6 (closed Mar 25, 2008) * metaMDS: WA scores for species are now based on the same transformations and standardization (like wisconsin(sqrt())) as the dissimilarities. They used to be based on the original data even when the data were transformed for the ordination. The change is minimal: data are evaluated similarly as in metaMDSdist if wascores are requested. An alternative would have been to split data manipulation function into an independent function from metaMDSdist, but I try this first. For compatibility reasons, the previous behaviour can be re-established using argument old.wa = TRUE. * allPerms: Now allows unbalanced designs for "series" or "free" permutations within levels of strata only (i.e. allows different number of observations per level of strata). Unbalanced "grid" designs are not supported (and are unlikely to be so in the near future). permuted.index2 has allowed these cases from the beginning. * allPerms, numPerms: Corrected for situations where type = "series", mirror = TRUE with only 2 observations. In this case, mirroring does not double the number of permutations. Version 1.12-5 (closed Mar 24, 2008) * plot.procrustes: could fail if compared configurations were numerically identical. * allPerms: New function to enumerate all possible permutations for a given permutation scheme and number of samples. Has 'print' and 'summary' methods. * numPerms: Now accepts a numeric or integer vector of length 1 as the first argument 'object'. If supplied it is expanded to seq(from = 1, to = object). This change allows you to state the number of observations rather than pass an object from which the number of observations is deduced. Updated and clarified documentation in this regard. Version 1.12-4 (closed Mar 20, 2008) * permDisper: Added pairwise comparisons of group dispersions via a classical t test and via permutation test, accessed via new argument 'pairwise = TRUE'. 'permDisper' is now documented seperately from 'betadisper'. * TukeyHSD.betadisper: A method for 'TukeyHSD' to calculate Tukey's Honest Significant Differences for the grouping factor in 'betadisper'. * numPerms: Was incorrectly calculating the number of permutations when permuting levels of strata was performed. numPerms was also incorrectly reporting too many permutations in the particular case of type="grid" and mirror=TRUE with ncol=2. * permuted.index2: When permuting levels of 'strata' (type = "strata"), permuted.index2 was shuffling both the levels of strata *and* shuffling the samples within levels. The latter was incorrect and is now fixed. Version 1.12-3 (closed Mar 9, 2008) * betadiver: a new function that implements all indices of beta diversity reviewed by Koleff et al. (J. Anim. Ecol., 72, 367-382; 2003), with a plot function to produce triangular plots. * isomap: added dynamic, spinnable 3D graphics using rgl (rgl.isomap). Version 1.12-2 (closed Mar 7, 2008) * nestedtemp: Rodriguez-Girones & Santamaria (J. Biogeogr. 33, 924-935; 2006) have had a look inside the original temperature calculator code and give a more explicit description of the method. Following their paper, I implemented an iterative procedure to alternately pack columns and rows for ones and zeros. The fill line is still a parabola, but this seems to be very similar to the R-G & S fill line with fills 0.2...0.8 and I don't hurry with this. There still are differences in many aspects of implementation. The iterative procedure gives slightly different results between runs, but here tests: Rocky mountain mammals 3.87 (A&P 3.81, was 3.59 in 1.12-1), Baja birds (Bajabs.txt) 10.17 (A&P 7.25, was 7.75), Queen Charlotte birds 14.78 (A&P 15.87, was 14.51). Some results are indeed more different than they used to be... * nestedtemp (2): After previous entry implemented the fill line of Rodriguez-Girones & Santamaria. This means almost complete rewrite of the function from 1.12-1. New test results: mammals 4.48, Baja birds 10.16, Queen Charlotte birds 15.85. Baja is the most different. Atmar & Patterson have five Baja bird data sets with these test results: Bajaball 6.33, Bajabl 14.43, Bajabn 5.98, Bajabo 11.18, Bajabs 10.13. Smaller change is that packing is based on indices s and t directly instead of their ranks. * vignettes: added discussion on nestedtemp and backtracking in "Design decisions and implementation". Version 1.12-1 (closed Mar 2, 2008) * biplot.rda: gained argument col to select colours for sites and species. * bstick.princomp: used a wrong number of sticks (PCs). Reported by Guy Yollin. * nestedtemp: Returns row and column coordinates, optionally labels plot. * merged last doc fixes from branches/1.11-0/ after release. Version 1.12-0 (Feb 15, 2008) * Made a release branch (1.11-0) based on the the rev. 204, and relabelled this devel branch to 1.12-0. Version 1.10-13 (closed Feb 15, 2008) * preparing for a release and trying to close open threads. * nestedtemp: implemented smooth fill line. The kind of the fill line was not specified in the original paper, but I used parabola which is "as smooth as possible" in the sense that its second derivative is constant. Needs checking, though. Version 1.10-12 (closed Feb 12, 2008) * nestedtemp: new try with smooth fill line. * anova.cca: by = "margin" stops with informative error message if some terms are completely aliased (used to stop with an uninformative error message). Type III effects really do not make sense with aliased variables. * calibrate.cca: does correct pivoting of aliased models. * orditkplot: Set up all basic features, and added points, text, and scores methods. Features that should be added include zooming to a rectangle drawn with a mouse, and adding env variables. The latter would be trivial in a simple way, but the user should be able to move the bunch of arrows to another place, and scale the length of arrows with a mouse. Version 1.10-11 (closed Feb 3, 2008) * bgdispersal: New, more powerful test statistic (in terms of Type 1 error rate) for the McNemar test (Pierre Legendre). * CCorA: internal functions embedded in CCorA(). * orditkplot: More resilient against user errors. New output file types (bmp, xfig), jpeg uses 100% quality. more aware of operating system and capabilities. Accepts graphical par in the function call. Gains arguments xlim, ylim. Arguments col, bg, cex renamed to pcol, pb, pcex so that the do not shadow par(). * permuted.index2: fixed a bug in permutations with strata. * summary.prc: honours now argument 'axis'. Reported by Francois Gillet, Lausanne. * Documentation: added documentation for permuted.index2, permControl, permCheck and helper functions. FAQ and intro know now about orditkplot, anova.cca(..., by="margin") and permuted.index2. FAQ gained new sections on using different plotting symbols and handling congested plots in ordination graphics. Version 1.10-10 (closed Jan 27, 2008) * DESCRIPTION: suggests tcltk. * orditkplot: new function for ordination plots based on Tcl/Tk: you can edit graph by moving labels using a mouse and save the edited graph as an eps file, or export via R plot function to eps, pdf, png or jpeg, or to dump to R session for further processing. * CCorA: removed partial analysis (which needs more work and may reappear later). Version 1.10-9 (closed Jan 16, 2008) * anova.cca: new option by = "margin" to perform separate tests for each marginal effect in a model with all other terms. This is similar to Type III tests, but will only work with marginal terms, and will exclude main effects when corresponding interactions are in the model. P-value is now assessed in the true blue way as (hits+1)/(permutations+1) in all anova.cca methods. Permutations should be able to handle now rank deficit cases with pivoting in the QR decomposition (permutest.cca). * permuted.index2: New version of permuted.index() that now allows restricted permutations. Can produce permutations for time-series or line transects and for spatial grids. These can also be nested within 'strata'. permuted.series() and permuted.grid() are the relevant workhorse functions. Permutation options are set by new function permControl(). Plan to migrate vegan functions to permuted.index2() in the devel version, and will eventually replace the current permuted.index(). * permCheck: New function for checking permutation schemes under permuted.index2. Uses new function numPerms() to generate the number of possible permutations. permCheck() has print, summary and print.summary methods. Version 1.10-8 (closed Dec 14 2007, at Rev. 133) * metaMDS: gains argument wascores (defaults TRUE) to suppress calculation of species scores. * wascores: return now NA for missing (all zero) species instead of failing. * ordiplot: ignore missing scores in plotting and printing. * betadisper: new functions for Marti Anderson's analysis of homogeneity of multivariate dispersions. * nestedtemp: handles now tied frequencies using ties.method = "average" in rank(). Function is still preliminary, and may be dropped from the release. * taxa2dist: issues now a warning if called with 'check = FALSE' and there are zero distances, typically meaning that basal taxa (species) were not coded. Also explained in the help. * varpart: failed if there were unused levels in factors (reported by Clément Tisseuil, Toulouse). * adonis: loses argument 'distfun'. Instead accepts now any 'dist' object as input instead of a data frame or a matrix. Version 1.10-7 (closed Nov 18, 2007 at Rev. 119) * adonis: gains argument 'distfun' (default 'vegdist') so that other standard conforming dissimilarity functions than vegdist can be used (a user request). * decorana: does not crash R when called with NULL row data such as decorana(dune[FALSE,]) (reported by Richard Tellford, Bergen, Norway), and predict(..., type="sites") works correctly with downweighted analysis (reported by Colin Beale, Aberdeen, Scotland). * isomap: checks now that input data are dissimilarities or can be changed into dissimilarities without warnings. * ordixyplot: can now display biplot arrows and factor centroids in constrained ordination or from envfit (ordisplom and ordicloud cannot display these). * ordixyplot, ordicloud and ordisplom: no longer have explicit scaling argument, but can now pass arguments to scores() as well as to the plotting functions. * oecosimu: evaluates now two-sided P-value of the statistic from simulations. Doc updates. * vignettes: use all similar style (amsart, a4paper, sidecap, date style). * FAQ: tell about docs added to R-Forge versions of vegan. Tell about predict() for having "passive" points. Version 1.10-6 (closed Oct 31, 2007 at Rev. 100) * Gavin Simpson joined the vegan team. * oecosimu: new functions for indices of nestedness of patches or islands, and simulation of null communities. * scores: cca method does now accept display = c("species", "sites"). Previous fix (1.10-5) was for rda method only. Documentation updated to reflect changes. * biplot.rda: now allows a different type to be specified for each of the species and site scores. Function now documented more completely. * ordixyplot, ordicloud and ordisplom: now have argument 'scaling'. * orditorp: now handles additional arguments passed as '...' more cleanly. Arguments can be passed to scores() or points/text. This should avoid the warning messages of previous versions. * sipoo: a new data set on the bird communities in the Sipoo (Sibbo) archipelago to demonstrate the oecosimu functions. Version 1.10-5 (closed Oct 18, 2007 at Rev. 86) * biplot.rda: new biplot function for PCA in rda() (Gavin Simpson). * scores: cca method accepts now display = c("species", "sites"), when it only used to accept c("sp","wa"). More consistent arguments in the default method. * CCorA: Pierre Legendre submitted code for permutation test of Pillai's trace. * capscale: negative scaling works now in plot() and scores(): estimates species sd() from the 'comm' if 'comm' is known. Version 1.10-4 (closed Oct 6, 2007 at Rev. 75) * anova.cca: failed in anova(object, by = "axis") when the fitted model had terms like poly(x, 2) or log(x). * ordiresids: new function for plot.lm like diagnostic plots for constrained ordination: Residuals ~ Fitted, sqrt(abs(Residuals)) ~ Fitted, and qqmath(~ Residuals) using Lattice graphics. * fitted.cca, fitted.rda: gained agument type = "working" to get the fitted values and residuals used internally in calculation (to be used in plot.lm diagnostic plots residuals ~ fitted). Version 1.10-3 (closed Oct 2, 2007 at Rev. 62) * doc: added vignettes intro-vegan on ordination methods and diversity-vegan. * Trellis graphics for ordination objects with functions ordixyplot, ordicloud and ordisplom. These functions are still unsatisfactory. In particular, I haven't found a clean way of having biplot arrows in the graphs (how do you know the coordinates and the axes used?). Contributions are welcome. * ordispantree made dysfunctional (deprecated in 1.8-1). Version 1.10-2 (closed Sep 14, 2007 at Rev. 36) * vegandocs: added FAQ-vegan, and renamed the old vegan-FAQ to decision-vegan. Only primary sources (texi, Rnw) in the source repository: derived files (.tex, .pdf) should be made when package is built. * CCorA: Pierre Legendre's functions for Canonical Correlation Analysis. These provide a more robust alternative to the standard cancor() in base R. (under work) * scores.default: handles numeric data frames. Version 1.10-1 (closed Sep 7, 2007 at Rev. 21) * taxondive: Fixed dimension checking, matching names and non-unique taxon names. Version 1.10-0 (Sep 6, 2007) * Moved vegan_1.8-7 (CRAN release) into R-Forge.R-Project.org and Subversion SCM. This ChangeLog will only contain most important news (and should be renamed to NEWS), and the real ChangeLogs are created by the SCM. The revisions will be numbered as 1.10-1 to 1.10-x, and the next release will be 1.11-0. VEGAN RELEASE VERSIONS at http://cran.r-project.org/ Version 1.8-8 (Oct 2, 2007) * Minor bugfix release for upcoming R-2.6.0. Based on the http://r-forge.r-project.org/projects/vegan/ revision 17 (= 1.8-7) with ported bug fix revisions from 1.10-3 (see below for revision numbers). * anova.cca: by = "term" failed in partial model. This was broken in 1.8-6 by introducing a test against deficit rank models (r47). * cascadeKM: Calinski index works now when the input data is a data.frame (r57, 58). * flush.console: metaMDSiter and bioenv use now flush.console() so that Windows people also see the trace (r56). * ordispantree: made defunct, was deprecated in 1.8-1 (r38). * scores: handles now numeric data frames (r25). * summary.cca: failed if only one type of scores was requested (r50, 52). * taxondive: Fixed dim checking and matching species names in community data and taxonomic distance data (r21). * tweaks to pass --pedantic R CMD check, mainly in formatting source files, unused variables in source files and superfluous braces in help files (r39, r46, r62). * Updated FAQ-vegan.pdf to the current version at R-Forge. Version 1.8-7 (August 24, 2007) * Based on devel version 1.9-34. * DESCRIPTION: M. Henry H. Stevens (Miami University, Oxford, Ohio) joined the vegan team. * adonis: new function for nonparametric MANOVA that is appropriate for even extremely wide matrices sometimes associated with gene data and with diverse ecological communities. Author Hank Stevens. * taxondive: a new function for indices of taxonomic diversity and distinctness after Clarke & Warwick (Mar Ecol Prog Ser 216, 265--278, 2001 and other papers). With a helper function 'taxa2dist' to turn taxonomies into distances with an option for variable step length (Clarke & Warwick, Mar Ecol Prog Ser 184, 21--29, 1999), and a toy data set on the taxonomy of dune meadow species ('dune.taxon'). With a help, testing and pressure from Mike Cappo, James Cook Uni, Qld. * bgdispersal: previous version was partly garbled (by me), and P. Legendre provided a corrected one. * designdist: keeps 'dist' attributes even when the 'method' function drops them. Swapped the order to (terms, methods) in the default name. * metaMDS: issues a warning if data are disconnected. Passes extra arguments to other 'distfun' than 'vegdist' so that you can set 'terms' in 'designdist' etc (metaMDSdist). Can now do trymax=0 or skip random starts and give you enhanced 'isoMDS' result (metaMDSiter). * ordiplot: failed if number of species was equal to number of sites (and so did plot.metaMDS and plot.isomap using this). * plot.profile.fisherfit: corrected a harmless error detected by checkUsagePackage(). * predict.rda: removed some dead (but heavy) code from type = "response". Version 1.8-6 (May 9, 2007) * Based on devel version 1.9-23. * as.mlm.cca, as.mlm.rda: new functions to refit constrained ordination result (cca, rda, capscale) as a multiple response linear model. You can find influence statistics (Cook's distance, hat values) from the refitted model. You also can find t-values etc., but these have the same bias as in other software and should not be used. * bgdispersal: a new function for dispersal direction in biogeography (Legendre & Legendre 1998, section 13.3.4). Author Pierre Legendre. * designdist: a new function for defining your own dissimilarity index or for estimating beta diversity (Koleff et al., J. Ecol. 72, 367-382; 2003). * isomap: a new function for isometric feature mapping of Tenenbaum et al. (Science 290, 2319-2323; 2000). * screeplot, bstick: new functions to draw screeplots of vegan ordination results with brokenstick lines, and alternative screeplot functions for prcomp and princomp with brokenstick. Author Gavin L. Simpson. * swan: a new function for the degree of absence (Swan 1970, Ecology 51, 89-102). * anova.cca: now refuses to do 'by = "terms"' if the rank of constraints is higher than the rank of the community matrix. * bioenv: gains argument 'partial' to perform partial bioenv. * cca, rda, capscale: can now handle longer expression within 'Condition()' (ordiParseFormula). Used to drop observations with missing values in unused variables (ordiGetData). * goodness.cca, goodness.rda. 'statistic = "distance"' was wrongly implemented. Now refuses to find "distance" in constrained analysis: distances of constrained and unconstrained components do not add up to to distances in unconstrained ordination. * metaMDS (metaMDSdist): gains argument 'distfun' to use other dissimilarity functions than vegdist. * renyiaccum: used a variable that was not defined as an argument. Added support functions persp.renyiaccum and rgl.renyiaccum (Roeland Kindt). * stressplot: R2's renamed to 'non-metric fit' and 'linear fit'. * Doc: Corrected reference to Hurlbert in diversity (thanks to Ralph Grundel). Updated references (varpart, renyiaccum). Removed discussion on t-values in cca from vignettes, because as.mlm.cca now implements those. General cleanup and better utf-8 encoding. Version 1.8-5 (January 11, 2007) * Based on devel version 1.9-12. * no.shared (manifest in metaMDS): prints thousands of lines of debugging info that I forgot to deactive in release. Not fatal, but extremely annoying. * capscale: inertia name as "unknown" if the dissimilarity object does not have a "method" name. Suggested by Roeland Kindt. * DESCRIPTION: license is now explicitly GPL v2 (but not later). Version 1.8-4 (January 8, 2007) * Based on devel version 1.9-10. * cascadeKM: a new function to wrap kmeans and optimality criteria for classification (Sebastien Durand, Pierre Legendre & Marie Helene Ouellette). * renyiaccum: a new function for Renyi (and Hill) accumulation curves (Roeland Kindt). * bioenv: bioenv.formula uses now "na.action = NULL" in 'model.frame', and bioenv.default passes arguments to 'cor' which means that you can set NA treatment in 'cor' using argument "use". * cca, rda: added "..." to formula versions to satisfy tests in R-DEVEL. * cca, rda, capscale: used to fail if called within other functions. Now data always evaluated in the environment of formula using new internal function ordiGetData. * anova.cca: checks that the model has both residual and constrained components or stops with understandable error message (used to stop with incomprehensible error message). * print.summary.cca, print.summary.decorana: have now arguments 'head' and 'tail' to print only a part of species and site scores. Suggested by Gavin Simpson. * metaMDS: checks now that the input data ('comm') is not a 'dist' object (like many users have had). * ordisurf: Does not depend on package 'akima' any longer, but directly finds fitted values in a regular grid using 'predict.gam'. Added pnpoly.c to find which of these values are within the convex hull defined by data. Results also look neater with sparse data now. Added argument 'labcex' passed to 'contour' for changing size of contour labels. Setting 'labcex = 0' will suppress drawing labels (by setting drawlabels = FALSE in 'contour()'). * orditorp: handles now vector arguments of 'col', 'pcol', 'cex', and 'pch'. * rad.zipfbrot: less likely to overflow to NA coefficients during iteration. * renyi: added a plot function, and documented together with renyiaccum() instead of diversity(). * scores.default: Knows now about ade4 objects. Primarily looks for scores scaled by eigenvalues both for sites and species. * specaccum: Added new conditioned method of Colwell et al. with estimated sd based on extrapolated richness (Roeland Kindt). * vegdist.c: More informative warnings with 'method' name (useful with rankindex). * DESCRIPTION: listed 'require()d' packages in the "Suggests:" field to satisfy more anal tests in R-DEVEL. Mention diversity analysis in the "Description:". Version 1.8-3 (Sept 29, 2006) * Based on devel version 1.9-2. * varespec.rda, varechem.rda: saved in binary form, because old ascii form gave warning in R-2.4.0-rc. * vegdist: added Chao index (of Jaccard type) that should take into account missing pairs of species. Checks that Binomial index is non-negative. Identical sites could have dissimilarity of magnitude 1e-17 after some standardizations, but now values <1e-15 are zapped to zero. * estimateR: uses now standard unbiased formulation of Chao. * renyi: should work now (really!). * metaMDS: with zero = "add", zeros now replaced with min(dis[dis>0])/2 (used to be 1E-4) (metaMDSdist). Sets number of tries also when this was not set previously (metaMDSiter) Version 1.8-2 (June 13, 2006) * version 1.8-1 failed test in Windows because of a wrong encoding name. Explicit \enc added for non-ascii words. Kurt Hornik and Uwe Ligges diagnosed this and led me to see the light. * similar to devel version 1.7-97. Version 1.8-1 (June 12, 2006) * Based on devel version 1.7-96. * Pierre Legendre joined the vegan team. * beals: a new function for Beals smoothing. * bioenv: added 'trace' argument. * cca/rda/capscale: accept several 'Condition' elements in the formula. * capscale: capscale(y ~ ., data=...) or expansion of "." on the rhs works now. Documentation recognizes now db-RDA as the real mother method. * scores.cca, summary.cca etc: rewrite so that is cleaner and easier to maintain. User visible changes are scaling by species standard deviation (negative scaling) for 'rda', scaling=0 (no scaling) for all methods and slightly changed output and improved user control in summary. These scalings actually were documented in 1.6-10, although I dropped them just before the release. predict.cca, predict.rda: work now with 'newdata' even when not called with formula. * anova.cca: new argument 'by' for tests of single terms or axes: with by = "terms" performs individual test for constraints, and with by = "axis" a separate sequential test for each axis. New argument 'first' to analyse only the first axis instead of all constrained variation. * intersetcor: new function for the interset correlation or the (weighted) correlation between individual constraints (contrasts) and invidual axes in cca/rda/capscale. (Not recommended.) * decostand: does not automatically convert matrix to a data.frame. NA handling more consistent now (thanks to Tyler Smith for diagnosis). Adds attribute 'decostand' giving the "method". * linestack: now really uses median as the midpoint with the odd number of cases, and does not give superfluous warnings with three or less items. New argument 'labels' to replace the default text in plot. The old argument 'label' renamed to 'side'. However, the function still works with the old syntax, but gives a warning if the old argument 'label' is used for 'side'. Returns invisibly the shifted positions of labels. * metaMDS: 'postMDS' sets now attributes similarly when called independently or within 'metaMDS'. 'metaMDS' forwards arguments to 'postMDS' except 'halfchange'. Change of phrasing in 'print'. Added handling of zero dissimilarities into 'metaMDSdist': either "fail" or "add" 1E-4 into zeros. * mrpp: new function for the multiresponse permutation procedure (MRPP). Code by Henry Stevens (Miami Univ, Oxford, Ohio). * ordiarrows: draws arrowhead only in the last segment. New argument 'startmark' for marking the starting point of the arrow. * ordisurf: new arguments 'main' for the title and 'nlevels' and 'levels' for the number of contour or their values. * orditorp: arguments for text colour and text character expansion changed to standard 'col' and 'cex' from previous 'tcol' and 'tcex'. * procrustes: 'summary' prints now rotation matrix, translation and scale, and honours 'digits'. * prc: new functions for Principal Response Curves (PRC) of van den Brink and ter Braak (Envir. Toxicol. Chem, 18, 138-148; 1999). This is a special rda() model with dedicated summary and plot functions. New data set 'pyrifos' to demonstrate 'prc'. * radfit: added brokenstick as a null model (rad.null), removed rad.veil (as it was a bad idea originally), corrected minor bugs in rad.preempt (which did not fail gracefully). Line colours start from the point colour in plot.radfit.frame. 'print' uses "g" format for coefficients and adds 'digits' argument. Added 'summary.radfit.frame' that simply prints each model. * rankindex: uses now cluster:::daisy when 'grad' includes factors. * spantree: now a method function with 'plot', 'lines' and 'cophenetic' methods. 'lines' replaces 'ordispantree'. The plot has a weird, new way of finding configuration for a spanning tree from cophenetic distances (unpublished). Documented separately. * specaccum: 'plot' honours now 'ylim'. * specpool: Chao richness was wrongly defined, but now uses the biased formula (error introduced in 1.6-5, correct earlier). Failed with zero species or if there were no species that occurred exactly one in the 'pool' (thanks to Emmanuel Castella, Geneve CH, for the bug report). * varpart: new functions for unbiased partitioning of variation by two to four explanatory tables in RDA or linear regression. The author of these functions is Pierre Legendre & co (Univ Montreal). New data sets 'mite', 'mite.env' and 'mite.pcnm' to demonstrate the functions. * vegandocs: new function to display *all* pdf documentation and ChangeLog. This really should be in base R -- this is a kluge to fill the hole. * vegemite: added argument to 'select' a subset of sites. Drops missing species from the table. Prints number of species and number of sites and the used cover scale at the end of the table. Passes arguments (i.e., 'maxabund') to coverscale(). * coverscale: added argument 'maxabund' to 'scale = "log"'. Returns the name of the cover scale as an attribute for vegemite() to print. * vegdist: now first checks input and then transforms (if needed). Thanks to Tyler Smith, * Internal changes: permuted.index acceptes NULL strata as an alternative to missing strata. ordispantreee deprecated. spider.cca removed. * Documentation: general cleanup in help files. New chapter on t-values in cca/rda/capscale in vegan-FAQ. New pdf document on partioning with varpart by Pierre Legendre & co. Non-latin characters now use UTF-8 in documentation. R manual says that you should not use non-latin characters in help files, but that was written by Englishmen. However, this seems to cause distress to some users of a US West Coast OS (Windows), but OK with mainstream OS's (Linux, MacOS). . Version 1.6-10 (September 26, 2005) * Based on devel version 1.7-77. Checked with R 2.1.1 (stable) and R 2.2.0 (alpha). * rda: negative scalings explicitly ignored and treated as corresponding positive values. Function summary.rda used to fail with NA centroids. * permutest.cca & anova.cca: permutation of 'cca' result now re-weights environmental data properly with permuted community weights (this breaks compliance with popular proprietary software). New default method 'direct' that always permutes the data instead of residuals. Now clearly faster basic routines, but re-weighting in 'cca' is costly, and permutations may even be slower than earlier in small data sets. The permutest.cca returns more data: constrained and residual total inertia, degrees of freedom in the input model, and .Random.seed used in iterations. Thanks to Pierre Legendre for pushing me to make this faster. * ordination plot functions: obey now xlim and ylim. * ordination text and points functions: a new argument 'select' that can be used to select a subset of items, and a new argument 'labels' for text used instead of the default row names. * points.cca, text.cca: biplot arrows will be scaled automatically to fit the current graph if 'arrow.mul' is not given. The new behaviour is similar to the default in plot.cca and in plot.envfit. * orditorp: a new "ordination text or points" function to add text or points to an existing plot: adds text if this can be done without overwriting other text labels, and points otherwise. * linestack: a new function to draw labelled one-dimensional diagrams without overwriting the labels (a primitive one, and could easily be improved: submissions are welcome). * ordirgl, orgltext: adapted to changes in rgl package version 0.65. Workaround for older rgl packages, too. * decostand: Added Hellinger transformation. Empty columns and rows become now 0 instead of NaN in most methods, except when the input data contains negative values. Warns on input with negative entries or on output containing NaN. Has now argument 'range.global' for method 'range' based on the code supplied by Tyler Smith. * plot.radfit: puts now legend "topright" in R >= 2.1.0 (which has this keyword). * read.cep: issues a warning if vegan was compiled with gfortran, which has a bug that may corrupt the result. The bug concerns multiline input with T format modifier, and it was corrected in http://gcc.gnu.org/ml/gcc-patches/2005-09/msg00126.html, but still bugs most released versions of gcc. * vegdist: new indices 'raup' and 'binomial'. Method 'raup' implements probabilistic Raup-Crick index and is based on the code submitted by Michael Bedward. Method 'binomial' implements Millar's index, officially published as "Binomial deviance as a dissimilarity measure" (the C code has been in vegan for about two years, but now I tell about it and add the public interface). Method 'mountford' will give NA for any comparison involving an empty site. Warns about empty sites or negative entries with all methods except 'euclidean' and 'manhattan'. * Documentation: added documentation of the cca/rda/capscale result object. Dontruns used more neatly. Version 1.6-9 (April 22, 2005) * Maintenance release: 1.6-8 failed in R 2.1.0 patched and R 2.2.0 devel (works in R 2.1.0 release) due to problems in as.preston. Based on devel version 1.7-62. * as.fisher, as.preston: used table() in a way that failed in R 2.1.0 patched * calibrate.cca: new function to predict or calibrate or bioindicate the values of environmental constraints from community composition (ordination). * decostand: new argument na.rm (defaults FALSE) for ignoring missing values in row, column or matrix standardizations. * vegdist: new argument na.rm (defaults FALSE) for pairwise deletion of missing vaues in dissimilarity calculation. Version 1.6-8 (April 18, 2005) * Based on devel version 1.7-59. Adapted to R 2.1.0 beta. * DESCRIPTION: gives due credit to Roeland Kindt and Bob O'Hara as co-authors. * documentation: updates in capscale, vegdist. vegan-FAQ adapted to changes in Sweave in R 2.1.0. * several methods assumed that input is count data, but silently accepted floating point numbers and gave wrong results. Now they stop with error with non-integer input: fisherfit, prestonfit, prestondistr, rarefy, fisher.alpha, estimateR. * bioenv: uses now 'cor' instead of 'cor.test', and does not give so many superfluous warnings and is marginally faster. Changed printed output, so that gives 'call' instead of names of community and environmental data, since bioenv.formula could not handle these cleanly. * capscale: has now argument 'add' to use an additive constant to all dissimilarities so that all computed eigenvalues are non-negative. This is an argument of underlying 'cmdscale' function, which implements the "Correction method 2" of Legendre & Legendre (1998), p. 434. * decorana: checks now that there are no negative data entries. * dune: cleaner site names. * envfit: 'plot' now automatically scales arrows similarly as 'plot.cca' if 'arrow.mul' is not specified and arrows are added to an old plot. Has now a 'scores' function. * goodness.cca, predict.cca: documented separately. * goodness.metaMDS: new function to assess pointwise goodness of fit in metaMDS or isoMDS. * humpfit: user can now give starting values of parameters. 'summary.humpfit' returns 'cov.unscaled' so that users can apply 'ellipse' function of 'ellipse' package to display approximate confidence ellipses for pairs of parameters (with Normal assumptions). * make.cepnames: No longer duplicates one component names, but 'abbreviate's them to eight characters. * metaMDS: Split to independent metaunits 'metaMDSdist' and 'metaMDSiter'. New function 'metaMDSredist' tries to reconstruct dissimilarity matrices and transformations. 'postMDS' skips halfchange scaling with too few points (with a warning) instead of stopping with an error. Prints now info about 'postMDS' operations. New 'scores' function. Improved 'plot' function with 'display' argument and labelling of axes. Argument 'shrink' to undo expansion of species scores in plot or scores functions. Workaround for a future bug in 'isoMDS' which drops names of points in R 2.1.0. Updates number of 'tries' with 'previous.best'. * ordiplot: has now 'display' argument, so that only species or sites can be plotted. * ordiplot3d: a new function for 3D static ordination diagrams. * ordirgl: new function for dynamic 3D graphics of ordination results. With support functions orglpoints, orgltext, orglsegments and orglspider to add graphical items to dynamic plots. Needs 'rgl' package. * predict.cca, predict.rda: type = "wa" with 'newdata' works now even when some species were removed from the original fit because they were all-zero (missing). Default now to 'model = "CA"' in unconstrained analysis without "CCA" component. * predict.decorana: a new function for 'decorana' results. Similar to 'predict.cca' (but refuses to give impossible results). * procrustes: obeys now 'choices' even when input is a matrix. Plots now projections of rotated axes. New argument 'scores' so that can handle other than "site" scores. * protest: passes now arguments to 'scores' so that now can handle other than "site" scores on more than two dimensions. * rda: handles now species with constant values (typically missing or all zeros). * spenvcor: new function to find the "species -- environment correlation" in contrained ordination (cca, rda, capscale). * stressplot: a new function to plot Shepard diagram for 'metaMDS' or 'isoMDS'. * summary.cca/summary.rda: print now call. * vegemite: can now 'use' 'dendrogram' objects. Version 1.6-7 (Jan 24, 2005) * Based on devel version 1.7-42. * plot.envfit did not plot vectors. Thanks to Roeland Kindt and Ron E. VanNimwegen for bug reports and fixes. * ordisurf obeys now keyword 'display', and '...' will transfer arguments to 'scores'. * ordisegments: obeys now keyword 'display'. * ordigrid: works now. * ordihull, ordiarrows, ordisegments, ordispider, ordiellipse: have a new keyword 'show.groups' to show only specified groups. With the help of this argument it is possible to use different colours and linetypes for each group. Further, it makes possible to plot results of logical comparisons (such as A1 > 4) by setting show.groups = T. Two user requests. * new diagnostic and helper functions for 'cca', 'rda' and 'capscale': 'goodness' to estimate the proportion of inertia accounted for or residuals for sites or species; 'inertcomp' to decompose species and site inertia for conditioned, contrained and residual componets; 'vif.cca' to estimate the variance inflation factors for constraints and conditions; 'fitted' and 'residuals' to approximate data by ordination scores; 'predict' to approximate data or find site or species scores, possibly with 'newdata'; 'coef' to find the regression coefficients. 'alias.cca' is now similar to 'alias.lm' (simplified version of the latter). Version 1.6-6 (Jan 7, 2005) * Based on version 1.7-34, but without still experimental functions predict, fitted, vif & goodness for cca and rda objects. * mantel: implemented partial mantel test (function 'mantel.partial'). Both 'mantel' and 'mantel.partial' should be marginally faster and not give so many superfluous warnings. * plot.envfit: should be more reliable now. A new keyword 'at' to position the bunch of arrows in other places than the origin. Thanks to Roeland Kindt for fixes. * rankindex: Default correlation now "spearman" since the older default ("kendall") was far too slow in large data sets. Should not give so many superfluous warnings. * summary.rda: Site scores were wrong with 'scaling = 3'. Influences 'plot' and 'scores' commands for 'rda' and 'capscale' results with 'scaling = 3'. * vegdist: Issues a warning if 'method = "morisita"' is used with non-integer data. Version 1.6-5 (Oct 12, 2004) * Based on version 1.7-27. Checked with R-1.9.1 (Linux, MacOS X) and R-2.0.0 (Linux, patched version in Windows XP). Passed other tests, but some examples in 'humpfit' failed in Windows XP, and are not run on that platfrom. General cleanup in documentation. Does not 'require(mva)' any longer. * anosim: corrected the equation in docs (function was correct). Thanks to Yong Cao for notifying this. * bioenv.formula: finds now variables from attach'ed data.frames and 'data' need not be specified. * capscale & deviance.rda: capscale was modified so that its result could be handled with step (added a terms component). Function deviance.capscale was deleted so that deviance.rda will be used. A literature reference to AIC in CCA/RDA was added to the documentation. * cca/rda/capscale: Small eigenvalues are made to zero and rank reduced accordingly. Most often influences 'capscale'. * cca/rda/capscale: Now alias constraints that are collinear with other constraints or conditions in partial analysis. New function 'alias.cca' to print aliased contrasts. NB this does not influence the proper ordination results, but only to the selection of biplot scores and centroids displayed. 'summary' no longer gives a redundant warning. * decorana: removes empty species with a warning instead of stopping with error. Still error with empty sites. The behaviour is similar to 'cca'. * envfit (vectorfit, factorfit): Has now a formula interface. Bottlenecks in permutation changed now into C functions. Much faster, in particular 'factorfit' which was 25 times faster in my tests. plot.envfit could drop names (dimensions). Now honours 'scaling' argument in cca/rda/capscale (used to 'scaling = 2' always). * envfit, ordisurf: have now weights parameter 'w'. Weights are used for the results of 'cca' and 'decorana' as default, or they can be supplied by the user. In this way, envfit gives equal results to biplot scores and centroids in 'cca', and ordisurf is consistent with envfit. Both can now access 'lc' scores of 'cca' etc. * estimateR: Abundance-based estimators of extrapolated richness, written by Bob O'Hara . * humpfit: Asesses now the dispersion parameter in non-Poisson models (summary.humpfit). Added a profile method that inherits from profile.glm, so that you can use plot.profile.glm, pairs.profile.glm and confint.profile.glm of MASS for displaying profile and finding the confidence intervals from the profile likelihood. * fisherfit: prints now standard error of the estimate. Added 'profile' and 'confint' methods. * metaMDS: A new function to collect all Peter Minchin's recommendations to run nonmetric multidimensional scaling: (1) adequate data transformation with Wisconsin double and sqrt if needed, (2) use of adequate dissimilarity measure, (3) possible stepacross if needed (this Minchin didn't have), (4) run NMDS with several random starts and stop after finding two similar solutions, (5) scale results with postMDS, and (6) add species scores with wascores. Function has print and plot methods. Function scores.default changed to understand metaMDS. * specpool: Chao is now based on unbiased equation. Standard errors now estimated for Chao, 1st-order jackknife and bootstrap richness, but SE of 2nd-order jackknife still missing. * vegdist: an option for binary indices, since some users believed these are not in vegan, although you can get them with 'decostand'. Version 1.6-4 (June 10, 2004) * Based on 1.7-12. * anova.cca: Changed defaults to beta=0.01 and perm.max=10000. * bioenv: A new function implementing the BIO-ENV procedure of Clarke & Ainsworth (Mar. Ecol. Prog. Ser. 92, 205-219; 1993). The function finds the subset of scaled environmental variables with maximum (rank) correlation with community data. * cca: added ter Braak scaling, a.k.a. Hill scaling, with negative values of `scaling'. This scaling should approximate Hill's non-linear rescaling of `decorana', but it the scaling is linear and does not rescale. The scaling is very simple: the results from corresponding positive scaling are multipiled with sqrt(1/(1-lambda)). * plot.cca: Better heuristics used for the length of biplot arrows, and they are now longer in general. Axes are drawn for biplot arrows also with `text.cca' and `points.cca' functions. * deviance.cca and extractAIC.cca: auxilliary functions which allow automatic model building with `step' or `stepAIC' (MASS) functions in cca and rda. Unfortunately, cca and rda do not have deviance or AIC, and these functions are certainly wrong and dangerous. However, with continuous candidate variables they select the variables in the same order as Canoco. * humpfit: A new family of functions to fit the no-interaction model (Oksanen, J., J. Ecol. 84, 293-295; 1996) to species richness -- biomass data. * vegdist: corrected a bug in Gower index -- range standardization was made to sites, but it should be done to species. Thanks to Brett Melbourne for the bug report. Version 1.6-3 (Mar 22, 2004) * Still based on 1.7-3, but ported some changes from version 1.7-7 (envfit, procrustes). This version was produced to prepare for incompatible changes in coming R-1.9.0. * vegan-FAQ: Does not show the vegan and R versions the documentations were built, because of stupid incompatible change in R-1.9.0 of the future. package.description() function was unnecessarily replaced with packageDescription, and to accomodate recent, present and future versions of R seemed to be too much hassle. * plot.envfit: Added option 'p.max' to display only environmental variables assessed to have P values less or equal to the given limit. * plot.procrustes: added option kind = 0 to draw only axes and functions points.procrustes and lines.procrustes to add points and line segments or arrows to the plot. Version 1.6-2: Based on devel version 1.7-3. * renyi: should work now (again?). * prestondistr: The truncation level was badly chosen. Now default level is set to -1, or log2(-1) = 0.5 which might be the left limit of the first octave. This is now a parameter, leaving the choice as the responsibility of the user. * cca.default: Removes missing species and issues a warning instead of stopping with error. Version 1.6-1: Based on devel version 1.7-1. * Minor maintanenance release to satisfy tests in R-devel. There was a buglet in ordisegments that caused a warning. I had introduced a trick to handle printCoefmat before it was invented to replace print.coefmat, but this failed in R-devel. * Vignettes included in this release. These were only in devel versions of my web pages previously. Version 1.6-0 (Fisher) * Based on devel version 1.5-58. Passes checks with R-1.8.0 and R-1.7.0 and compiles into a Windows binary. Many functions were contributed by Roeland Kindt (Nairobi, Kenya). * BCI: A new data set on tree counts on 1-ha plots in the Barro Colorado Island. Thanks to Roeland Kindt and Richard S. Condit. * capscale: A new function for [partial] constrained analysis of principal coordinates (CAP). * cca, rda: Can now handle cases where the number of constraints is higher than the number of species. * cca, decorana: Find now if data have empty rows or columns. * decostand: Added Chi-square transformation. * distconnected: A new function to find if vegetation data are disconnected below given threshold dissimilarity level. Utility function no.shared gives a logical dissimilarity matrix with values TRUE for cases with no shared species. * fisher.alpha: Should work with large sample sizes now (bug report thanks to Ariel Bergamini). * fisherfit, prestonfit, prestondistr: New functions to fit Fisher's logarithmic series and Preston's log-normal model. * make.cepnames: New utility function to change Latin names into 4+4 character CEP names. * ordicluster, ordispantree: New functions in the ordihull family to overlay a cluster dendrogram or a spanning tree onto an ordination. Weights are now really used with cca and decorana plots. * radfit: New function to fit Ranked Abundance Dominance or Dominance/ Diversity models with maximum likelihood: Pre-emption, log-normal, veiled log-normal, Zipf and Zipf--Mandelbrot models. * rankindex: Can now use stepacross and new dissimilarity indices of vegdist. * rarefy: Can now optionally find SE of rarefied richness. * renyi: A new function to find Rényi diversities or Hill numbers with any scale (thanks to Roeland Kindt). * scores.ordiplot: should be more robust now. * spantree: A new function to find a minimum spanning tree using only dissimilarities below a threshold or disregarding NA dissimilarities. * specaccum: A new function for species accumulation curves. Thanks to Roeland Kindt. * specnumber: A very simple utility function to find species richness. * specpool: New function for extrapolated species richness in a species pool, or for estimating the number of unseen species. * stepacross: New function for estimation of dissimilarities between sites that have no shared species. Implements both flexible shortest paths and their approximation known as extended dissimilarities. * vegdist: New dissimilarity indices Jaccard (finally), Morisita, Horn--Morisita and Mountford. Version 1.4-4 * Based on devel version 1.5-35. * decorana: Finds now eigenvalues from the final solution as ratio of biased weighted variances of site and species scores. The values returned by the legacy Fortran function are called ``decorana values''. * downweight: passes the downweighting fraction as an attribute, and decorana catches and prints the fraction. * wascores: Uses now biased variances for expading WAs and returns the shrinkage factors as an attribute "shrinkage". Shrinkage factors are equal to eigenvalues in CCA when only this one variable is used as constraint. Function `eigengrad' returns only these eigenvalues. * rda summary/plot bugfix: Failed with non-default scaling (1 or 3) when there were no factor constraints. Corrected a statement giving a harmless warning in plot.cca. * ordiplot knows now option type = "text". New simpleminded functions points.ordiplot and text.ordiplot for adding items in an ordiplot graph. * ordiarrows, ordisegments could drop dimensions (when will I learn!) and fail if only one arrow or one segment should be drawn. One argument was missing in a `gl' command in `ordigrid'. Version 1.4-3 (Luova) * Based on devel version 1.5-30 * `cca' and `rda' use canonical expansion of the formula and return the `terms' component. Functions like `terms', `formula' and `update' magically started to work with cca and rda (and eight lines of code would allow `step' and `stepAIC' to work magically in model building... but it's so much magic that I don't trust it). Some of the allowed things are now `mod <- cca(dune ~ . - Use, dune.env)' (all variables but `Use' in dune.env), and `update(mod, . ~ . - Manure)' (remove `Manure' from the previous). * `cca' and `rda' find centroids of factor levels with factor constraints (only with formula interface). These can be accessed with `display="cn"' in `scores', `summary' and `plot'. If `display="cn"' is requested in `plot', biplot arrows are still drawn unless there is a class centroid with the same name: continuous variables are still shown as arrows and ordered factors both as arrows as centroids. * Enhanced user control of many ordination plots. Some accept more graphical parameters (`ordiplot', `plot.procrustes'). New functions `points.cca' and `text.cca' to add these items into CCA/RDA plots (documented separately). * `identify.ordiplot' knows more alternatives, among them `plot.procrustes'. This was helped with new, very generic `scores.ordiplot'. * New functions to add graphical items in ordination diagrams: `ordihull' draws convex hulls for groups, `ordiarrows' draws arrows, `ordisegments' segments, `ordigrid' combines points in to a grid, `ordispider' combines points to their (weighted) centroids or WA scores to the corresponding LC score in cca/rda, `ordiellipse' draws dispersion or confidence ellipses for points. All these take a groups argument for selecting subsets of points. `ordispider' obsoletes `spider.cca' (introduced in the previous release). * Implemented simple ``deshrinking'' of weighted averages in `wascores'. * A new diversity function `fisher.alpha' that estimates the diversity as the alpha parameter of Fisher's log-series. Thanks to Bob O'Hara for the main code. * `summary.decorana' now in canonical form so that printing is done by `print.summary.decorana' and user can intercept and catch the result. Several users had been surprised of the earlier non-canonical behaviour. `summary' knows again the prior weights used in downweighting of rare species (these evaporated in 1.4-0). * rda summary/scores/plot bugfix: Scaling of site scores was wrong with scaling alternatives 1 and 3. * envfit (vectorfit, factorfit) bug fixes: Can now handle single vectors (labelling, permutation). Recognize now `choices' so that the user can select ordination axes. * Checked with released R-1.7.0. Version 1.4-2 Based on devel version 1.5-18 * New functions and data sets: * dune: A new data set -- the classic Dune Meadow data with the environmental data. * ordiplot, identify.ordiplot: New functions to plot "any" ordination result and identify plotted points. Intended to provide similar functionality as `plot', `plotid' and `specid' functions in `labdsv' without name clashes. Functions `plot.cca' and `plot.decorana' return (invisibly) `ordiplot' objects as well, and these can be used by `identify' to label species and sites. * rda: Redundancy Analysis, or optionally, yet another PCA. This is a spin-off from cca(), and it is documented together with cca. The only new functions are rda, rda.default, rda.formula and summary.rda. Otherwise rda uses cca methods which were changed to be aware of rda. * read.cep: A function to read Cornell Ecology Package or CEP formatted files into R. This has been in devel versions since 1.1-1, but it never made to the releases, since this worked only in Linux, but crashed R in Windows. It seemed to work in R-1.6.1 with gcc 3.2 (MinGW) in Windows, so it is included. Treat with caution. * spider.cca: A tiny function that joins each WA score to the corresponding LC score in cca/rda plots. Minor changes: * Checked with R-1.7.0 (unstable devel version, snapshot 2003-02-05) and corrected as needed. * Added symmetric scaling (=3) to alternitves in cca and rda. * Minor improvements and bug fixes in vegemite. Version 1.4-1 (Logan) Based on devel version 1.5-10. New features: * Permutation tests added to envfit (vectorfit, factorfit) and procrustes (called protest). * All permutation tests take now argument strata: If given, permutations made only within strats. Concerns anosim, anova.cca (permutest.cca), mantel, envfit (factorfit, envfit) and protest (in procrustes). * fitted.procrustes(): A new function. * rarefy(): A new function for rarefaction species richness. Other changes: * cca.default(): Handles now NULL matrices X and Z: skips them. * cca.formula(): Knows now cca(X ~ 1) and permforms unconstrained CA, and cca(X ~ ., data) and perfors CCA using all variables in `data' as constraints. Has now na.action=na.fail so that cca crashes more informatively (used to crash mysteriously). A more graceful na.action may come. Assignment "=" corrected to the true blue "<-" (used to crash in old R). * envfit (factorfit, vectorfit): Use `scores' now. Various bugfixes and should work now with single factors or vectors. * plot.envfit(): Options `choices' works now like documented. * ordisurf(): A new name to surf() to avoid name clash with labdsv. * procrustes(): added option `symmetric' for symmetric rotation and goodness of fit statistic. * plot.procrustes(): Keyword `axes' changed to `choices' to be consistent with other functions. * vegemite(): A new name to vegetab. The name was chosen because the output is so compact (and to avoid confusion with function vegtab in labdsv). Function checks now that the cover codes fit in one column and splits the output if it does not fit into used page width. Version 1.4-0 Based on devel version 1.3-19. New functions: * `anosim': Analysis of Similarities. * `cca': [Partial] [Constrained] Correspondence Analysis. This is an alternative to Dray's `CAIV' (package `CoCoAn'). Differences include formula interface, WA scores in addition to LC scores, partial CCA, residual CA after constraints, algorithm based on svd (and much faster), more standard support functions (`plot', `summary', `print'). * `anova.cca' and `permutest.cca': Permutation tests for `cca'. * `envfit': A new wrapper function which calls either `vectorfit' or new `factorfit' function, and `plot.envfit' for easier display of results in graphs. * `mantel': Mantel test for two dissimilarity matrices. * `scores': A generic function to extract scores from `cca', `decorana' or even from some common ordination methods in R. * `surf': Surface fitting for ordination, intended as an alternative to `vectorfit'. * `vegetab': Prints a compact, ordered vegetation table, together with `coverscale' to transform data into compact format. Other changes: * `downweight': directly callable instead of being embedded in `decorana'. Now it can be used with other downweighting thresholds or with other CA's than `decorana', e.g., `cca', `ca', `CAIV'. * `plot.decorana': new keyword `type', removed keyword `tol'. * `vectorfit': centres now ordination before fitting, so it will work with other ordinations than MDS. * Mainly user invisible changes in `plot.decorana', `plot.procrustes', `postMDS', `print.summary.procrustes', `vectorfit', `procrustes'. One of the main changes was that `eqscplot' of `MASS' library was replaced with `plot(..., asp=1)' of standard R (but this is not S-plus compliant). * Edited help files. More examples run from help files. * Tried to improve LabDSV compliance, see http://labdsv.nr.usu.edu/. * Checked with R-1.5.0. However, `log' in diversity not changed into `logb' (yet), although base is specified, because `logb' won't work in R pre-1.5.0. Version 1.2-1 * Checked with R-1.4-0 (frozen snapshot) tools: Documentation and method consistency corrected (summary.decorana.R, decorana.Rd), and file permissions changed. * decorana.Rd: removed dependence on package `multiv' in the example, since it is not a `recommended package' -- replaced with `decorana(..., ira=1)'. Version 1.2-0 Based on experimental version 1.1-6. Doesn't include read.cep() of the experimental version, because the function is certainly unportable to all platforms (works on Red Hat Linux 7.1, but perhaps nowhere else). Major new feature: * decorana(): R port of Mark Hill's DECORANA for Detrended correspondence analysis, with methods print(), summary() and plot(). Minor changes: * postMDS(): finds isoMDS scores and doesn't destroy list structure. * vectorfit: finds isoMDS scores and decorana row scores (which are uncentred, though). * Proof reading in documentation. Version 1.0-3 *`plot.procrustes': selection of axes plotted, improved scaling in graphics, control of axis labels. * `postMDS': added plot to demonstrate half-change scaling. * `procrustes': target can now have lower dimensionality than rotated matrix. Version 1.0-2 * Fixed bugs in documentation. * `plot.procrustes': Fixed passing `...' to graphics functions. Version 1.0-1 * The first public version.