[med-svn] [r-cran-vegan] 01/05: Imported Upstream version 2.3-5

Andreas Tille tille at debian.org
Thu May 19 21:34:21 UTC 2016


This is an automated email from the git hooks/post-receive script.

tille pushed a commit to branch master
in repository r-cran-vegan.

commit ea8b48fc4c117b3f90cfef1b566472792ccec079
Author: Andreas Tille <tille at debian.org>
Date:   Thu May 19 23:20:03 2016 +0200

    Imported Upstream version 2.3-5
---
 DESCRIPTION                   |   15 +-
 MD5                           |  146 ++--
 NAMESPACE                     |    4 +-
 R/add1.cca.R                  |    2 +
 R/adonis.R                    |    7 +-
 R/anosim.R                    |    9 +-
 R/anova.cca.R                 |    2 +
 R/anova.ccalist.R             |    9 +-
 R/betadiver.R                 |    2 +-
 R/bioenv.default.R            |    4 +-
 R/calibrate.cca.R             |    2 +-
 R/capscale.R                  |    4 +
 R/drop1.cca.R                 |    2 +
 R/eigenvals.R                 |   13 +-
 R/estaccumR.R                 |    2 +-
 R/gdispweight.R               |    1 +
 R/howHead.R                   |    4 +-
 R/lines.procrustes.R          |   13 +-
 R/linestack.R                 |    9 +-
 R/metaMDS.R                   |    8 +-
 R/mrpp.R                      |    4 +-
 R/mso.R                       |    9 +-
 R/ordiArgAbsorber.R           |    2 +-
 R/ordiR2step.R                |    2 +
 R/ordiareatest.R              |    4 +-
 R/ordicluster.R               |   11 +-
 R/ordiellipse.R               |    2 +-
 R/ordistep.R                  |    2 +
 R/points.procrustes.R         |   22 +-
 R/rarefy.R                    |   19 +-
 R/renyiaccum.R                |    1 +
 R/rrarefy.R                   |   16 +-
 R/simper.R                    |    4 +-
 R/specpool.R                  |   23 +-
 R/treedist.R                  |    5 +
 R/treedive.R                  |    6 +-
 R/treeheight.R                |   23 +-
 R/tsallisaccum.R              |    1 +
 R/vegandocs.R                 |   37 +-
 R/vegdist.R                   |    4 +-
 R/zzz.R                       |    2 +-
 build/vignette.rds            |  Bin 288 -> 347 bytes
 inst/NEWS.Rd                  |  172 +++++
 inst/doc/FAQ-vegan.R          |    6 +
 inst/doc/FAQ-vegan.Rmd        |  700 ++++++++++++++++++
 inst/doc/FAQ-vegan.html       |  911 +++++++++++++++++++++++
 inst/doc/FAQ-vegan.pdf        |  Bin 148353 -> 0 bytes
 inst/doc/NEWS.html            | 1633 -----------------------------------------
 inst/doc/decision-vegan.Rnw   |    2 +-
 inst/doc/decision-vegan.pdf   |  Bin 342248 -> 342272 bytes
 inst/doc/diversity-vegan.pdf  |  Bin 365321 -> 365179 bytes
 inst/doc/intro-vegan.pdf      |  Bin 234771 -> 234604 bytes
 inst/doc/partitioning.R       |   34 +
 inst/doc/partitioning.Rnw     |   80 ++
 inst/doc/partitioning.pdf     |  Bin 62541 -> 137301 bytes
 man/cca.Rd                    |   23 +-
 man/clamtest.Rd               |    2 +-
 man/diversity.Rd              |   12 +-
 man/mso.Rd                    |   13 +-
 man/nestedtemp.Rd             |    2 +-
 man/oecosimu.Rd               |    3 +-
 man/plot.cca.Rd               |   10 +-
 man/procrustes.Rd             |   12 +-
 man/rarefy.Rd                 |   25 +-
 man/simper.Rd                 |    4 +-
 man/specpool.Rd               |   23 +-
 man/varpart.Rd                |   28 +-
 man/vegan-internal.Rd         |    2 +-
 man/vegan-package.Rd          |   35 +-
 man/vegandocs.Rd              |   85 +--
 src/monoMDS.f                 |   12 +-
 vignettes/.install_extras     |    2 -
 vignettes/FAQ-vegan.Rmd       |  700 ++++++++++++++++++
 vignettes/FAQ-vegan.pdf       |  Bin 148353 -> 0 bytes
 vignettes/FAQ-vegan.texi      |  829 ---------------------
 vignettes/Makefile            |   15 -
 vignettes/NEWS.html           | 1633 -----------------------------------------
 vignettes/decision-vegan.Rnw  |    2 +-
 vignettes/decision-vegan.tex  |  817 ---------------------
 vignettes/diversity-vegan.tex |  964 ------------------------
 vignettes/intro-vegan.tex     |  620 ----------------
 vignettes/partitioning.Rnw    |   80 ++
 vignettes/varpart23.pdf       |  Bin 0 -> 28057 bytes
 vignettes/varpart4.pdf        |  Bin 0 -> 28442 bytes
 84 files changed, 3078 insertions(+), 6870 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index f598246..861e15d 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,20 +1,21 @@
 Package: vegan
 Title: Community Ecology Package
-Version: 2.3-1
-Date: 2015-09-24
+Version: 2.3-5
+Date: 2016-04-08
 Author: Jari Oksanen, F. Guillaume Blanchet, Roeland Kindt, Pierre Legendre, 
    Peter R. Minchin, R. B. O'Hara, Gavin L. Simpson, Peter Solymos, 
    M. Henry H. Stevens, Helene Wagner  
 Maintainer: Jari Oksanen <jari.oksanen at oulu.fi>
-Depends: permute (>= 0.8-0), lattice, R (>= 2.15.0)
-Suggests: parallel, tcltk
+Depends: permute (>= 0.8-0), lattice, R (>= 3.0.0)
+Suggests: parallel, tcltk, knitr
 Imports: MASS, cluster, mgcv
+VignetteBuilder: utils, knitr
 Description: Ordination methods, diversity analysis and other
   functions for community and vegetation ecologists.
 License: GPL-2
 BugReports: https://github.com/vegandevs/vegan/issues
-URL: http://cran.r-project.org, https://github.com/vegandevs/vegan
+URL: https://cran.r-project.org, https://github.com/vegandevs/vegan
 NeedsCompilation: yes
-Packaged: 2015-09-24 08:02:30 UTC; jarioksa
+Packaged: 2016-04-08 11:49:44 UTC; jarioksa
 Repository: CRAN
-Date/Publication: 2015-09-25 16:36:22
+Date/Publication: 2016-04-09 00:53:13
diff --git a/MD5 b/MD5
index ee62634..e9572c0 100644
--- a/MD5
+++ b/MD5
@@ -1,5 +1,5 @@
-892d33e3f1891ca722425eb3285de1b8 *DESCRIPTION
-74e30d6065203c6637702eb35845f898 *NAMESPACE
+262e49ed1a1d0652c5e0fcf01219bc03 *DESCRIPTION
+f03b4540cc1c0730cd76b342676a07ae *NAMESPACE
 4b8531b446af54510e5fb31f841aed2f *R/AIC.radfit.R
 e9814d051bdf49db5606399ac3a4704e *R/CCorA.R
 6d37bd49a8a0048cbb7ff8f49487ba63 *R/MDSrotate.R
@@ -10,18 +10,18 @@ b16c440e6425bb8275af82740c88b06c *R/SSgitay.R
 5c50828bd1466847e54ffd44ddf62df0 *R/SSgleason.R
 e4754677764163b028ce3237d9b4a11b *R/SSlomolino.R
 d80688d78aba3cd9367ffaaaec6ec252 *R/TukeyHSD.betadisper.R
-52870b88f88d3ddab1056e03e5036727 *R/add1.cca.R
+7119c3a30046011fc164ebde2dd624bc *R/add1.cca.R
 0f953ea124a0d579b79d32974961ec87 *R/ade2vegancca.R
 3fea698281bc0b4c3a5ad26f4d44d0e2 *R/adipart.R
 385380b5137c957be9f03e464100faa4 *R/adipart.default.R
 05387ee9e552fcec123b4b922e837eaa *R/adipart.formula.R
-39e31afea454392fd69d2dbcc2f4e4ef *R/adonis.R
+23af28a7ddb2957549409a1e80481b82 *R/adonis.R
 7331b1428563ed9add00b088b50617fd *R/alias.cca.R
-0252a177ecb7705c3ce3e4157d3fa930 *R/anosim.R
+4bdae1555a954b5266ac30300783ffd8 *R/anosim.R
 a4f23289c4a5eab2a3587292b306d497 *R/anova.betadisper.R
-8f7a12b9419460caab8c963484d48a9d *R/anova.cca.R
+ebcfa2c586bdb2d7f4756a44670fcb89 *R/anova.cca.R
 e5ca7c161ec8be59955e3c761828417c *R/anova.ccabyterm.R
-14ae37479048f37047826b0b60f973a7 *R/anova.ccalist.R
+cd3fff81e381b3eb800e36042f766252 *R/anova.ccalist.R
 41393fc55cc5e6a0ec3f12e18e086fd2 *R/anova.ccanull.R
 7fab08bcc596df60a22c4b04c8507121 *R/anova.prc.R
 6fb2bf929aed44ef41bfd4dfc6e010cc *R/as.fisher.R
@@ -37,10 +37,10 @@ a7f01bd69394d5554cf10279a2690080 *R/as.preston.R
 704239604b0ed8420cb22a31b28a01d3 *R/as.ts.permat.R
 fbec6d133dea10372ce082c7035a8ab2 *R/beals.R
 72c63138e0fdd6c5a6e37bb0e24fa95e *R/betadisper.R
-e7b33dc3a8b3c35424fe06cb6e2a7a8b *R/betadiver.R
+a57f498db59e6daea477a052b7f8d901 *R/betadiver.R
 46ae3f75a0b483fecab589637d72a307 *R/bgdispersal.R
 4603ea944d470a9e284cb6cab6d75529 *R/bioenv.R
-8da08aa374ef829ccd69302d71181dca *R/bioenv.default.R
+68f7dc3b2c6c698c3288605c90f5cd80 *R/bioenv.default.R
 abe03a297a6200d9b48b38c6d92333aa *R/bioenv.formula.R
 4dbe9f135fadbba3f6939d64a5bb0e29 *R/biplot.CCorA.R
 f22e634bf8399d7edb1fe05845921ccf *R/biplot.rda.R
@@ -54,9 +54,9 @@ b5a4874f7763f1793b3068eec4e859d5 *R/bstick.default.R
 2ad6f2071ad822c631e04705df2b245c *R/bstick.princomp.R
 b98443c6f47168edc9fd96e8a30c82e1 *R/cIndexKM.R
 a6df607186ceb18d204494b6a33816d4 *R/calibrate.R
-f093f401495379d30354e6424606190a *R/calibrate.cca.R
+0f9d81a8d4474972499f42a2e9ddf96c *R/calibrate.cca.R
 f56b52d53b17c7dc8d8c9accd5a3401a *R/calibrate.ordisurf.R
-cfade23914ea7a85bd1edf32617dd497 *R/capscale.R
+5396cfd628eccfbba4820aef5c9ed7d9 *R/capscale.R
 52b06d758d53934d0b67b4e7653dc3dd *R/cascadeKM.R
 2e09a82ec52e211afc2ac6e8d4b40898 *R/cca.R
 fe3b7320b434d46d2308d880ef26787a *R/cca.default.R
@@ -82,13 +82,13 @@ e5b54fa580331ab24d28dc59110c45fe *R/designdist.R
 cafeabc2133997b3381c9edf6a971abf *R/distconnected.R
 51c2b04636ee7131d379d5aa2b3c7877 *R/diversity.R
 00136d6f9d6dd5ca16db7633eceb4e92 *R/downweight.R
-9da15140e3eaffaa63ca738b008f8f83 *R/drop1.cca.R
+54fbab991f938a0c3e9353121cc34fec *R/drop1.cca.R
 79c66a10794aacaf08f1d28192228bea *R/eigengrad.R
-be739eb24b369efbdaefa03537a5418c *R/eigenvals.R
+f09f2e7694c28ed5c377145443edb301 *R/eigenvals.R
 17a62527ee103c09bfba0c851ab12560 *R/envfit.R
 abdc99957cd34d0c5f79ca1d9dd68c68 *R/envfit.default.R
 1ef64854841e194d35484feffe7914e5 *R/envfit.formula.R
-f76323e8a2b239aec6cc9930bcb712b5 *R/estaccumR.R
+0b5f742d4f302ab12c17fe3fc3e3deee *R/estaccumR.R
 81098475867f802dea0565fe426c9fc5 *R/estimateR.R
 cf0a0bf7116ef7a21e090d0c1a76f8d0 *R/estimateR.data.frame.R
 1ae8328aa077ec86d41eb74d12270bb2 *R/estimateR.default.R
@@ -105,7 +105,7 @@ ee2e3daa463fb46ffce01206f8b44fa5 *R/fitted.cca.R
 0080b65cfd48bac5e53961b8e12682e5 *R/fitted.procrustes.R
 892cc9bf94b232f6a5c2936ea4f63592 *R/fitted.radfit.R
 4fa5eb43fa72a6e09773888ba01d4668 *R/fitted.rda.R
-c716cff48e68d6b1d74eaefde86f4cd8 *R/gdispweight.R
+9af5bead3fcebce9c225681044652ac1 *R/gdispweight.R
 76b1ffb784bab6671ebaa51c3b4bdb0b *R/getPermuteMatrix.R
 57c9a7ccff6a9c066b2aba3475f2330b *R/goodness.R
 aa3a75ac055af0ac8cf6347c87b2cf3b *R/goodness.cca.R
@@ -115,7 +115,7 @@ d17f4f6be45b52e01cd605b09b56a80a *R/hierParseFormula.R
 3d19236ee5dd2f1c678061773895e86f *R/hiersimu.R
 3ba5159beba75e010720f18116fbd919 *R/hiersimu.default.R
 edf53c3358944421756412b991432bd7 *R/hiersimu.formula.R
-a3049ce03c99ec8ecd11b96a9da214c1 *R/howHead.R
+d10f4168f5119180dfd4a7bf57f444d6 *R/howHead.R
 d02fc9c672a9b2c4a31065702a3381be *R/humpfit.R
 1637bd10b39801c14b65656f29dafcf1 *R/identify.ordiplot.R
 9e731fa2cfb821bbe7ed62336d5fa3b3 *R/indpower.R
@@ -130,25 +130,25 @@ c63972a171f76f92652feeb2daf30e82 *R/isomap.R
 131b9e9e84f94acdf044430143e19ac8 *R/lines.humpfit.R
 f1d30acca998f0fe17e8363203f1b920 *R/lines.permat.R
 eb4e11e71eeefa6ec64e4a2580b8af75 *R/lines.prestonfit.R
-a5d9b7fa31477efc0a1ff76a62988a8e *R/lines.procrustes.R
+27a5c4e66e0c7d54f458904b596cc7e1 *R/lines.procrustes.R
 39604c069428cda7c9d2ed199ac4e28a *R/lines.radline.R
 9a9366b4e132861f1671e5617930b012 *R/lines.spantree.R
-f92ed9f1da4790e02a3fcfc1c199a539 *R/linestack.R
+34d6aa49317a7ed2dcf2a598252efa3b *R/linestack.R
 1dcc7e0504b5468a3bb2253924901e50 *R/make.cepnames.R
 8a269b68b5abd56f36fdb59a8c142210 *R/make.commsim.R
 f25f916c75667aa6eb64136817e79256 *R/mantel.R
 fdb2f4786b31866197c80d827584edaf *R/mantel.correlog.R
 3e005ec1cc5a4231ee7c470cb30df01b *R/mantel.partial.R
 e054f13ad65a7f2616561c73557b412b *R/meandist.R
-18e8baa91c8536766ae5193e6478515f *R/metaMDS.R
+0f8b31e3a2303b80dac2f68784745323 *R/metaMDS.R
 4b0744e9e9fa385991c9cafcf0abd222 *R/metaMDSdist.R
 0b5c1f0bdf937223613e4c6b6e74764e *R/metaMDSiter.R
 f63315501ad2f3a96dee9ee27a867131 *R/metaMDSredist.R
 928df675822d321e4533ba2b7cf0c79f *R/model.frame.cca.R
 9406148bd2cfa3e74b83adfe24858c46 *R/model.matrix.cca.R
 443471a651954a1869401c12d3936fe9 *R/monoMDS.R
-528542809ec4d03983643eaa92d3a4d9 *R/mrpp.R
-28dd509e9e35512169e010d30cfa635b *R/mso.R
+6d34db023ade607438d62d041a14fb12 *R/mrpp.R
+bb6dfd6874ec47d875dc3042e822e459 *R/mso.R
 7e428f1adfdae287a1d64a79c6f2c3bc *R/msoplot.R
 7c219818ce5841e957db47f16986080b *R/multipart.R
 9b638597fb52736dc7c3b1c1e31f8726 *R/multipart.default.R
@@ -164,19 +164,19 @@ e7ddbbc85fd1a656e4343f5469621124 *R/nestedtemp.R
 9c89764ae10460148c1dcf9d25e05649 *R/nullmodel.R
 a9b2db1c561cef462be0939cdcc2b090 *R/oecosimu.R
 7b3988a207ecfe1ea574c5857ffcd2a3 *R/orderingKM.R
-e3d108eed97633040fa22c2b384e19e4 *R/ordiArgAbsorber.R
+fe4f72fa1928f93c92840af2ae08b52e *R/ordiArgAbsorber.R
 ffd002ae0ed83062dabb963f02f3c854 *R/ordiArrowMul.R
 1f50c54490f6cbfa7300255219939ccb *R/ordiArrowTextXY.R
 1d06482d11f1e2ebd41a61a07ad97dd1 *R/ordiGetData.R
 99c1ec285e2afe4fb8beccbd507a123e *R/ordiNAexclude.R
 045e89399470e8c72a875570e1229bf2 *R/ordiParseFormula.R
-b091e26890dca94566654e06cb07d71b *R/ordiR2step.R
+c27474e73a1f151539f5a663bd390c7f *R/ordiR2step.R
 7757339f5b8899cb54f13da274abda66 *R/ordiTerminfo.R
-1989346a0f2bd9284ef442d1e2511c68 *R/ordiareatest.R
+19f1264c85545c30ab0dbe044e8689cd *R/ordiareatest.R
 e06d56a6e7d47767b9e71a73cbd3a80b *R/ordiarrows.R
 85f3047b80ab9a2ea57dd7935d07b583 *R/ordicloud.R
-793f91b9bf7c35f335949121d6f317c9 *R/ordicluster.R
-4547cf33b1c9f6c010dec7f613d6ca91 *R/ordiellipse.R
+fbac9ffef8d6734caaed82577e3c672e *R/ordicluster.R
+15f64711cfb3e9800f0b6aaedf72735b *R/ordiellipse.R
 c253906529c77aead16b293275f1afc3 *R/ordigrid.R
 b71c80707ad2e1160f2480b5c1787c12 *R/ordihull.R
 208b0fe7875e5c79cd400970406a44ce *R/ordilabel.R
@@ -188,7 +188,7 @@ e57a2b904e572829a5fd97f5b6576644 *R/ordiresids.R
 41949d4c859f08bc5a978791d387d1a4 *R/ordisegments.R
 03fd63d78c762930fd87ec787d9d4bac *R/ordispider.R
 1de439b5ffaf18640e08fadcaf7193ee *R/ordisplom.R
-189eb9be55c6527f693925348b63c87d *R/ordistep.R
+c8316cf02745d66e730cdd6b9d62375e *R/ordistep.R
 a6108f550b749db7139b143cc9e36c9c *R/ordisurf.R
 da612e647de9c2a0dd853bec899ea620 *R/orditkplot.R
 bc3671e5b7a30e2849d3b59f65783c97 *R/orditorp.R
@@ -248,7 +248,7 @@ b5661457c540b56e77eba97b8b290a91 *R/points.humpfit.R
 a0e1e2d579fa8c1992a26a2e8d435750 *R/points.metaMDS.R
 a54bcddf1b7a44ee1f86ae4eaccb7179 *R/points.ordiplot.R
 e352171f478eb27cf4a875cc3a1693fc *R/points.orditkplot.R
-7409704e2e94cd051524e8c5af3bdcb4 *R/points.procrustes.R
+d30277aec2fdeea8473e00ebe318be0a *R/points.procrustes.R
 80d9cee7ff1fa7ee8cb18850711a14b2 *R/points.radline.R
 06defcf59464ba92af271dca87943029 *R/poolaccum.R
 91aa7fd2fbd99f8e325932d59886dac7 *R/postMDS.R
@@ -335,7 +335,7 @@ b129148e6efbbe1c45482c93d66f959b *R/rad.null.R
 36cfb246e391a7434c714fbb2269cdb6 *R/radlattice.R
 7608e7f23ebe04e3a7ea6e5fe384c431 *R/rankindex.R
 4b9d8d8e7c684ec95d0676f6dabb354f *R/rarecurve.R
-3afd2bf3e85bdc553ef5e24436a4788b *R/rarefy.R
+05a28bb5983bafed95bd827dc6fdd2b0 *R/rarefy.R
 9c65025c61d4c25ce25234533e7b14c6 *R/rareslope.R
 d9a219ae6f3e6155ae76bc59d3e14d30 *R/raupcrick.R
 8116cefb40383fb571abb9fb82091087 *R/rda.R
@@ -343,10 +343,10 @@ d9a219ae6f3e6155ae76bc59d3e14d30 *R/raupcrick.R
 90b562e8a94febce8430a344392a2943 *R/rda.formula.R
 66f9447f8ac8388ac02c39aa1f5db95a *R/read.cep.R
 ef65ea5fb624aef7e34284d932503876 *R/renyi.R
-a36c4cc88624a9e45103f656f9eaa491 *R/renyiaccum.R
+3af80e7b694a975fcaf69f53bba241eb *R/renyiaccum.R
 90a897e14094cc1eba66c5f59a5bb79c *R/residuals.cca.R
 38df11064481bc21f8555152cfd3d115 *R/residuals.procrustes.R
-4ffd3879dcf18d0bdef8ffc8bf5b8ad3 *R/rrarefy.R
+3d4d41203c08b11773e55cffb0c34b75 *R/rrarefy.R
 c94cf53d2345f590de45c0f9db6fe272 *R/scalingUtils.R
 ed66f1e11f53f7fbdbd8663de2b7f5dd *R/scores.R
 d46cc2163dbc117a978f64d54df7bbd4 *R/scores.betadisper.R
@@ -367,7 +367,7 @@ d703f32e3ad9459232643e2293edf9d4 *R/scores.rda.R
 3fe910b739d447ba5026f077cb0c670d *R/screeplot.prcomp.R
 66d8c6dfecb51ca1afdf309926c00d08 *R/screeplot.princomp.R
 96e51f8fd78641579487ed079ee51170 *R/showvarparts.R
-ea0a7e941a445235273790efa4b295b9 *R/simper.R
+9cb0fc3a15596992bff286c98c8f9650 *R/simper.R
 b35ee7d9cdc86eecefb5dcf478fc8abf *R/simpleRDA2.R
 6670475eff913b3586560d4b2ec65149 *R/simulate.nullmodel.R
 a5e793142ae74276a02e761cfe255f22 *R/simulate.rda.R
@@ -375,7 +375,7 @@ a5e793142ae74276a02e761cfe255f22 *R/simulate.rda.R
 f4554cf72cc501fad09662c612b1c34c *R/spantree.R
 03330c53fd06adc913961918f0f55c32 *R/specaccum.R
 3c94a17c2602903234a65cb244053130 *R/specnumber.R
-5c1e01f3022cc628895666a5e3b35074 *R/specpool.R
+4899dc4b2bcaf5c269cbd0f69cb3fc12 *R/specpool.R
 77cc19684e9ceb27500ca7f802923328 *R/specpool2vect.R
 d24743b3fb58c8a195608e814eeed02c *R/specslope.R
 2cf0545588fb2bb86185f71c21bda1c5 *R/spenvcor.R
@@ -412,11 +412,11 @@ c103958b08a39e45f44ed5b55c380d25 *R/text.cca.R
 846003f5f9de23241805042ac459ed1d *R/text.orditkplot.R
 0fc7a75cf414d76cc751cc33ed5d6384 *R/tolerance.R
 7a3aedecb5fc64e07b919d867321a4ba *R/tolerance.cca.R
-7b45ffae615add899174090372c90188 *R/treedist.R
-1400038a7df6468da830bc75782d3873 *R/treedive.R
-cf0f2cbf17bbd944d455f71918ab88eb *R/treeheight.R
+48c49511d26ea0e18e752198ecde97ba *R/treedist.R
+54b0bf2548f7912cf4c10d4552d58efc *R/treedive.R
+b7181b8d28c9da1019a0b2fe5f117e05 *R/treeheight.R
 26fffea5380da4106dfe1f97681524cd *R/tsallis.R
-0093be881d1f7a8f7aa592bcc7f42a08 *R/tsallisaccum.R
+45f807b2d58c564c147978ac72de8546 *R/tsallisaccum.R
 78a5b5292f78b0fd84b943dceddceb97 *R/update.nullmodel.R
 4a337cc0efb81cf89aa2aeafcf695b54 *R/varpart.R
 8d09b6b6390c2866234763beae855cf3 *R/varpart2.R
@@ -427,8 +427,8 @@ cf0f2cbf17bbd944d455f71918ab88eb *R/treeheight.R
 593e3e9774284bfc0362a5c0b0b2fbcc *R/vegan-deprecated.R
 129a1cf5e913a365ffd679b63378811b *R/veganCovEllipse.R
 5656cc97f30992a5e02dba21b2846485 *R/veganMahatrans.R
-bd27a53ddee749358d854ed5daef715c *R/vegandocs.R
-0f163ee6f1ede80946907518f7cd52ea *R/vegdist.R
+d52de59290b2eced0f79926ea655652c *R/vegandocs.R
+da1732f7e84a448d32d929d00c9f2bc6 *R/vegdist.R
 b1855fd70cd8c70e9b480605297bcc63 *R/vegemite.R
 5d6047d7f63f04ae9ff40179c534aa0b *R/veiledspec.R
 4d0f113e697fb166ba912ac34b40b3dc *R/vif.cca.R
@@ -438,8 +438,8 @@ ecfd48e2f4df6bcd683a87203dd80e12 *R/weights.cca.R
 76c939e9fe7776e51eeabc1d44be83cb *R/weights.decorana.R
 73babeed9df14635d99b1a619a1286e4 *R/weights.rda.R
 4138f57726620d493f218e5e3da0013c *R/wisconsin.R
-17cbf4b5c186fe577cf361f0254df1d6 *R/zzz.R
-5aade318f4f03a71719d64ab1887b212 *build/vignette.rds
+678368022e0d66a4fd7722ab6bcc8beb *R/zzz.R
+bf482d265609ebdc74921368caf131a8 *build/vignette.rds
 45a61c1583ecb67f7191a0b0be901a77 *data/BCI.env.rda
 0f283f2be37fdfec65ec6e5b0146889c *data/BCI.rda
 412ea5cf443401fe54f0b14c14c45806 *data/dune.env.rda
@@ -455,20 +455,23 @@ ee3c343418d7cf2e435028adf93205f1 *data/sipoo.rda
 f87df84297865b5faf31e232e97a0f94 *data/varechem.rda
 7136b8666250a538d60c88869390a085 *data/varespec.rda
 1fb35aec7042529e18e4673818fecf7f *inst/ChangeLog
-231bbdc502baaee9a6b80356a5d51921 *inst/NEWS.Rd
+82b7c27d3e1042056a3f85bcf8b20f35 *inst/NEWS.Rd
 9abfab8b05c34dd283379a7d87500ffb *inst/ONEWS
-194655c013a9a2839753e00575c8e7e9 *inst/doc/FAQ-vegan.pdf
-13e6253c9f4dec73158cf434a250d7e7 *inst/doc/NEWS.html
+b21accfb0a73075d80634960e461ac7e *inst/doc/FAQ-vegan.R
+f986cedbb0f80cd1bdc50b53a87154a2 *inst/doc/FAQ-vegan.Rmd
+9ddaa4c26242a0722273755cb80ec754 *inst/doc/FAQ-vegan.html
 e3e19be6e4226ef4b943c5dd46c3e161 *inst/doc/decision-vegan.R
-09c81618a5a91cbfc5e8c3d969dc63fd *inst/doc/decision-vegan.Rnw
-81876be3de1e6199d6258f401b7ed523 *inst/doc/decision-vegan.pdf
+5d19c22cfbe24cb0b05cd31e46c5fc70 *inst/doc/decision-vegan.Rnw
+c7d9fa2da61c5116a9d3a447657ce01f *inst/doc/decision-vegan.pdf
 41fae44349a8a602825bddba8750102d *inst/doc/diversity-vegan.R
 06cfa11a83ca0330979d500549f2415a *inst/doc/diversity-vegan.Rnw
-a2e447b29cea2361c51706a77f8d5328 *inst/doc/diversity-vegan.pdf
+bef1b2e7297f77c3279d0b1588516f8e *inst/doc/diversity-vegan.pdf
 42c6873fda4c73ed0ccdeddef41563b2 *inst/doc/intro-vegan.R
 ddee3279ac0982a3da0bcf9fc10947ac *inst/doc/intro-vegan.Rnw
-d561dab81fbc28b5b51a85e664d49321 *inst/doc/intro-vegan.pdf
-a1c35ea488b715441cd2269eb6998945 *inst/doc/partitioning.pdf
+fe672cbf88fa43e7f6cf58d0252ba114 *inst/doc/intro-vegan.pdf
+d56c6fb7eaff59b945aad2459b96bce7 *inst/doc/partitioning.R
+5b17ce6c86e3334b796a658328d426f9 *inst/doc/partitioning.Rnw
+937569b6523de607587795e92e2dc714 *inst/doc/partitioning.pdf
 fa807ecb01eb4910956e4e1f5f29c437 *man/BCI.Rd
 d4d97e3b71561f61bd9f1f0686a57434 *man/CCorA.Rd
 e540cd18b5f99d385a8d2945052dc70e *man/MDSrotate.Rd
@@ -489,9 +492,9 @@ b04c2fae35dba2d97cb248814d5e2fe9 *man/bgdispersal.Rd
 783cc695729b9ce5ce9331944337541f *man/biplot.rda.Rd
 88602656153ee95f10335487273e132d *man/capscale.Rd
 644e253ebcab91a5ddce85294dda278d *man/cascadeKM.Rd
-56460c2a89a5c140945015515a7093d3 *man/cca.Rd
+aabb7dbe6885e0362b5c92a47c856b54 *man/cca.Rd
 9a2708af1831b9ddce1004971b6f4efc *man/cca.object.Rd
-d808372c406b8d0ede9e26623655ac08 *man/clamtest.Rd
+b97d41cd8bf114b7ca7560b4dd9e58e6 *man/clamtest.Rd
 362992febcb1479b750a995203626e40 *man/commsim.Rd
 335d0f7691ad9d0c48fffce9f9db6201 *man/contribdiv.Rd
 c41033fb9c572365490cc23b9870c950 *man/decorana.Rd
@@ -501,7 +504,7 @@ c01e0664652fbc8ef4963059bee4e422 *man/deviance.cca.Rd
 f58b474141a1b0fdf438bfe6dd8da0c9 *man/dispindmorisita.Rd
 70c0ef1ef267a37e2677476a43b72265 *man/dispweight.Rd
 f3f742efa7511a4c33108a00b512ebd9 *man/distconnected.Rd
-7d05cf2b4cb7fbaec9e37b7fa3a3d981 *man/diversity.Rd
+0a67f0ca537d4b8ed97297fa9eb9fefa *man/diversity.Rd
 08b96c1a45c11ffcb7f0da33a888421a *man/dune.Rd
 91fa409075b3bd64706c8ff380b3d01d *man/dune.taxon.Rd
 5f5f8c7df063606ccde6124c5dbe8add *man/eigenvals.Rd
@@ -523,12 +526,12 @@ e598d23fdc8a162bb793a3aa774559b9 *man/metaMDS.Rd
 c50bd45c9e8c6e892d2dd8f7fe5f0bd9 *man/model.matrix.cca.Rd
 599ee1759c06b4171a363f3de6a4438c *man/monoMDS.Rd
 b897a6552d7524c853e91f9d8b972cb6 *man/mrpp.Rd
-181ca1c040aff6f79fca96d4c0b9708c *man/mso.Rd
+dedc3d36bc5430ef525ee1998206ed3b *man/mso.Rd
 10d5049f8819e378f7f95fdb3858e6e7 *man/multipart.Rd
-0a86c6e08d0b55f9b3dc4b35878d9acb *man/nestedtemp.Rd
+9bc57e3bd36786573133cbddd63ba0a9 *man/nestedtemp.Rd
 c7f768b6f36aec4bc9d5b4c8f72c1141 *man/nobs.adonis.Rd
 d1b6a742f96e2dd5f422008221b05ae0 *man/nullmodel.Rd
-0d904e6f41dc403fffdbeec02c146a4b *man/oecosimu.Rd
+ab73188440cdbffe2f3e3889fc7d5959 *man/oecosimu.Rd
 990fc366c31c3695bd6ed0b1d82bb7fb *man/ordiArrowTextXY.Rd
 ef3799c616e8b99501e05a575c15e6b7 *man/ordiarrows.Rd
 de06b800bfbded5bd5b17775f930a3c8 *man/ordihull.Rd
@@ -546,26 +549,26 @@ d3fd306546c43339ad7d8fd985a28801 *man/permatfull.Rd
 0c3dc2962707c6a19910a579e2ac0f01 *man/permustats.Rd
 4a2ed8481b1f6805d343e83fda91e0ed *man/permutations.Rd
 10e7cc018db792a9c75f3cad7ca3e999 *man/permutest.betadisper.Rd
-49199ad9a05e646a479d423ad159ddf1 *man/plot.cca.Rd
+9b317f0ee6d6cf4efdd9fccc6fab6932 *man/plot.cca.Rd
 d45a85e1ccef663ad3bc6d87286f5904 *man/prc.Rd
 59371b694baddaa44f8a2dba9a741057 *man/predict.cca.Rd
-f07f175a660698d334d2628927b85380 *man/procrustes.Rd
+e29ed0c997c75aa9e229ae847e3d1cf6 *man/procrustes.Rd
 01a6ca946df5ad493adfb54003ad8e00 *man/pyrifos.Rd
 f61f64cc1be643149fd02f08a0cd7f9f *man/radfit.Rd
 8b12fb04530537414e03e1a6fbccda7c *man/rankindex.Rd
-5bdd04a6b3f023f5b4e326101a19824f *man/rarefy.Rd
+170d9c73693ec562e24f3d57617d7235 *man/rarefy.Rd
 915c6ea3098d6ac9c3de6249606b2fe9 *man/raupcrick.Rd
 2867f5f71a47da498cbadf9aaa01b2b6 *man/read.cep.Rd
 87cf4ea35d498647e8848f487041add7 *man/renyi.Rd
 eec06fd5cfdddadb56bca849f88b38f0 *man/reorder.hclust.Rd
 5c25a88ca55fabce5783509c706faad5 *man/scores.Rd
 8104fd642b527f76e159580e3d317fcf *man/screeplot.cca.Rd
-fa4c03b6622b3cba08b633393560b70a *man/simper.Rd
+91bdb07ef795744a77763a026e1cd141 *man/simper.Rd
 621f8a2810727ab3523fc0bd69a56dca *man/simulate.rda.Rd
 2a9336794ae5a322bf2ce6b71edb3f0c *man/sipoo.Rd
 37121fc0a195e97b3b1287678d175bab *man/spantree.Rd
 0858ab26917c2c5ca8704d690a28874b *man/specaccum.Rd
-300a45ac7b4b61992707bb60658fa915 *man/specpool.Rd
+c334f2fca856d5073044392713ee0894 *man/specpool.Rd
 5b9e51c85395f80f8504954e4175f877 *man/stepacross.Rd
 812fedada0ae3582c28f4f91bbcedc09 *man/stressplot.wcmdscale.Rd
 0aac5f5c8f58fc8fe1cb6c0ba819b196 *man/taxondive.Rd
@@ -573,12 +576,12 @@ fa4c03b6622b3cba08b633393560b70a *man/simper.Rd
 a4b37297402220dee75997c4f49a729c *man/treedive.Rd
 14cc64af5f8a8c5965563a2b03c408f2 *man/tsallis.Rd
 033dd7d7917185cea81e4d7afcd59df9 *man/varechem.Rd
-96b97e0ed942769faaea7a8fcd892ace *man/varpart.Rd
+6131d1225162c19932969552d9f1e7ba *man/varpart.Rd
 0e0e4db86ab5afa92f6d5a921c5e14ff *man/vegan-defunct.Rd
 76c332552a660a95a4e652c251187da9 *man/vegan-deprecated.Rd
-e2fbeb5770bfe7ef225c3a30713aea88 *man/vegan-internal.Rd
-c4e776b207d6157ccce51bce90848953 *man/vegan-package.Rd
-36d1ea9c9bb748b484fd12d07627bf55 *man/vegandocs.Rd
+250740e48f2243a9119d2ca4d8e638f3 *man/vegan-internal.Rd
+cef033ea30c92a1508f82924ce9f2402 *man/vegan-package.Rd
+5280fd8e6478cff76373f5e85422ae5b *man/vegandocs.Rd
 ad48b24429d673e1af3120d0cf6c3eb3 *man/vegdist.Rd
 a2cc1d837017b4de0b4bec617e29533d *man/vegemite.Rd
 c3209a8eff0fe638d3a43b25ea5bec16 *man/wascores.Rd
@@ -587,21 +590,18 @@ dd4512521b5b7a678f87c7f27d6b986c *src/cepin.f
 dd22a1632081402e62320a4c0d6b2aa9 *src/data2hill.c
 7703ffdb64c5f31de56bfd8253877ad6 *src/decorana.f
 87b05dd087e591f1f8e92ecbf1983207 *src/goffactor.c
-e19f79f4b3fef915a3ece2db284475f6 *src/monoMDS.f
+ee2c80e02663dc727c33c7fb76cc70b1 *src/monoMDS.f
 a42c4629717137858295a1eb6f3e89de *src/nestedness.c
 0299086afe16bd7a4b57835d1b11f6d8 *src/ordering.f
 31bdbe9b08340e1662a62cf6e61ade6a *src/pnpoly.c
 b9b647fcf8a3e59e10b9351fae60ec06 *src/stepacross.c
 36ea09c9a6553010e786f0e787185d60 *src/vegdist.c
-194655c013a9a2839753e00575c8e7e9 *vignettes/FAQ-vegan.pdf
-091bacdffea4d9e22aedc8b37c7872d7 *vignettes/FAQ-vegan.texi
-45ce50de9edf3aeacd8d11d1483f764c *vignettes/Makefile
-13e6253c9f4dec73158cf434a250d7e7 *vignettes/NEWS.html
-09c81618a5a91cbfc5e8c3d969dc63fd *vignettes/decision-vegan.Rnw
-410c482eece0b913054843f8de2ee499 *vignettes/decision-vegan.tex
+f986cedbb0f80cd1bdc50b53a87154a2 *vignettes/FAQ-vegan.Rmd
+5d19c22cfbe24cb0b05cd31e46c5fc70 *vignettes/decision-vegan.Rnw
 06cfa11a83ca0330979d500549f2415a *vignettes/diversity-vegan.Rnw
-6f37b6c7a98184ab8760040833a4c034 *vignettes/diversity-vegan.tex
 ddee3279ac0982a3da0bcf9fc10947ac *vignettes/intro-vegan.Rnw
-e8b9922b6c54d0a726f038e40ad9c938 *vignettes/intro-vegan.tex
+5b17ce6c86e3334b796a658328d426f9 *vignettes/partitioning.Rnw
+c4b0ae26e992a5bd0d91745aea647c5f *vignettes/varpart23.pdf
+0732ef41487d0bfca3cd1a972fb14c27 *vignettes/varpart4.pdf
 2004d867a35c1fb405934004d121fa9a *vignettes/vegan.bib
 fd58fa43e5e36d0ddcddd26dac1c7e31 *vignettes/vegan.sty
diff --git a/NAMESPACE b/NAMESPACE
index aa7761b..7919f08 100644
--- a/NAMESPACE
+++ b/NAMESPACE
@@ -73,7 +73,8 @@ S3method(densityplot, oecosimu)
 import(stats)
 import(graphics)
 import(permute)
-importFrom(utils, browseURL, combn, flush.console, head, object.size, tail, str)
+importFrom(utils, news, vignette, combn, flush.console, head, object.size,
+           tail, str)
 importFrom(tools, Rd2txt, startDynamicHelp)
 import(grDevices) ## too many functions to be listed separately
 import(lattice)
@@ -387,6 +388,7 @@ S3method(print, summary.cca)
 S3method(print, summary.clamtest)
 S3method(print, summary.decorana)
 S3method(print, summary.dispweight)
+S3method(print, summary.eigenvals)
 S3method(print, summary.humpfit)
 S3method(print, summary.isomap)
 S3method(print, summary.meandist)
diff --git a/R/add1.cca.R b/R/add1.cca.R
index 396fa0a..4f2b096 100644
--- a/R/add1.cca.R
+++ b/R/add1.cca.R
@@ -4,6 +4,8 @@
 {
     if (inherits(object, "prc"))
         stop("'step'/'add1' cannot be used for 'prc' objects")
+    if (is.null(object$terms))
+        stop("ordination model must be fitted using formula")
     test <- match.arg(test)
     ## Default add1
     out <- NextMethod("add1", object, test = "none", ...)
diff --git a/R/adonis.R b/R/adonis.R
index 704317a..0cf12ec 100644
--- a/R/adonis.R
+++ b/R/adonis.R
@@ -38,8 +38,11 @@
         if (any(lhs < -TOL))
             stop("dissimilarities must be non-negative")
         dmat <- as.matrix(lhs^2)
-    }
-    else {
+    } else if ((is.matrix(lhs) || is.data.frame(lhs)) &&
+               isSymmetric(unname(as.matrix(lhs)))) {
+        dmat <- as.matrix(lhs^2)
+        lhs <- as.dist(lhs) # crazy: need not to calculate beta.sites
+    } else {
         dist.lhs <- as.matrix(vegdist(lhs, method=method, ...))
         dmat <- dist.lhs^2
     }
diff --git a/R/anosim.R b/R/anosim.R
index dba93b3..6703655 100644
--- a/R/anosim.R
+++ b/R/anosim.R
@@ -5,12 +5,13 @@
     EPS <- sqrt(.Machine$double.eps)
     if (inherits(dat, "dist")) 
         x <- dat
-    else if (is.matrix(dat) && nrow(dat) == ncol(dat) && all(dat[lower.tri(dat)] == 
-        t(dat)[lower.tri(dat)])) {
-        x <- dat
+    else if ((is.matrix(dat) || is.data.frame(dat)) &&
+             isSymmetric(unname(as.matrix(dat)))) {
+        x <- as.dist(dat)
         attr(x, "method") <- "user supplied square matrix"
     }
-    else x <- vegdist(dat, method = distance)
+    else
+        x <- vegdist(dat, method = distance)
     if (any(x < -sqrt(.Machine$double.eps)))
         warning("some dissimilarities are negative -- is this intentional?")
     sol <- c(call = match.call())
diff --git a/R/anova.cca.R b/R/anova.cca.R
index 5531604..c5fe6d0 100644
--- a/R/anova.cca.R
+++ b/R/anova.cca.R
@@ -38,6 +38,8 @@
     ## by cases
     if (!is.null(by)) {
         by <- match.arg(by, c("terms", "margin", "axis"))
+        if (is.null(object$terms))
+            stop("model must be fitted with formula interface")
         sol <- switch(by,
                       "terms" = anova.ccabyterm(object,
                       permutations = permutations,
diff --git a/R/anova.ccalist.R b/R/anova.ccalist.R
index e628cc8..d1b2ca9 100644
--- a/R/anova.ccalist.R
+++ b/R/anova.ccalist.R
@@ -14,17 +14,20 @@
         stop("same ordination method must be used in all models")
     else
         method <- method[1]
-    ## 2. Same response
+    ## 2. All models must be fitted with formula interface
+    if (any(sapply(object, function(x) is.null(x$terms))))
+        stop("all models must be fitted with formula interface")
+    ## 3. Same response
     resp <- sapply(object, function(z) deparse(formula(z)[[2]]))
     if (!all(resp == resp[1]))
         stop("response must be same in all models")
-    ## 3. Same no. of observations
+    ## 4. Same no. of observations
     N <- sapply(object, nobs)
     if (!all(N == N[1]))
         stop("number of observations must be same in all models")
     else
         N <- N[1]
-    ## 4. Terms must be nested
+    ## 5. Terms must be nested
     trms <- lapply(object, function(z) labels(terms(z)))
     o  <- order(sapply(trms, length))
     for (i in 2:nmodels) 
diff --git a/R/betadiver.R b/R/betadiver.R
index 0bc8876..0b338b8 100644
--- a/R/betadiver.R
+++ b/R/betadiver.R
@@ -20,7 +20,7 @@
                  "co"="(a*c+a*b+2*b*c)/(2*(a+b)*(a+c))",
                  "cc"="(b+c)/(a+b+c)", "g"="(b+c)/(a+b+c)",
                  "-3"="pmin(b,c)/(a+b+c)", "l"="(b+c)/2",
-                 "19"="2*(b*c+1)/((a+b+c)^2+(a+b+c))",
+                 "19"="2*(b*c+1)/((a+b+c)^2-(a+b+c))",
                  "hk"="(b+c)/(2*a+b+c)", "rlb"="a/(a+c)",
                  "sim"="pmin(b,c)/(pmin(b,c)+a)",
                  "gl"="2*abs(b-c)/(2*a+b+c)",
diff --git a/R/bioenv.default.R b/R/bioenv.default.R
index f7dc3f9..e821b4e 100644
--- a/R/bioenv.default.R
+++ b/R/bioenv.default.R
@@ -70,8 +70,8 @@ function (comm, env, method = "spearman", index = "bray", upto = ncol(env),
         index <- attr(comdis, "method")
         if (is.null(index))
             index <- "unspecified"
-    } else if (is.matrix(comm) && nrow(comm) == ncol(comm) &&
-             isTRUE(all.equal(comm, t(comm)))) {
+    } else if ((is.matrix(comm) || is.data.frame(comm)) &&
+               isSymmetric(unname(as.matrix(comm)))) {
         comdis <- as.dist(comm)
         index <- "supplied square matrix"
     } else {
diff --git a/R/calibrate.cca.R b/R/calibrate.cca.R
index 627ecb4..f6c4a3f 100644
--- a/R/calibrate.cca.R
+++ b/R/calibrate.cca.R
@@ -18,7 +18,7 @@
     qrank <- object$CCA$qrank
     b <- (coef(object))[object$CCA$QR$pivot[1:qrank], , drop=FALSE]
     b <- solve(b)
-    pred <- wa[ , 1:rank, drop=FALSE]  %*% b[1:qrank, , drop =FALSE]
+    pred <- wa[ , 1:rank, drop=FALSE]  %*% b[1:rank, , drop =FALSE]
     envcen <- object$CCA$envcentre[object$CCA$QR$pivot]
     envcen <- envcen[1:object$CCA$qrank]
     pred <- sweep(pred, 2, envcen, "+")
diff --git a/R/capscale.R b/R/capscale.R
index 445c2e4..ffd3389 100644
--- a/R/capscale.R
+++ b/R/capscale.R
@@ -18,6 +18,10 @@
     ## mysteriously at this point.
     X <- eval(formula[[2]], envir=environment(formula),
               enclos = globalenv())
+    ## see if user supplied dissimilarities as a matrix
+    if ((is.matrix(X) || is.data.frame(X)) &&
+        isSymmetric(unname(as.matrix(X))))
+        X <- as.dist(X)
     if (!inherits(X, "dist")) {
         comm <- X
         dfun <- match.fun(dfun)
diff --git a/R/drop1.cca.R b/R/drop1.cca.R
index 0dbb093..01db89d 100644
--- a/R/drop1.cca.R
+++ b/R/drop1.cca.R
@@ -4,6 +4,8 @@
 {
     if (inherits(object, "prc"))
         stop("'step'/'drop1' cannot be used for 'prc' objects")
+    if (is.null(object$terms))
+        stop("ordination model must be fitted using formula")
     test <- match.arg(test)
     out <- NextMethod("drop1", object, test="none", ...)
     cl <- class(out)
diff --git a/R/eigenvals.R b/R/eigenvals.R
index 7a6313b..006faa7 100644
--- a/R/eigenvals.R
+++ b/R/eigenvals.R
@@ -137,6 +137,17 @@
                         `Proportion Explained` = round(abs(vars), 5),
                         `Cumulative Proportion`= round(cumsum(abs(vars)), 5))
     out <- list(importance = importance)
-    class(out) <- c("summary.eigenvals", "summary.prcomp")
+    class(out) <- c("summary.eigenvals")
     out
 }
+
+## before R svn commit 70391 we used print.summary.prcomp, but now we
+## need our own version that is similar to pre-70391 R function
+
+`print.summary.eigenvals` <-
+    function(x, digits = max(3L, getOption("digits") - 3L), ...)
+{
+    cat("Importance of components:\n")
+    print(x$importance, digits = digits, ...)
+    invisible(x)
+}
diff --git a/R/estaccumR.R b/R/estaccumR.R
index 15ac462..35e1a57 100644
--- a/R/estaccumR.R
+++ b/R/estaccumR.R
@@ -28,7 +28,7 @@
                 stopCluster(parallel)
         }
     } else {
-        tmp <- lapply(1:permutations, function(i) estFun(permat[i,]))
+        tmp <- lapply(1:nperm, function(i) estFun(permat[i,]))
     }
 
     S <- sapply(tmp, function(x) x[1,])
diff --git a/R/gdispweight.R b/R/gdispweight.R
index df94062..5bd0c21 100644
--- a/R/gdispweight.R
+++ b/R/gdispweight.R
@@ -26,6 +26,7 @@
     family <- quasipoisson()
     V <- family$variance
     ## fit models to all species separately and extract results
+    comm <- as.data.frame(comm)
     mods <- lapply(comm, function(y) glm.fit(x, y, family = family))
     y <- sapply(mods, '[[', "y")
     mu <- sapply(mods, fitted)
diff --git a/R/howHead.R b/R/howHead.R
index ff5735a..eeb15a1 100644
--- a/R/howHead.R
+++ b/R/howHead.R
@@ -39,8 +39,8 @@
             head <- paste0(head, " constant permutation within each Plot")
     }
     if (isTRUE(all.equal(type, "grid"))) {
-        nr <- getRow(x, which = "plots")
-        nc <- getCol(x, which = "plots")
+        nr <- getRow(x, which = "within")
+        nc <- getCol(x, which = "within")
         head <- paste0(head, sprintf(ngettext(nr, " %d row", " %d rows"),
                                     nr))
         head <- paste0(head, sprintf(ngettext(nc, " %d column",
diff --git a/R/lines.procrustes.R b/R/lines.procrustes.R
index 97eacbf..aefa443 100644
--- a/R/lines.procrustes.R
+++ b/R/lines.procrustes.R
@@ -1,12 +1,17 @@
-"lines.procrustes" <-
-    function(x, type=c("segments", "arrows"),  choices=c(1,2), ...)
+`lines.procrustes` <-
+    function(x, type=c("segments", "arrows"),  choices=c(1,2),
+             truemean = FALSE, ...)
 {
     type <- match.arg(type)
     X <- x$X[,choices, drop=FALSE]
     Y <- x$Yrot[, choices, drop=FALSE]
+    if (truemean) {
+        X <- sweep(X, 2, x$xmean[choices], "+")
+        Y <- sweep(Y, 2, x$xmean[choices], "+")
+    }
     if (type == "segments")
-        segments(X[,1], X[,2], Y[,1], Y[,2], ...)
+        ordiArgAbsorber(X[,1], X[,2], Y[,1], Y[,2], FUN = segments, ...)
     else
-        arrows(X[,1], X[,2], Y[,1], Y[,2], ...)
+        ordiArgAbsorber(X[,1], X[,2], Y[,1], Y[,2], FUN = arrows, ...)
     invisible()
 }
diff --git a/R/linestack.R b/R/linestack.R
index 26dc436..7c221f7 100644
--- a/R/linestack.R
+++ b/R/linestack.R
@@ -2,14 +2,19 @@
     function (x, labels, cex = 0.8, side = "right", hoff = 2, air = 1.1,
               at = 0, add = FALSE, axis = FALSE, ...)
 {
+    if (length(at) > 1 || length(hoff) > 1 || length(air) > 1 || length(cex) > 1)
+        stop("only one value accepted for arguments 'cex', 'hoff', 'air' and 'at'")
     x <- drop(x)
     n <- length(x)
     misslab <- missing(labels)
     if (misslab) {
         labels <- names(x)
     }
+    if (!is.character(labels))
+        labels <- as.character(labels)
     nlab <- length(labels)
-    if (!misslab && nlab == 1L && pmatch(labels, c("right", "left"), nomatch = FALSE)) {
+    if (!misslab && nlab == 1L && pmatch(labels, c("right", "left"),
+                    nomatch = FALSE)) {
         side <- labels
         labels <- NULL
         warning("argument 'label' is deprecated: use 'side'")
@@ -30,7 +35,7 @@
         plot(pos, x, type = "n", axes = FALSE, xlab = "", ylab = "", ...)
     }
     hoff <- hoff * strwidth("m")
-    ht <- air * strheight(names(x), cex = cex)
+    ht <- air * strheight(labels, cex = cex)
     mid <- (n + 1)%/%2
     pos[mid] <- x[mid]
     if (n > 1) {
diff --git a/R/metaMDS.R b/R/metaMDS.R
index db82a81..f6a7eb6 100644
--- a/R/metaMDS.R
+++ b/R/metaMDS.R
@@ -33,6 +33,8 @@
         attr(dis, "method") <- "user supplied"
         wascores <- FALSE
     } else {
+        if (trace > 2)
+            cat(">>> Calculation of dissimilarities\n")
         dis <- metaMDSdist(comm, distance = distance,
                            autotransform = autotransform, 
                            noshare = noshare, trace = trace,
@@ -40,6 +42,8 @@
     }
     if (missing(previous.best)) 
         previous.best <- NULL
+    if (trace > 2)
+        cat(">>> NMDS iterations\n")
     out <- metaMDSiter(dis, k = k, trymax = trymax, trace = trace, 
                        plot = plot, previous.best = previous.best,
                        engine = engine, ...)
@@ -47,7 +51,9 @@
     ## a problem: you may have insufficient data for NMDS
     if (out$stress < 1e-3) {
         warning("Stress is (nearly) zero - you may have insufficient data")
-    }     
+    }
+    if (trace > 2)
+        cat(">>> Post-processing NMDS\n")
     points <- postMDS(out$points, dis, plot = max(0, plot - 1), ...)
     if (is.null(rownames(points))) 
         rownames(points) <- rownames(comm)
diff --git a/R/mrpp.R b/R/mrpp.R
index cf28454..bf7e8d2 100644
--- a/R/mrpp.R
+++ b/R/mrpp.R
@@ -14,8 +14,8 @@
     }
     if (inherits(dat, "dist")) 
         dmat <- dat
-    else if (is.matrix(dat) && nrow(dat) == ncol(dat) && all(dat[lower.tri(dat)] == 
-        t(dat)[lower.tri(dat)])) {
+    else if ((is.matrix(dat) || is.data.frame(dat)) &&
+               isSymmetric(unname(as.matrix(dat)))) {
         dmat <- dat
         attr(dmat, "method") <- "user supplied square matrix"
     }
diff --git a/R/mso.R b/R/mso.R
index 9654af6..39f42cd 100644
--- a/R/mso.R
+++ b/R/mso.R
@@ -12,7 +12,14 @@
     N <- nrow(object$CA$Xbar)
     if (inherits(object, "rda")) 
         N <- 1
-    Dist <- dist(xy)
+    ## we expect xy are coordinates and calculate distances, but a
+    ## swift user may have supplied distances, and we use them.
+    ## However, we won't test for distances in square matrices, but
+    ## treat that as a user mistake and let it go.
+    if (inherits(xy, "dist"))
+        Dist <- xy
+    else
+        Dist <- dist(xy)
     object$grain <- grain
     if (round.up) 
         H <- ceiling(Dist/grain) * grain
diff --git a/R/ordiArgAbsorber.R b/R/ordiArgAbsorber.R
index 0ed7a1e..ab9b164 100644
--- a/R/ordiArgAbsorber.R
+++ b/R/ordiArgAbsorber.R
@@ -1,3 +1,3 @@
 `ordiArgAbsorber` <- function(..., shrink, origin, scaling, triangular,
-                              display, choices, const, FUN)
+                              display, choices, const, truemean, FUN)
     match.fun(FUN)(...)
diff --git a/R/ordiR2step.R b/R/ordiR2step.R
index a737bbe..ecae1a5 100644
--- a/R/ordiR2step.R
+++ b/R/ordiR2step.R
@@ -8,6 +8,8 @@
              trace = TRUE, ...)
 {
     direction <- match.arg(direction)
+    if (is.null(object$terms))
+        stop("ordination model must be fitted using formula")
     if (missing(scope))
         stop("needs scope")
     ## Works only for rda(): cca() does not have (yet) R2.adjusted
diff --git a/R/ordiareatest.R b/R/ordiareatest.R
index b5b7a1d..a46a064 100644
--- a/R/ordiareatest.R
+++ b/R/ordiareatest.R
@@ -34,7 +34,7 @@
     if (hasClus || parallel > 1) {
         if(.Platform$OS.type == "unix" && !hasClus) {
             areas <- do.call(cbind,
-                             mclapply(1:permutations,
+                             mclapply(1:nperm,
                                       function(i, ...) pfun(perm[i,],...),
                                         mc.cores = parallel))
             } else {
@@ -46,7 +46,7 @@
                     stopCluster(parallel)
             }
     } else {
-        areas <- sapply(1:permutations, function(i, ...) pfun(perm[i,], ...))
+        areas <- sapply(1:nperm, function(i, ...) pfun(perm[i,], ...))
     }
     signif <- (rowSums(areas <= obs + EPS) + 1)/(nperm + 1)
     out <- list("areas" = obs, "pvalues" = signif, "permutations" = areas,
diff --git a/R/ordicluster.R b/R/ordicluster.R
index 6c7c45d..0e61dc3 100644
--- a/R/ordicluster.R
+++ b/R/ordicluster.R
@@ -1,4 +1,4 @@
-"ordicluster" <-
+`ordicluster` <-
     function (ord, cluster, prune=0, display="sites", w = weights(ord, display),
               ...)
 {
@@ -10,19 +10,20 @@
         stop("Dimensions do not match in 'ord' and 'cluster'")
     if (length(w) == 1) w <- rep(w, nrow(ord))
     n <- if (is.null(w)) rep(1, nrow(ord)) else w
+    noden <- numeric(nrow(ord))
     go <- ord
     for (i in 1: (nrow(mrg) - prune)) {
         a <- mrg[i,1]
         b <- mrg[i,2]
         one <- if (a < 0) ord[-a,] else go[a,]
         two <- if (b < 0) ord[-b,] else go[b,]
-        n1 <- if (a < 0) n[-a] else n[a]
-        n2 <- if (b < 0) n[-b] else n[b]
+        n1 <- if (a < 0) n[-a] else noden[a]
+        n2 <- if (b < 0) n[-b] else noden[b]
         ordiArgAbsorber(one[1], one[2], two[1], two[2], FUN = segments, ...)
         xm <- weighted.mean(c(one[1],two[1]), w=c(n1,n2))
         ym <- weighted.mean(c(one[2],two[2]), w=c(n1,n2))
         go[i,] <- c(xm,ym)
-        n[i] <- n1 + n2
+        noden[i] <- n1 + n2
     }
-    invisible(cbind(go, "w"=n))
+    invisible(cbind(go, "w"=noden))
 }
diff --git a/R/ordiellipse.R b/R/ordiellipse.R
index 888fae4..272a504 100644
--- a/R/ordiellipse.R
+++ b/R/ordiellipse.R
@@ -42,7 +42,7 @@
             W <- w[gr]
             mat <- cov.wt(X, W)
             if (kind == "se")
-                mat$cov <- mat$cov/mat$n.obs
+                mat$cov <- mat$cov * sum(mat$wt^2)
             if (missing(conf))
                 t <- 1
             else t <- sqrt(qchisq(conf, 2))
diff --git a/R/ordistep.R b/R/ordistep.R
index 8e46db5..edcb4f5 100644
--- a/R/ordistep.R
+++ b/R/ordistep.R
@@ -5,6 +5,8 @@
 {
     if (!inherits(object, "cca"))
         stop("function can be only used with 'cca' and related objects")
+    if (is.null(object$terms))
+        stop("ordination model must be fitted using formula")
     ## handling 'direction' and 'scope' directly copied from
     ## stats::step()
     md <- missing(direction)
diff --git a/R/points.procrustes.R b/R/points.procrustes.R
index eb68263..7faae07 100644
--- a/R/points.procrustes.R
+++ b/R/points.procrustes.R
@@ -1,19 +1,27 @@
 `points.procrustes` <-
-    function(x, display = c("target","rotated"), ...)
+    function(x, display = c("target","rotated"), choices = c(1,2),
+             truemean = FALSE, ...)
 {
     display <- match.arg(display)
-    x <- if (display == "target") x$X else x$Yrot
-    points(x, ...)
+    X <- if (display == "target") x$X else x$Yrot
+    X <- X[, choices, drop = FALSE]
+    if (truemean)
+        X <- sweep(X, 2, x$xmean[choices], "+")
+    ordiArgAbsorber(X, FUN = points, ...)
     invisible()
 }
 
 `text.procrustes` <-
-    function(x, display = c("target","rotated"), labels, ...)
+    function(x, display = c("target","rotated"), choices = c(1,2),
+             labels, truemean = FALSE, ...)
 {
     display <- match.arg(display)
-    x <- if (display == "target") x$X else x$Yrot
+    X <- if (display == "target") x$X else x$Yrot
+    X <- X[, choices, drop = FALSE]
+    if (truemean)
+        X <- sweep(X, 2, x$xmean[choices], "+")
     if (missing(labels))
-        labels <- rownames(x)
-    text(x, labels = labels, ...)
+        labels <- rownames(X)
+    ordiArgAbsorber(X, labels = labels, FUN = text, ...)
     invisible()
 }
diff --git a/R/rarefy.R b/R/rarefy.R
index 9443b2a..13dad3a 100644
--- a/R/rarefy.R
+++ b/R/rarefy.R
@@ -2,22 +2,23 @@
     function (x, sample, se = FALSE, MARGIN = 1) 
 {
     x <- as.matrix(x)
-    minsample <- min(apply(x, MARGIN, sum))
-    if (any(sample > minsample))
-        warning(
-            gettextf("Requested 'sample' was larger than smallest site maximum (%d)",
-                     minsample))
     ## as.matrix changes an n-vector to a n x 1 matrix
     if (ncol(x) == 1 && MARGIN == 1)
         x <- t(x)
     if (!identical(all.equal(x, round(x)), TRUE))
         stop("function accepts only integers (counts)")
+    minsample <- min(apply(x, MARGIN, sum))
     if (missing(sample)) {
-        sample <- min(apply(x, MARGIN, sum))
-        info <- paste("The size of 'sample' must be given --\nHint: Smallest site maximum", 
-                      sample)
-        stop(info)
+        stop(
+            gettextf(
+                "The size of 'sample' must be given --\nHint: Smallest site maximum %d",
+                minsample))
     }
+    if (any(sample > minsample))
+        warning(
+            gettextf(
+                "Requested 'sample' was larger than smallest site maximum (%d)",
+                minsample))
     rarefun <- function(x, sample) {
         x <- x[x > 0]
         J <- sum(x)
diff --git a/R/renyiaccum.R b/R/renyiaccum.R
index 3c71d12..bf2402f 100644
--- a/R/renyiaccum.R
+++ b/R/renyiaccum.R
@@ -13,6 +13,7 @@ function(x, scales=c(0, 0.5, 1, 2, 4, Inf), permutations = 100,
         p <- ncol(x)
     }
     pmat <- getPermuteMatrix(permutations, n)
+    permutations <- nrow(pmat)
     m <- length(scales)
     result <- array(dim=c(n,m,permutations))
     dimnames(result) <- list(pooled.sites=c(1:n), scale=scales,
diff --git a/R/rrarefy.R b/R/rrarefy.R
index 2f46432..e58c749 100644
--- a/R/rrarefy.R
+++ b/R/rrarefy.R
@@ -14,7 +14,12 @@
     sample <- rep(sample, length=nrow(x))
     colnames(x) <- colnames(x, do.NULL = FALSE)
     nm <- colnames(x)
+    ## warn if something cannot be rarefied
+    if (any(rowSums(x) < sample))
+        warning("Some row sums < 'sample' and are not rarefied")
     for (i in 1:nrow(x)) {
+        if (sum(x[i,]) <= sample[i]) ## nothing to rarefy: take all
+            next
         row <- sample(rep(nm, times=x[i,]), sample[i])
         row <- table(row)
         ind <- names(row)
@@ -33,12 +38,19 @@
         stop("function accepts only integers (counts)")
     if (length(sample) > 1 &&  length(sample) != nrow(x))
         stop(gettextf(
-             "length of  'sample' and number of rows of 'x' do not match"))
+             "length of 'sample' and number of rows of 'x' do not match"))
     x <- drop(as.matrix(x))
+    ## warn on too large samples
+    if (is.matrix(x))
+        rs <- rowSums(x)
+    else
+        rs <- sum(x)
+    if (any(rs) < sample)
+        warning("Some row sums < 'sample' and probabilities either 0 or 1")
     ## dfun is kluge: first item of  vector x must be the sample size,
     ## and the rest  is the community data. This  seemed an easy trick
     ## to evaluate dfun in an apply() instead of a loop.
-    dfun <- function(x, sample) {
+    dfun <- function(x) {
         J <- sum(x[-1])
         sample <- min(x[1], J)
         1 - exp(lchoose(J - x[-1], sample) - lchoose(J, sample))
diff --git a/R/simper.R b/R/simper.R
index 6c14e11..35fa189 100644
--- a/R/simper.R
+++ b/R/simper.R
@@ -126,8 +126,8 @@
 {
     if (ordered) {
         out <- lapply(object, function(z)
-            data.frame(contr = z$average, sd = z$sd, ratio = z$ratio,
-                       av.a = z$ava, av.b = z$avb)[z$ord, ])
+            data.frame(average = z$average, sd = z$sd, ratio = z$ratio,
+                       ava = z$ava, avb = z$avb)[z$ord, ])
         cusum <- lapply(object, function(z) z$cusum)
         for(i in seq_along(out)) {
             out[[i]]$cumsum <- cusum[[i]]
diff --git a/R/specpool.R b/R/specpool.R
index a094772..e84196c 100644
--- a/R/specpool.R
+++ b/R/specpool.R
@@ -35,23 +35,26 @@
         S[is] <- sum(freq > 0)
         if (S[is] == 0) 
             next
-        if (n >= 1) 
+        if (n >= 1L)
             a1 <- sum(freq == 1)
-        if (n >= 2) 
+        if (n >= 2L)
             a2 <- sum(freq == 2)
-        else 0
+        else
+            a2 <- 0
         chao[is] <- S[is] + if(!is.na(a2) && a2 > 0)
             ssc * a1 * a1/2/a2
         else
             ssc * a1 * (a1-1)/2
         jack.1[is] <- S[is] + a1 * (n - 1)/n
-        jack.2[is] <- S[is] + a1 * (2 * n - 3)/n - a2 * (n - 
-                                                         2)^2/n/(n - 1)
+        if (n > 1L)
+            jack.2[is] <- S[is] + a1 * (2 * n - 3)/n -
+                a2 * (n - 2)^2/n/(n - 1)
+        else
+            jack.2[is] <- S[is]
         bootS[is] <- S[is] + sum((1 - p)^n)
-        aa <- if (!is.na(a2) && a2 > 0) 
-            a1/a2
-        else 0
-        if (a2 > 0)
+        aa <- if (!is.na(a2) && a2 > 0) a1/a2
+              else 0
+        if (!is.na(a2) && a2 > 0)
             var.chao[is] <- a1 * ssc * (0.5 + ssc * (1 + aa/4) * aa) * aa
         else
             var.chao[is] <-
@@ -61,6 +64,8 @@
                                 0))
             var.jack1[is] <- (sum(as.numeric(names(jf))^2 * jf) - 
                               a1/n) * (n - 1)/n
+        } else {
+            var.jack1[is] <- 0
         }
         pn <- (1 - p)^n
         X <- X[, freq > 0, drop = FALSE]
diff --git a/R/treedist.R b/R/treedist.R
index cc73349..d981fda 100644
--- a/R/treedist.R
+++ b/R/treedist.R
@@ -1,6 +1,11 @@
 `treedist` <-
     function(x, tree, relative = TRUE,  match.force = TRUE, ...)
 {
+    ## we cannot reconstruct tree with reversals from cophenetic
+    tree <- as.hclust(tree)
+    if (any(diff(tree$height) < -sqrt(.Machine$double.eps)))
+        stop("tree with reversals cannot be handled")
+    x <- as.matrix(x)
     n <- nrow(x)
     ABJ <- matrix(0, n , n)
     dmat <- as.matrix(cophenetic(tree))
diff --git a/R/treedive.R b/R/treedive.R
index fcc3ad6..cc9ad35 100644
--- a/R/treedive.R
+++ b/R/treedive.R
@@ -1,8 +1,12 @@
 `treedive` <-
     function(comm, tree, match.force = TRUE, verbose = TRUE)
 {
+    EPS <- sqrt(.Machine$double.eps)
+    comm <- as.matrix(comm)
     if (!inherits(tree, c("hclust", "spantree")))
-        stop("'clus' must be an 'hclust' or 'spantree' result object")
+        stop("'tree' must be an 'hclust' or 'spantree' result object")
+    if (inherits(tree, "hclust") && any(diff(tree$height) < -EPS))
+        stop("tree with reversals cannot be handled")
     m <- as.matrix(cophenetic(tree))
     ## Check tree/comm match by names
     if (match.force || ncol(comm) != ncol(m)) {
diff --git a/R/treeheight.R b/R/treeheight.R
index 0a90a47..5824f6a 100644
--- a/R/treeheight.R
+++ b/R/treeheight.R
@@ -4,6 +4,27 @@
     if (inherits(tree, "spantree"))
         return(sum(tree$dist))
     tree <- as.hclust(tree)
-    sum(tree$height) + max(tree$height)
+    ## nodes should start from 0 -- if there are negative heights,
+    ## tree is too pathological to be measured.
+    if (any(tree$height < 0))
+        stop("negative heights: tree cannot be measured")
+    ## can be done really fast if there are no reversals, but we need
+    ## to traverse the tree with reversals
+    if (is.unsorted(tree$height)) { # slow
+        h <- tree$height
+        m <- tree$merge
+        height <- 0
+        for (i in 1:nrow(m)) {
+            for (j in 1:2) {
+                if (m[i,j] < 0)
+                    height <- height + h[i]
+                else
+                    height <- height + abs(h[i] - h[m[i,j]])
+            }
+        }
+        height
+    }
+    else    # fast
+        sum(tree$height) + max(tree$height)
 }
 
diff --git a/R/tsallisaccum.R b/R/tsallisaccum.R
index 178fca1..514f2bc 100644
--- a/R/tsallisaccum.R
+++ b/R/tsallisaccum.R
@@ -13,6 +13,7 @@
         p <- ncol(x)
     }
     pmat <- getPermuteMatrix(permutations, n)
+    permutations <- nrow(pmat)
     m <- length(scales)
     result <- array(dim = c(n, m, permutations))
     dimnames(result) <- list(pooled.sites = c(1:n), scale = scales, 
diff --git a/R/vegandocs.R b/R/vegandocs.R
index 6e1f25e..d188892 100644
--- a/R/vegandocs.R
+++ b/R/vegandocs.R
@@ -1,29 +1,18 @@
 `vegandocs` <-
-    function (doc = c("NEWS", "ONEWS", "FAQ-vegan.pdf",
-              "intro-vegan.pdf", "diversity-vegan.pdf",
-              "decision-vegan.pdf", "partitioning.pdf", "permutations.pdf")) 
+    function (doc = c("NEWS", "ONEWS", "FAQ-vegan",
+              "intro-vegan", "diversity-vegan",
+              "decision-vegan", "partitioning", "permutations")) 
 {
     doc <- match.arg(doc)
-    if (length(grep(".pdf", doc)) > 0) {
-        if (doc == "permutations.pdf")
-            doc <- file.path(system.file(package="permute"), "doc", doc)
-        else
-            doc <- file.path(system.file(package="vegan"), "doc", doc)
-        if (.Platform$OS.type == "windows")
-            shell.exec(doc)
-        else system(paste(getOption("pdfviewer"), doc, "&"))
-    } else if (doc == "NEWS") {
-        ## Try html
-        helptype <- getOption("help_type")
-        if (length(helptype) && helptype == "html") {
-            browseURL(paste("file://",
-                            system.file(package="vegan", "doc", "NEWS.html"),
-                            sep=""))
-        } else {
-            file.show(Rd2txt(file.path(system.file(package="vegan"),
-                                               "NEWS.Rd"), tempfile()))
-        }
-    } else {
+    if (doc == "NEWS") {
+        .Deprecated('news(package="vegan")')
+        news(package = "vegan")
+    } else if (doc %in% vignette(package="vegan")$results[, "Item"]) {
+        .Deprecated('browseVignettes("vegan")')
+        vignette(doc, package = "vegan")
+    } else if (doc == "permutations") {
+        .Deprecated('browseVignettes("permute")')
+        vignette(doc, package = "permute")
+    } else  # last resort
         file.show(system.file(package="vegan", doc))
-    } 
 }
diff --git a/R/vegdist.R b/R/vegdist.R
index 5e0b5fc..4f442f4 100644
--- a/R/vegdist.R
+++ b/R/vegdist.R
@@ -15,10 +15,10 @@
         stop("invalid distance method")
     if (method == -1) 
         stop("ambiguous distance method")
-    if (method > 2 && any(rowSums(x, na.rm = TRUE) == 0)) 
+    if (!method %in% c(1,2,6,16) && any(rowSums(x, na.rm = TRUE) == 0))
         warning("you have empty rows: their dissimilarities may be meaningless in method ",
                 dQuote(inm))
-    if (method > 2 && any(x < 0, na.rm = TRUE)) 
+    if (!method %in% c(1,2,6,16) && any(x < 0, na.rm = TRUE))
         warning("results may be meaningless because data have negative entries in method ",
                 dQuote(inm))
     if (method == 11 && any(colSums(x) == 0)) 
diff --git a/R/zzz.R b/R/zzz.R
index c6c6d80..ceaba80 100644
--- a/R/zzz.R
+++ b/R/zzz.R
@@ -1,6 +1,6 @@
 .onAttach <- function(lib, pkg)  {
     packageStartupMessage("This is vegan ",
                           utils::packageDescription("vegan",
-                                                    field="Version"),
+                                                    fields="Version"),
                           appendLF = TRUE)
 }
diff --git a/build/vignette.rds b/build/vignette.rds
index 54c0910..a06e18a 100644
Binary files a/build/vignette.rds and b/build/vignette.rds differ
diff --git a/inst/NEWS.Rd b/inst/NEWS.Rd
index d6f3e06..765fd2f 100644
--- a/inst/NEWS.Rd
+++ b/inst/NEWS.Rd
@@ -2,6 +2,178 @@
 \title{vegan News}
 \encoding{UTF-8}
 
+\section{Changes in version 2.3-5}{
+  \subsection{BUG FIXES}{
+    \itemize{
+
+      \item \code{eigenvals} fails with \code{prcomp} results in
+      \R-devel. The next version of \code{prcomp} will have an
+      argument to limit the number of eigenvalues shown
+      (\code{rank.}), and this breaks \code{eigenvals} in \pkg{vegan}.
+
+      \item \code{calibrate} failed for \code{cca} and friends if
+      \code{rank} was given.
+
+    } % itemise
+  } % bug fixes
+} % v2.3-5
+
+\section{Changes in version 2.3-4}{
+
+  \subsection{BUG FIXES}{
+    \itemize{
+
+      \item \code{betadiver} index \code{19} had wrong sign in one of
+      its terms.
+
+      \item \code{linestack} failed when the \code{labels} were given,
+      but the input scores had no names. Reported by Jeff Wood (ANU,
+      Canberra, ACT).
+
+    } %itemize
+  } % bug fixes
+
+  \subsection{DEPRECATED}{
+    \itemize{
+
+      \item \code{vegandocs} is deprecated. Current \R{} provides better
+      tools for seeing extra documentation (\code{news()} and
+      \code{browseVignettes()}).
+
+    } %itemize
+  } %deprecated
+
+  \subsection{VIGNETTES}{
+    \itemize{
+
+      \item All vignettes are built with standard \R{} tools and can be
+      browsed with \code{browseVignettes}. \code{FAQ-vegan} and
+      \code{partitioning} were only accessible with \code{vegandocs}
+      function.
+      
+    } %itemize
+  } %vignettes
+
+  \subsection{BUILDING}{
+    \itemize{
+
+      \item Dependence on external software \code{texi2dvi} was
+      removed. Version 6.1 of \code{texi2dvi} was incompatible with \R{}
+      and prevented building \pkg{vegan}. The \code{FAQ-vegan} that was
+      earlier built with \code{texi2dvi} uses now \pkg{knitr}. Because
+      of this, \pkg{vegan} is now dependent on \R-3.0.0.  Fixes issue
+      \href{https://github.com/vegandevs/vegan/issues/158}{#158} in
+      Github.
+
+    } %itemize
+  } % building
+    
+  
+} % v2.3-4
+
+\section{Changes in version 2.3-3}{
+  \subsection{BUG FIXES}{
+     \itemize{
+
+	\item \code{metaMDS} and \code{monoMDS} could fail if input
+	dissimilarities were huge: in the reported case they were of
+	magnitude 1E85. Fixes issue
+	\href{https://github.com/vegandevs/vegan/issues/152}{#152} in
+	Github.
+
+       \item Permutations failed if they were defined as \pkg{permute}
+       control structures in \code{estaccum}, \code{ordiareatest},
+       \code{renyiaccum} and \code{tsallisaccum}. Reported by Dan
+       Gafta (Cluj-Napoca) for \code{renyiaccum}.
+
+       \item \code{rarefy} gave false warnings if input was a vector
+       or a single sampling unit.
+
+       \item Some extrapolated richness indices in \code{specpool}
+       needed the number of doubletons (= number of species occurring
+       in two sampling units), and these failed when only one sampling
+       unit was supplied.  The extrapolated richness cannot be
+       estimated from a single sampling unit, but now such cases are
+       handled smoothly instead of failing: observed non-extrapolated
+       richness with zero standard error will be reported. The issue
+       was reported in
+       \href{http://stackoverflow.com/questions/34027496/error-message-when-using-specpool-in-vegan-package}{StackOverflow}.
+
+    } %itemize
+  } % bug fixes
+
+  \subsection{NEW FEATURES}{
+    \itemize{
+
+       \item \code{treedist} and \code{treedive} refuse to handle
+       trees with reversals, i.e, higher levels are more homogeneous
+       than lower levels. Function \code{treeheight} will estimate
+       their total height with absolute values of branch
+       lengths. Function \code{treedive} refuses to handle trees with
+       negative branch heights indicating negative
+       dissimilarities. Function \code{treedive} is faster.
+
+       \item \code{gdispweight} works when input data are in a matrix
+       instead of a data frame.
+
+       \item Input dissimilarities supplied in symmetric matrices or
+       data frames are more robustly recognized by \code{anosim},
+       \code{bioenv} and \code{mrpp}.
+
+    } %itemize
+  } %new features
+
+} %v2.3-3
+
+\section{Changes in version 2.3-2}{
+
+  \subsection{BUG FIXES}{
+    \itemize{
+
+      \item Printing details of a gridded permutation design would fail
+      when the grid was at the within-plot level.
+
+      \item \code{ordicluster} joined the branches at wrong coordinates
+      in some cases.
+
+      \item \code{ordiellipse} ignored weights when calculating standard
+      errors (\code{kind = "se"}). This influenced plots of \code{cca},
+      and also influenced \code{ordiareatest}.
+
+    } % itemize
+  } % bug fixes
+
+  \subsection{NEW FEATURES}{
+    \itemize{
+
+      \item \code{adonis} and \code{capscale} functions recognize
+      symmetric square matrices as dissimilarities. Formerly
+      dissimilarities had to be given as \code{"dist"} objects such as
+      produced by \code{dist} or \code{vegdist} functions, and data
+      frames and matrices were regarded as observations x variables
+      data which could confuse users (e.g., issue
+      \href{https://github.com/vegandevs/vegan/issues/147}{#147}).
+
+      \item \code{mso} accepts \code{"dist"} objects for the distances
+      among locations as an alternative to coordinates of locations.
+
+      \item \code{text}, \code{points} and \code{lines} functions for
+      \code{procrustes} analysis gained new argument \code{truemean}
+      which allows adding \code{procrustes} items to the plots of
+      original analysis.
+
+      \item \code{rrarefy} returns observed non-rarefied communities
+      (with a warning) when users request subsamples that are larger
+      than the observed community instead of failing. Function
+      \code{drarefy} has been similar and returned sampling
+      probabilities of 1, but now it also issues a warning. Fixes issue
+      \href{https://github.com/vegandevs/vegan/issues/144}{#144} in
+      Github.
+
+    } % itemize
+  } % new features
+} %v2.3-2
+
 \section{Changes in version 2.3-1}{
 
   \subsection{BUG FIXES}{
diff --git a/inst/doc/FAQ-vegan.R b/inst/doc/FAQ-vegan.R
new file mode 100644
index 0000000..a6583cf
--- /dev/null
+++ b/inst/doc/FAQ-vegan.R
@@ -0,0 +1,6 @@
+## ----eval=FALSE----------------------------------------------------------
+#  sol <- cca(varespec)
+#  ef <- envfit(sol ~ ., varechem)
+#  plot(sol)
+#  ordiArrowMul(scores(ef, display="vectors"))
+
diff --git a/inst/doc/FAQ-vegan.Rmd b/inst/doc/FAQ-vegan.Rmd
new file mode 100644
index 0000000..1e07b2d
--- /dev/null
+++ b/inst/doc/FAQ-vegan.Rmd
@@ -0,0 +1,700 @@
+<!--
+%\VignetteIndexEntry{vegan FAQ}
+%\VignetteEngine{knitr::knitr}
+%\VignetteEncoding{UTF-8}
+-->
+
+**vegan** FAQ
+=============
+
+This document contains answers to some of the most frequently asked
+questions about R package **vegan**.
+
+> This work is licensed under the Creative Commons Attribution 3.0
+> License. To view a copy of this license, visit
+> <http://creativecommons.org/licenses/by/3.0/> or send a letter to
+> Creative Commons, 543 Howard Street, 5th Floor, San Francisco,
+> California, 94105, USA.
+>
+> Copyright © 2008-2016 vegan development team
+
+------------------------------------------------------------------------
+
+Introduction
+------------
+
+------------------------------------------------------------------------
+
+### What is **vegan**?
+
+**Vegan** is an R package for community ecologists. It contains the most
+popular methods of multivariate analysis needed in analysing ecological
+communities, and tools for diversity analysis, and other potentially
+useful functions. **Vegan** is not self-contained but it must be run
+under R statistical environment, and it also depends on many other R
+packages. **Vegan** is [free
+software](http://www.gnu.org/philosophy/free-sw.html) and distributed
+under [GPL2 license](http://www.gnu.org/licenses/gpl.html).
+
+------------------------------------------------------------------------
+
+### What is R?
+
+R is a system for statistical computation and graphics. It consists of a
+language plus a run-time environment with graphics, a debugger, access
+to certain system functions, and the ability to run programs stored in
+script files.
+
+R has a home page at <http://www.R-project.org/>. It is [free
+software](http://www.gnu.org/philosophy/free-sw.html) distributed under
+a GNU-style [copyleft](http://www.gnu.org/copyleft/copyleft.html), and
+an official part of the [GNU](http://www.gnu.org/) project (“GNU S”).
+
+------------------------------------------------------------------------
+
+### How to obtain **vegan** and R?
+
+Both R and latest release version of **vegan** can be obtained through
+[CRAN](http://cran.r-project.org). Unstable development version of
+**vegan** can be obtained through
+[GitHub](https://github.com/vegandevs/vegan). Formerly **vegan** was
+developed in [R-Forge](http://r-forge.r-project.org/projects/vegan/),
+but after moving to [GitHub](https://github.com/vegandevs/vegan) the
+R-Forge repository may be out of date.
+
+------------------------------------------------------------------------
+
+### What R packages **vegan** depends on?
+
+**Vegan** depends on the **permute** package which will provide advanced
+and flexible permutation routines for **vegan**. The **permute** package
+is developed together with **vegan** in
+[GitHub](https://github.com/gavinsimpson/permute).
+
+Some individual **vegan** functions depend on packages **MASS**,
+**mgcv**, **parallel**, **cluster**, **lattice** and **tcltk**. These
+all are base or recommended R packages that should be available in
+every R installation.  **Vegan** declares these as suggested or
+imported packages, and you can install **vegan** and use most of its
+functions without these packages.
+
+**Vegan** is accompanied with a supporting package **vegan3d** for
+three-dimensional and dynamic plotting. The **vegan3d** package needs
+non-standard packages **rgl** and **scatterplot3d**.
+
+------------------------------------------------------------------------
+
+### What other packages are available for ecologists?
+
+CRAN [Task Views](http://cran.r-project.org/src/contrib/Views/) include
+entries like `Environmetrics`, `Multivariate` and `Spatial` that
+describe several useful packages and functions. If you install R package
+**ctv**, you can inspect Task Views from your R session, and
+automatically install sets of most important packages.
+
+------------------------------------------------------------------------
+
+### What other documentation is available for **vegan**?
+
+**Vegan** is a fully documented R package with standard help pages.
+These are the most authoritative sources of documentation (and as a last
+resource you can use the force and the read the source, as **vegan** is
+open source). **Vegan** package ships with other documents which can be
+read with `vegandocs` command (documented in the **vegan** help). The
+documents included in the **vegan** package are
+
+-   **Vegan** `NEWS`
+-   This document (`FAQ-vegan`).
+-   Short introduction to basic ordination methods in **vegan**
+    (`intro-vegan`).
+-   Introduction to diversity methods in **vegan**
+    (`diversity-vegan`).
+-   Discussion on design decisions in **vegan** (`decision-vegan`).
+-   Description of variance partition procedures in function `varpart`
+    (`partitioning`).
+
+Web documents outside the package include:
+
+-   <https://github.com/vegandevs/vegan>: **vegan** homepage.
+-   <http://cc.oulu.fi/~jarioksa/opetus/metodi/vegantutor.pdf>:
+    **vegan** tutorial.
+
+------------------------------------------------------------------------
+
+### Is there a Graphical User Interface (GUI) for **vegan**?
+
+Roeland Kindt has made package **BiodiversityR** which provides a GUI
+for **vegan**. The package is available at
+[CRAN](https://cran.r-project.org/package=BiodiversityR).
+It is not a mere GUI for **vegan**, but adds some new functions and
+complements **vegan** functions in order to provide a workbench for
+biodiversity analysis. You can install **BiodiversityR** using
+`install.packages("BiodiversityR")` or graphical package management menu
+in R. The GUI works on Windows, MacOS X and Linux.
+
+------------------------------------------------------------------------
+
+### How to cite **vegan**?
+
+Use command `citation("vegan")` in R to see the recommended citation to
+be used in publications.
+
+------------------------------------------------------------------------
+
+### How to build **vegan** from sources?
+
+In general, you do not need to build **vegan** from sources, but binary
+builds of release versions are available through
+[CRAN](http://cran.r-project.org/) for Windows and MacOS X. If you use
+some other operating systems, you may have to use source packages.
+**Vegan** is a standard R package, and can be built like instructed in R
+documentation. **Vegan** contains source files in C and FORTRAN, and you
+need appropriate compilers (which may need more work in Windows and
+MacOS X).
+
+------------------------------------------------------------------------
+
+### Are there binaries for devel versions?
+
+[R-Forge](http://r-forge.r-project.org/projects/vegan/) runs daily tests
+on the devel package, and if passed, it builds source package together
+with Windows binaries. However, the R-Forge may be out of date, because
+**vegan** is mainly developed in
+[GitHub](https://github.com/vegandevs/vegan). You can install R-Forge
+packages within R with command
+`install.packages("vegan", repos="http://r-forge.r-project.org/")`. If
+you use GUI menu entry, you must select or define the R-Forge
+repository.
+
+------------------------------------------------------------------------
+
+### How to report a bug in **vegan**?
+
+If you think you have found a bug in **vegan**, you should report it to
+**vegan** maintainers or developers. The preferred forum to report bugs
+is [GitHub](https://github.com/vegandevs/vegan/issues). The bug report
+should be so detailed that the bug can be replicated and corrected.
+Preferably, you should send an example that causes a bug. If it needs a
+data set that is not available in R, you should send a minimal data set
+as well. You also should paste the output or error message in your
+message. You also should specify which version of **vegan** you used.
+
+Bug reports are welcome: they are the only way to make **vegan**
+non-buggy.
+
+Please note that you shall not send bug reports to R mailing lists,
+since **vegan** is not a standard R package.
+
+------------------------------------------------------------------------
+
+### Is it a bug or a feature?
+
+It is not necessarily a bug if some function gives different results
+than you expect: That may be a deliberate design decision. It may be
+useful to check the documentation of the function to see what was the
+intended behaviour. It may also happen that function has an argument to
+switch the behaviour to match your expectation. For instance, function
+`vegdist` always calculates quantitative indices (when this is
+possible). If you expect it to calculate a binary index, you should use
+argument `binary = TRUE`.
+
+------------------------------------------------------------------------
+
+### Can I contribute to **vegan**?
+
+**Vegan** is dependent on user contribution. All feedback is welcome. If
+you have problems with **vegan**, it may be as simple as incomplete
+documentation, and we shall do our best to improve the documents.
+
+Feature requests also are welcome, but they are not necessarily
+fulfilled. A new feature will be added if it is easy to do and it looks
+useful, or if you submit code.
+
+If you can write code yourself, the best forum to contribute to vegan is
+[GitHub](https://github.com/vegandevs/vegan).
+
+------------------------------------------------------------------------
+
+Ordination
+----------
+
+------------------------------------------------------------------------
+
+### I have only numeric and positive data but **vegan** still complains
+
+You are wrong! Computers are painfully pedantic, and if they find
+non-numeric or negative data entries, you really have them. Check your
+data. Most common reasons for non-numeric data are that row names were
+read as a non-numeric variable instead of being used as row names (check
+argument `row.names` in reading the data), or that the column names were
+interpreted as data (check argument `header = TRUE` in reading the
+data). Another common reason is that you had empty cells in your input
+data, and these were interpreted as missing values.
+
+------------------------------------------------------------------------
+
+### Can I analyse binary or cover class data?
+
+Yes. Most **vegan** methods can handle binary data or cover abundance
+data. Most statistical tests are based on permutation, and do not make
+distributional assumptions. There are some methods (mainly in diversity
+analysis) that need count data. These methods check that input data are
+integers, but they may be fooled by cover class data.
+
+------------------------------------------------------------------------
+
+### Why dissimilarities in **vegan** differ from other sources?
+
+Most commonly the reason is that other software use presence–absence
+data whereas **vegan** used quantitative data. Usually **vegan** indices
+are quantitative, but you can use argument `binary = TRUE` to make them
+presence–absence. However, the index name is the same in both cases,
+although different names usually occur in literature. For instance,
+Jaccard index actually refers to the binary index, but **vegan** uses
+name `"jaccard"` for the quantitative index, too.
+
+Another reason may be that indices indeed are defined differently,
+because people use same names for different indices.
+
+------------------------------------------------------------------------
+
+### Why NMDS stress is sometimes 0.1 and sometimes 10?
+
+Stress is a proportional measure of badness of fit. The proportions can
+be expressed either as parts of one or as percents. Function `isoMDS`
+(**MASS** package) uses percents, and function `monoMDS` (**vegan**
+package) uses proportions, and therefore the same stress is 100 times
+higher in `isoMDS`. The results of `goodness` function also depend on
+the definition of stress, and the same `goodness` is 100 times higher in
+`isoMDS` than in `monoMDS`. Both of these conventions are equally
+correct.
+
+------------------------------------------------------------------------
+
+### I get zero stress but no convergent solutions in `metaMDS`
+
+Most common reason is that you have too few observations for your NMDS.
+For `n` observations (points) and `k` dimensions you need to estimate
+`n*k` parameters (ordination scores) using `n*(n-1)/2` dissimilarities.
+For `k` dimensions you must have `n > 2*k + 1`, or for two dimensions at
+least six points. In some degenerate situations you may need even a
+larger number of points. If you have a lower number of points, you can
+find an undefined number of perfect (stress is zero) but different
+solutions. Conventional wisdom due to Kruskal is that you should have
+`n > 4*k + 1` points for `k` dimensions. A typical symptom of
+insufficient data is that you have (nearly) zero stress but no two
+convergent solutions. In those cases you should reduce the number of
+dimensions (`k`) and with very small data sets you should not use
+`NMDS`, but rely on metric methods.
+
+It seems that local and hybrid scaling with `monoMDS` have similar lower
+limits in practice (although theoretically they could differ). However,
+higher number of dimensions can be used in metric scaling, both with
+`monoMDS` and in principal coordinates analysis (`cmdscale` in
+**stats**, `wcmdscale` in **vegan**).
+
+------------------------------------------------------------------------
+
+### Zero dissimilarities in isoMDS
+
+Function `metaMDS` uses function `monoMDS` as its default method for
+NMDS, and this function can handle zero dissimilarities. Alternative
+function `isoMDS` cannot handle zero dissimilarities. If you want to use
+`isoMDS`, you can use argument `zerodist = "add"` in `metaMDS` to handle
+zero dissimilarities. With this argument, zero dissimilarities are
+replaced with a small positive value, and they can be handled in
+`isoMDS`. This is a kluge, and some people do not like this. A more
+principal solution is to remove duplicate sites using R command
+`unique`. However, after some standardizations or with some
+dissimilarity indices, originally non-unique sites can have zero
+dissimilarity, and you have to resort to the kluge (or work harder with
+your data). Usually it is better to use `monoMDS`.
+
+------------------------------------------------------------------------
+
+### I have heard that you cannot fit environmental vectors or surfaces to NMDS results which only have rank-order scores
+
+Claims like this have indeed been at large in the Internet, but they are
+based on grave misunderstanding and are plainly wrong. NMDS ordination
+results are strictly metric, and in **vegan** `metaMDS` and `monoMDS`
+they are even strictly Euclidean. The method is called “non-metric”
+because the Euclidean distances in ordination space have a non-metric
+rank-order relationship to community dissimilarities. You can inspect
+this non-linear step curve using function `stressplot` in **vegan**.
+Because the ordination scores are strictly Euclidean, it is correct to
+use **vegan** functions `envfit` and `ordisurf` with NMDS results.
+
+------------------------------------------------------------------------
+
+### Where can I find numerical scores of ordination axes?
+
+Normally you can use function `scores` to extract ordination scores for
+any ordination method. The `scores` function can also find ordination
+scores for many non-**vegan** functions such as for `prcomp` and
+`princomp` and for some **ade4** functions.
+
+In some cases the ordination result object stores raw scores, and the
+axes are also scaled appropriate when you access them with `scores`. For
+instance, in `cca` and `rda` the ordination object has only so-called
+normalized scores, and they are scaled for ordination plots or for other
+use when they are accessed with `scores`.
+
+------------------------------------------------------------------------
+
+### How the RDA results are scaled?
+
+The scaling or RDA results indeed differ from most other software
+packages. The scaling of RDA is such a complicated issue that it cannot
+be explained in this FAQ, but it is explained in a separate pdf document
+on “Design decision and implementation details in vegan” that you can
+read with **vegan** command `vegandocs("decision")`.
+
+------------------------------------------------------------------------
+
+### cca fails with “data.frame expected” or “"site.env" missing”
+
+This is not a **vegan** error message, but it comes from the `cca`
+function in the **ade4** package. There is an unfortunate name clash,
+and if you have loaded **ade4** after **vegan**, the **ade4** version of
+`cca` will mask the **vegan** version. You can use the **vegan** version
+using command `vegan::cca()`. If you do not need package **ade4**, you
+can detach it with command `detach(package:ade4)`.
+
+------------------------------------------------------------------------
+
+### Ordination fails with “Error in La.svd”
+
+Constrained ordination (`cca`, `rda`, `capscale`) will sometimes fail
+with error message
+`Error in La.svd(x, nu, nv): error code 1 from Lapack routine 'dgesdd'.`
+
+It seems that the basic problem is in the `svd` function of `LAPACK`
+that is used for numerical analysis in R. `LAPACK` is an external
+library that is beyond the control of package developers and R core team
+so that these problems may be unsolvable. It seems that the problems
+with the `LAPACK` code are so common that even the help page of `svd`
+warns about them
+
+Reducing the range of constraints (environmental variables) helps
+sometimes. For instance, multiplying constraints by a constant \< 1.
+This rescaling does not influence the numerical results of constrained
+ordination, but it can complicate further analyses when values of
+constraints are needed, because the same scaling must be applied there.
+We can only hope that this problem is fixed in the future versions of R
+and `LAPACK`.
+
+------------------------------------------------------------------------
+
+### Variance explained by ordination axes.
+
+In general, **vegan** does not directly give any statistics on the
+“variance explained” by ordination axes or by the constrained axes. This
+is a design decision: I think this information is normally useless and
+often misleading. In community ordination, the goal typically is not to
+explain the variance, but to find the “gradients” or main trends in the
+data. The “total variation” often is meaningless, and all proportions of
+meaningless values also are meaningless. Often a better solution
+explains a smaller part of “total variation”. For instance, in
+unstandardized principal components analysis most of the variance is
+generated by a small number of most abundant species, and they are easy
+to “explain” because data really are not very multivariate. If you
+standardize your data, all species are equally important. The first axes
+explains much less of the “total variation”, but now they explain all
+species equally, and results typically are much more useful for the
+whole community. Correspondence analysis uses another measure of
+variation (which is not variance), and again it typically explains a
+“smaller proportion” than principal components but with a better result.
+Detrended correspondence analysis and nonmetric multidimensional scaling
+even do not try to “explain” the variation, but use other criteria. All
+methods are incommensurable, and it is impossible to compare methods
+using “explanation of variation”.
+
+If you still want to get “explanation of variation” (or a deranged
+editor requests that from you), it is possible to get this information
+for some methods:
+
+-   Eigenvector methods: Functions `rda`, `cca` and `capscale` give the
+    variation of conditional (partialled), constrained (canonical) and
+    residual components, but you must calculate the proportions by hand.
+    Function `eigenvals` extracts the eigenvalues, and
+    `summary(eigenvals(ord))` reports the proportions explained in the
+    result object `ord`. Function `RsquareAdj` gives the R-squared and
+    adjusted R-squared (if available) for constrained components.
+    Function `goodness` gives the same statistics for individual species
+    or sites (species are unavailable with `capscale`). In addition,
+    there is a special function `varpart` for unbiased partitioning of
+    variance between up to four separate components in redundancy
+    analysis.
+-   Detrended correspondence analysis (function `decorana`). The total
+    amount of variation is undefined in detrended correspondence
+    analysis, and therefore proportions from total are unknown and
+    undefined. DCA is not a method for decomposition of variation, and
+    therefore these proportions would not make sense either.
+-   Nonmetric multidimensional scaling. NMDS is a method for nonlinear
+    mapping, and the concept of of variation explained does not make
+    sense. However, 1 - stress\^2 transforms nonlinear stress into
+    quantity analogous to squared correlation coefficient. Function
+    `stressplot` displays the nonlinear fit and gives this statistic.
+
+------------------------------------------------------------------------
+
+### Can I have random effects in constrained ordination or in `adonis`?
+
+No. Strictly speaking, this is impossible. However, you can define
+models that respond to similar goals as random effects models, although
+they strictly speaking use only fixed effects.
+
+Constrained ordination functions `cca`, `rda` and `capscale` can have
+`Condition()` terms in their formula. The `Condition()` define partial
+terms that are fitted before other constraints and can be used to remove
+the effects of background variables, and their contribution to
+decomposing inertia (variance) is reported separately. These partial
+terms are often regarded as similar to random effects, but they are
+still fitted in the same way as other terms and strictly speaking they
+are fixed terms.
+
+Function `adonis` evaluates terms sequentially. In a model with
+right-hand-side `~ A + B` the effects of `A` are evaluated first, and
+the effects of `B` after removing the effects of `A`. Sequential tests
+are also available in `anova` function for constrained ordination
+results by setting argument `by = "term"`. In this way, the first terms
+can serve in a similar role as random effects, although they are fitted
+in the same way as all other terms, and strictly speaking they are fixed
+terms.
+
+All permutation tests in **vegan** are based on the **permute** package
+that allows constructing various restricted permutation schemes. For
+instance, you can set levels of `plots` or `blocks` for a factor
+regarded as a random term.
+
+A major reason why real random effects models are impossible in most
+**vegan** functions is that their tests are based on the permutation of
+the data. The data are given, that is fixed, and therefore permutation
+tests are basically tests of fixed terms on fixed data. Random effect
+terms would require permutations of data with a random component instead
+of the given, fixed data, and such tests are not available in **vegan**.
+
+------------------------------------------------------------------------
+
+### Is it possible to have passive points in ordination?
+
+**Vegan** does not have a concept of passive points, or a point that
+should only little influence the ordination results. However, you can
+add points to eigenvector methods using `predict` functions with
+`newdata`. You can first perform an ordination without some species or
+sites, and then you can find scores for all points using your complete
+data as `newdata`. The `predict` functions are available for basic
+eigenvector methods in **vegan** (`cca`, `rda`, `decorana`, for an
+up-to-date list, use command `methods("predict")`). You also can
+simulate the passive points in R by using low weights to row and columns
+(this is the method used in software with passive points). For instance,
+the following command makes row 3 “passive”:
+`dune[3,] <- 0.001*dune[3,]`.
+
+------------------------------------------------------------------------
+
+### Class variables and dummies
+
+You should define a class variable as an R `factor`, and **vegan** will
+automatically handle them with formula interface. You also can define
+constrained ordination without formula interface, but then you must code
+your class variables by hand.
+
+R (and **vegan**) knows both unordered and ordered factors. Unordered
+factors are internally coded as dummy variables, but one redundant level
+is removed or aliased. With default contrasts, the removed level is the
+first one. Ordered factors are expressed as polynomial contrasts. Both
+of these contrasts explained in standard R documentation.
+
+------------------------------------------------------------------------
+
+### How are environmental arrows scaled?
+
+The printed output of `envfit` gives the direction cosines which are the
+coordinates of unit length arrows. For plotting, these are scaled by
+their correlation (square roots of column `r2`). You can see the scaled
+lengths of `envfit` arrows using command `scores`.
+
+The scaled environmental vectors from `envfit` and the arrows for
+continuous environmental variables in constrained ordination (`cca`,
+`rda`, `capscale`) are adjusted to fill the current graph. The lengths
+of arrows do not have fixed meaning with respect to the points (species,
+sites), but they can only compared against each other, and therefore
+only their relative lengths are important.
+
+If you want change the scaling of the arrows, you can use `text`
+(plotting arrows and text) or `points` (plotting only arrows) functions
+for constrained ordination. These functions have argument `arrow.mul`
+which sets the multiplier. The `plot` function for `envfit` also has the
+`arrow.mul` argument to set the arrow multiplier. If you save the
+invisible result of the constrained ordination `plot` command, you can
+see the value of the currently used `arrow.mul` which is saved as an
+attribute of `biplot` scores.
+
+Function `ordiArrowMul` is used to find the scaling for the current
+plot. You can use this function to see how arrows would be scaled:
+
+
+```{r eval=FALSE}
+sol <- cca(varespec)
+ef <- envfit(sol ~ ., varechem)
+plot(sol)
+ordiArrowMul(scores(ef, display="vectors"))
+```
+
+------------------------------------------------------------------------
+
+### I want to use Helmert or sum contrasts
+
+`vegan` uses standard R utilities for defining contrasts. The default in
+standard installations is to use treatment contrasts, but you can change
+the behaviour globally setting `options` or locally by using keyword
+`contrasts`. Please check the R help pages and user manuals for details.
+
+------------------------------------------------------------------------
+
+### What are aliased variables and how to see them?
+
+Aliased variable has no information because it can be expressed with the
+help of other variables. Such variables are automatically removed in
+constrained ordination in **vegan**. The aliased variables can be
+redundant levels of factors or whole variables.
+
+**Vegan** function `alias` gives the defining equations for aliased
+variables. If you only want to see the names of aliased variables or
+levels in solution `sol`, use `alias(sol, names.only=TRUE)`.
+
+------------------------------------------------------------------------
+
+### Plotting aliased variables
+
+You can fit vectors or class centroids for aliased variables using
+`envfit` function. The `envfit` function uses weighted fitting, and the
+fitted vectors are identical to the vectors in correspondence analysis.
+
+------------------------------------------------------------------------
+
+### Restricted permutations in **vegan**
+
+**Vegan** uses **permute** package in all its permutation tests. The
+**permute** package will allow restricted permutation designs for time
+series, line transects, spatial grids and blocking factors. The
+construction of restricted permutation schemes is explained in the
+manual page `permutations` in **vegan** and in the documentation of the
+**permute** package.
+
+------------------------------------------------------------------------
+
+### How to use different plotting symbols in ordination graphics?
+
+The default ordination `plot` function is intended for fast plotting and
+it is not very configurable. To use different plotting symbols, you
+should first create and empty ordination plot with
+`plot(..., type="n")`, and then add `points` or `text` to the created
+empty frame (here `...` means other arguments you want to give to your
+`plot` command). The `points` and `text` commands are fully
+configurable, and allow different plotting symbols and characters.
+
+------------------------------------------------------------------------
+
+### How to avoid cluttered ordination graphs?
+
+If there is a really high number of species or sites, the graphs often
+are congested and many labels are overwritten. It may be impossible to
+have complete readable graphics with some data sets. Below we give a
+brief overview of tricks you can use. Gavin Simpson’s blog [From the
+bottom of the heap](http://www.fromthebottomoftheheap.net) has a series
+of articles on “decluttering ordination plots” with more detailed
+discussion and examples.
+
+-   Use only points, possibly with different types if you do not need to
+    see the labels. You may need to first create an empty plot using
+    `plot(..., type="n")`, if you are not satisfied with the default
+    graph. (Here and below `...` means other arguments you want to give
+    to your `plot` command.)
+-   Use points and add labels to desired points using interactive
+    `identify` command if you do not need to see all labels.
+-   Add labels using function `ordilabel` which uses non-transparent
+    background to the text. The labels still shadow each other, but the
+    uppermost labels are readable. Argument `priority` will help in
+    displaying the most interesting labels (see [Decluttering blog, part
+    1](http://www.fromthebottomoftheheap.net/2013/01/12/decluttering-ordination-plots-in-vegan-part-1-ordilabel/)).
+-   Use `orditorp` function that uses labels only if these can be added
+    to a graph without overwriting other labels, and points otherwise,
+    if you do not need to see all labels. You must first create an empty
+    plot using `plot(..., type="n")`, and then add labels or points with
+    `orditorp` (see [Decluttering
+    blog](http://www.fromthebottomoftheheap.net/2013/01/13/decluttering-ordination-plots-in-vegan-part-2-orditorp/)).
+-   Use `ordipointlabel` which uses points and text labels to the
+    points, and tries to optimize the location of the text to minimize
+    the overlap (see [Decluttering
+    blog](http://www.fromthebottomoftheheap.net/2013/06/27/decluttering-ordination-plots-in-vegan-part-3-ordipointlabel/)).
+-   Ordination `text` and `points` functions have argument `select` that
+    can be used for full control of selecting items plotted as text or
+    points.
+-   Use interactive `orditkplot` function that lets you drag labels of
+    points to better positions if you need to see all labels. Only one
+    set of points can be used (see [Decluttering
+    blog](http://www.fromthebottomoftheheap.net/2013/12/31/decluttering-ordination-in-vegan-part-4-orditkplot/)).
+-   Most `plot` functions allow you to zoom to a part of the graph using
+    `xlim` and `ylim` arguments to reduce clutter in congested areas.
+
+------------------------------------------------------------------------
+
+### Can I flip an axis in ordination diagram?
+
+Use `xlim` or `ylim` with flipped limits. If you have model
+`mod <- cca(dune)` you can flip the first axis with
+`plot(mod, xlim = c(3, -2))`.
+
+------------------------------------------------------------------------
+
+### Can I zoom into an ordination plot?
+
+You can use `xlim` and `ylim` arguments in `plot` or `ordiplot` to zoom
+into ordination diagrams. Normally you must set both `xlim` and `ylim`
+because ordination plots will keep the equal aspect ratio of axes, and
+they will fill the graph so that the longer axis will fit.
+
+Dynamic zooming can be done with function `orditkplot`. You can directly
+save the edited `orditkplot` graph in various graphic formats, or you
+can export the graph object back to R and use `plot` to display the
+results.
+
+------------------------------------------------------------------------
+
+Other analysis methods
+----------------------
+
+------------------------------------------------------------------------
+
+### Is there TWINSPAN?
+
+No. It may be possible to port TWINSPAN to **vegan**, but it is not
+among the **vegan** top priorities. If anybody wants to try porting, I
+will be happy to help. TWINSPAN has a very permissive license, and it
+would be completely legal to port the function into R.
+
+------------------------------------------------------------------------
+
+### Why restricted permutation does not influence adonis results?
+
+The permutation scheme influences the permutation distribution of the
+statistics and probably the significance levels, but does not influence
+the calculation of the statistics.
+
+------------------------------------------------------------------------
+
+### How is deviance calculated?
+
+Some **vegan** functions, such as `radfit` use base R facility of
+`family` in maximum likelihood estimation. This allows use of several
+alternative error distributions, among them `"poisson"` and
+`"gaussian"`. The R `family` also defines the deviance. You can see the
+equations for deviance with commands like `poisson()$dev` or
+`gaussian()$dev`.
+
+In general, deviance is 2 times log.likelihood shifted so that models
+with exact fit have zero deviance.
+
+------------------------------------------------------------------------
diff --git a/inst/doc/FAQ-vegan.html b/inst/doc/FAQ-vegan.html
new file mode 100644
index 0000000..7470ad1
--- /dev/null
+++ b/inst/doc/FAQ-vegan.html
@@ -0,0 +1,911 @@
+<!DOCTYPE html>
+<html>
+<head>
+<meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>
+
+<title><strong>vegan</strong> FAQ</title>
+
+<script type="text/javascript">
+window.onload = function() {
+  var imgs = document.getElementsByTagName('img'), i, img;
+  for (i = 0; i < imgs.length; i++) {
+    img = imgs[i];
+    // center an image if it is the only element of its parent
+    if (img.parentElement.childElementCount === 1)
+      img.parentElement.style.textAlign = 'center';
+  }
+};
+</script>
+
+<!-- Styles for R syntax highlighter -->
+<style type="text/css">
+   pre .operator,
+   pre .paren {
+     color: rgb(104, 118, 135)
+   }
+
+   pre .literal {
+     color: #990073
+   }
+
+   pre .number {
+     color: #099;
+   }
+
+   pre .comment {
+     color: #998;
+     font-style: italic
+   }
+
+   pre .keyword {
+     color: #900;
+     font-weight: bold
+   }
+
+   pre .identifier {
+     color: rgb(0, 0, 0);
+   }
+
+   pre .string {
+     color: #d14;
+   }
+</style>
+
+<!-- R syntax highlighter -->
+<script type="text/javascript">
+var hljs=new function(){function m(p){return p.replace(/&/gm,"&").replace(/</gm,"<")}function f(r,q,p){return RegExp(q,"m"+(r.cI?"i":"")+(p?"g":""))}function b(r){for(var p=0;p<r.childNodes.length;p++){var q=r.childNodes[p];if(q.nodeName=="CODE"){return q}if(!(q.nodeType==3&&q.nodeValue.match(/\s+/))){break}}}function h(t,s){var p="";for(var r=0;r<t.childNodes.length;r++){if(t.childNodes[r].nodeType==3){var q=t.childNodes[r].nodeValue;if(s){q=q.replace(/\n/g,"")}p+=q}else{if(t.chi [...]
+hljs.initHighlightingOnLoad();
+</script>
+
+
+
+<style type="text/css">
+body, td {
+   font-family: sans-serif;
+   background-color: white;
+   font-size: 13px;
+}
+
+body {
+  max-width: 800px;
+  margin: auto;
+  padding: 1em;
+  line-height: 20px;
+}
+
+tt, code, pre {
+   font-family: 'DejaVu Sans Mono', 'Droid Sans Mono', 'Lucida Console', Consolas, Monaco, monospace;
+}
+
+h1 {
+   font-size:2.2em;
+}
+
+h2 {
+   font-size:1.8em;
+}
+
+h3 {
+   font-size:1.4em;
+}
+
+h4 {
+   font-size:1.0em;
+}
+
+h5 {
+   font-size:0.9em;
+}
+
+h6 {
+   font-size:0.8em;
+}
+
+a:visited {
+   color: rgb(50%, 0%, 50%);
+}
+
+pre, img {
+  max-width: 100%;
+}
+pre {
+  overflow-x: auto;
+}
+pre code {
+   display: block; padding: 0.5em;
+}
+
+code {
+  font-size: 92%;
+  border: 1px solid #ccc;
+}
+
+code[class] {
+  background-color: #F8F8F8;
+}
+
+table, td, th {
+  border: none;
+}
+
+blockquote {
+   color:#666666;
+   margin:0;
+   padding-left: 1em;
+   border-left: 0.5em #EEE solid;
+}
+
+hr {
+   height: 0px;
+   border-bottom: none;
+   border-top-width: thin;
+   border-top-style: dotted;
+   border-top-color: #999999;
+}
+
+ at media print {
+   * {
+      background: transparent !important;
+      color: black !important;
+      filter:none !important;
+      -ms-filter: none !important;
+   }
+
+   body {
+      font-size:12pt;
+      max-width:100%;
+   }
+
+   a, a:visited {
+      text-decoration: underline;
+   }
+
+   hr {
+      visibility: hidden;
+      page-break-before: always;
+   }
+
+   pre, blockquote {
+      padding-right: 1em;
+      page-break-inside: avoid;
+   }
+
+   tr, img {
+      page-break-inside: avoid;
+   }
+
+   img {
+      max-width: 100% !important;
+   }
+
+   @page :left {
+      margin: 15mm 20mm 15mm 10mm;
+   }
+
+   @page :right {
+      margin: 15mm 10mm 15mm 20mm;
+   }
+
+   p, h2, h3 {
+      orphans: 3; widows: 3;
+   }
+
+   h2, h3 {
+      page-break-after: avoid;
+   }
+}
+</style>
+
+
+
+</head>
+
+<body>
+<!--
+%\VignetteIndexEntry{vegan FAQ}
+%\VignetteEngine{knitr::knitr}
+%\VignetteEncoding{UTF-8}
+-->
+
+<h1><strong>vegan</strong> FAQ</h1>
+
+<p>This document contains answers to some of the most frequently asked
+questions about R package <strong>vegan</strong>.</p>
+
+<blockquote>
+<p>This work is licensed under the Creative Commons Attribution 3.0
+License. To view a copy of this license, visit
+<a href="http://creativecommons.org/licenses/by/3.0/">http://creativecommons.org/licenses/by/3.0/</a> or send a letter to
+Creative Commons, 543 Howard Street, 5th Floor, San Francisco,
+California, 94105, USA.</p>
+
+<p>Copyright © 2008-2016 vegan development team</p>
+</blockquote>
+
+<hr/>
+
+<h2>Introduction</h2>
+
+<hr/>
+
+<h3>What is <strong>vegan</strong>?</h3>
+
+<p><strong>Vegan</strong> is an R package for community ecologists. It contains the most
+popular methods of multivariate analysis needed in analysing ecological
+communities, and tools for diversity analysis, and other potentially
+useful functions. <strong>Vegan</strong> is not self-contained but it must be run
+under R statistical environment, and it also depends on many other R
+packages. <strong>Vegan</strong> is <a href="http://www.gnu.org/philosophy/free-sw.html">free
+software</a> and distributed
+under <a href="http://www.gnu.org/licenses/gpl.html">GPL2 license</a>.</p>
+
+<hr/>
+
+<h3>What is R?</h3>
+
+<p>R is a system for statistical computation and graphics. It consists of a
+language plus a run-time environment with graphics, a debugger, access
+to certain system functions, and the ability to run programs stored in
+script files.</p>
+
+<p>R has a home page at <a href="http://www.R-project.org/">http://www.R-project.org/</a>. It is <a href="http://www.gnu.org/philosophy/free-sw.html">free
+software</a> distributed under
+a GNU-style <a href="http://www.gnu.org/copyleft/copyleft.html">copyleft</a>, and
+an official part of the <a href="http://www.gnu.org/">GNU</a> project (“GNU S”).</p>
+
+<hr/>
+
+<h3>How to obtain <strong>vegan</strong> and R?</h3>
+
+<p>Both R and latest release version of <strong>vegan</strong> can be obtained through
+<a href="http://cran.r-project.org">CRAN</a>. Unstable development version of
+<strong>vegan</strong> can be obtained through
+<a href="https://github.com/vegandevs/vegan">GitHub</a>. Formerly <strong>vegan</strong> was
+developed in <a href="http://r-forge.r-project.org/projects/vegan/">R-Forge</a>,
+but after moving to <a href="https://github.com/vegandevs/vegan">GitHub</a> the
+R-Forge repository may be out of date.</p>
+
+<hr/>
+
+<h3>What R packages <strong>vegan</strong> depends on?</h3>
+
+<p><strong>Vegan</strong> depends on the <strong>permute</strong> package which will provide advanced
+and flexible permutation routines for <strong>vegan</strong>. The <strong>permute</strong> package
+is developed together with <strong>vegan</strong> in
+<a href="https://github.com/gavinsimpson/permute">GitHub</a>.</p>
+
+<p>Some individual <strong>vegan</strong> functions depend on packages <strong>MASS</strong>,
+<strong>mgcv</strong>, <strong>parallel</strong>, <strong>cluster</strong>, <strong>lattice</strong> and <strong>tcltk</strong>. These
+all are base or recommended R packages that should be available in
+every R installation.  <strong>Vegan</strong> declares these as suggested or
+imported packages, and you can install <strong>vegan</strong> and use most of its
+functions without these packages.</p>
+
+<p><strong>Vegan</strong> is accompanied with a supporting package <strong>vegan3d</strong> for
+three-dimensional and dynamic plotting. The <strong>vegan3d</strong> package needs
+non-standard packages <strong>rgl</strong> and <strong>scatterplot3d</strong>.</p>
+
+<hr/>
+
+<h3>What other packages are available for ecologists?</h3>
+
+<p>CRAN <a href="http://cran.r-project.org/src/contrib/Views/">Task Views</a> include
+entries like <code>Environmetrics</code>, <code>Multivariate</code> and <code>Spatial</code> that
+describe several useful packages and functions. If you install R package
+<strong>ctv</strong>, you can inspect Task Views from your R session, and
+automatically install sets of most important packages.</p>
+
+<hr/>
+
+<h3>What other documentation is available for <strong>vegan</strong>?</h3>
+
+<p><strong>Vegan</strong> is a fully documented R package with standard help pages.
+These are the most authoritative sources of documentation (and as a last
+resource you can use the force and the read the source, as <strong>vegan</strong> is
+open source). <strong>Vegan</strong> package ships with other documents which can be
+read with <code>vegandocs</code> command (documented in the <strong>vegan</strong> help). The
+documents included in the <strong>vegan</strong> package are</p>
+
+<ul>
+<li>  <strong>Vegan</strong> <code>NEWS</code></li>
+<li>  This document (<code>FAQ-vegan</code>).</li>
+<li>  Short introduction to basic ordination methods in <strong>vegan</strong>
+(<code>intro-vegan</code>).</li>
+<li>  Introduction to diversity methods in <strong>vegan</strong>
+(<code>diversity-vegan</code>).</li>
+<li>  Discussion on design decisions in <strong>vegan</strong> (<code>decision-vegan</code>).</li>
+<li>  Description of variance partition procedures in function <code>varpart</code>
+(<code>partitioning</code>).</li>
+</ul>
+
+<p>Web documents outside the package include:</p>
+
+<ul>
+<li>  <a href="https://github.com/vegandevs/vegan">https://github.com/vegandevs/vegan</a>: <strong>vegan</strong> homepage.</li>
+<li>  <a href="http://cc.oulu.fi/%7Ejarioksa/opetus/metodi/vegantutor.pdf">http://cc.oulu.fi/~jarioksa/opetus/metodi/vegantutor.pdf</a>:
+<strong>vegan</strong> tutorial.</li>
+</ul>
+
+<hr/>
+
+<h3>Is there a Graphical User Interface (GUI) for <strong>vegan</strong>?</h3>
+
+<p>Roeland Kindt has made package <strong>BiodiversityR</strong> which provides a GUI
+for <strong>vegan</strong>. The package is available at
+<a href="https://cran.r-project.org/package=BiodiversityR">CRAN</a>.
+It is not a mere GUI for <strong>vegan</strong>, but adds some new functions and
+complements <strong>vegan</strong> functions in order to provide a workbench for
+biodiversity analysis. You can install <strong>BiodiversityR</strong> using
+<code>install.packages("BiodiversityR")</code> or graphical package management menu
+in R. The GUI works on Windows, MacOS X and Linux.</p>
+
+<hr/>
+
+<h3>How to cite <strong>vegan</strong>?</h3>
+
+<p>Use command <code>citation("vegan")</code> in R to see the recommended citation to
+be used in publications.</p>
+
+<hr/>
+
+<h3>How to build <strong>vegan</strong> from sources?</h3>
+
+<p>In general, you do not need to build <strong>vegan</strong> from sources, but binary
+builds of release versions are available through
+<a href="http://cran.r-project.org/">CRAN</a> for Windows and MacOS X. If you use
+some other operating systems, you may have to use source packages.
+<strong>Vegan</strong> is a standard R package, and can be built like instructed in R
+documentation. <strong>Vegan</strong> contains source files in C and FORTRAN, and you
+need appropriate compilers (which may need more work in Windows and
+MacOS X).</p>
+
+<hr/>
+
+<h3>Are there binaries for devel versions?</h3>
+
+<p><a href="http://r-forge.r-project.org/projects/vegan/">R-Forge</a> runs daily tests
+on the devel package, and if passed, it builds source package together
+with Windows binaries. However, the R-Forge may be out of date, because
+<strong>vegan</strong> is mainly developed in
+<a href="https://github.com/vegandevs/vegan">GitHub</a>. You can install R-Forge
+packages within R with command
+<code>install.packages("vegan", repos="http://r-forge.r-project.org/")</code>. If
+you use GUI menu entry, you must select or define the R-Forge
+repository.</p>
+
+<hr/>
+
+<h3>How to report a bug in <strong>vegan</strong>?</h3>
+
+<p>If you think you have found a bug in <strong>vegan</strong>, you should report it to
+<strong>vegan</strong> maintainers or developers. The preferred forum to report bugs
+is <a href="https://github.com/vegandevs/vegan/issues">GitHub</a>. The bug report
+should be so detailed that the bug can be replicated and corrected.
+Preferably, you should send an example that causes a bug. If it needs a
+data set that is not available in R, you should send a minimal data set
+as well. You also should paste the output or error message in your
+message. You also should specify which version of <strong>vegan</strong> you used.</p>
+
+<p>Bug reports are welcome: they are the only way to make <strong>vegan</strong>
+non-buggy.</p>
+
+<p>Please note that you shall not send bug reports to R mailing lists,
+since <strong>vegan</strong> is not a standard R package.</p>
+
+<hr/>
+
+<h3>Is it a bug or a feature?</h3>
+
+<p>It is not necessarily a bug if some function gives different results
+than you expect: That may be a deliberate design decision. It may be
+useful to check the documentation of the function to see what was the
+intended behaviour. It may also happen that function has an argument to
+switch the behaviour to match your expectation. For instance, function
+<code>vegdist</code> always calculates quantitative indices (when this is
+possible). If you expect it to calculate a binary index, you should use
+argument <code>binary = TRUE</code>.</p>
+
+<hr/>
+
+<h3>Can I contribute to <strong>vegan</strong>?</h3>
+
+<p><strong>Vegan</strong> is dependent on user contribution. All feedback is welcome. If
+you have problems with <strong>vegan</strong>, it may be as simple as incomplete
+documentation, and we shall do our best to improve the documents.</p>
+
+<p>Feature requests also are welcome, but they are not necessarily
+fulfilled. A new feature will be added if it is easy to do and it looks
+useful, or if you submit code.</p>
+
+<p>If you can write code yourself, the best forum to contribute to vegan is
+<a href="https://github.com/vegandevs/vegan">GitHub</a>.</p>
+
+<hr/>
+
+<h2>Ordination</h2>
+
+<hr/>
+
+<h3>I have only numeric and positive data but <strong>vegan</strong> still complains</h3>
+
+<p>You are wrong! Computers are painfully pedantic, and if they find
+non-numeric or negative data entries, you really have them. Check your
+data. Most common reasons for non-numeric data are that row names were
+read as a non-numeric variable instead of being used as row names (check
+argument <code>row.names</code> in reading the data), or that the column names were
+interpreted as data (check argument <code>header = TRUE</code> in reading the
+data). Another common reason is that you had empty cells in your input
+data, and these were interpreted as missing values.</p>
+
+<hr/>
+
+<h3>Can I analyse binary or cover class data?</h3>
+
+<p>Yes. Most <strong>vegan</strong> methods can handle binary data or cover abundance
+data. Most statistical tests are based on permutation, and do not make
+distributional assumptions. There are some methods (mainly in diversity
+analysis) that need count data. These methods check that input data are
+integers, but they may be fooled by cover class data.</p>
+
+<hr/>
+
+<h3>Why dissimilarities in <strong>vegan</strong> differ from other sources?</h3>
+
+<p>Most commonly the reason is that other software use presence–absence
+data whereas <strong>vegan</strong> used quantitative data. Usually <strong>vegan</strong> indices
+are quantitative, but you can use argument <code>binary = TRUE</code> to make them
+presence–absence. However, the index name is the same in both cases,
+although different names usually occur in literature. For instance,
+Jaccard index actually refers to the binary index, but <strong>vegan</strong> uses
+name <code>"jaccard"</code> for the quantitative index, too.</p>
+
+<p>Another reason may be that indices indeed are defined differently,
+because people use same names for different indices.</p>
+
+<hr/>
+
+<h3>Why NMDS stress is sometimes 0.1 and sometimes 10?</h3>
+
+<p>Stress is a proportional measure of badness of fit. The proportions can
+be expressed either as parts of one or as percents. Function <code>isoMDS</code>
+(<strong>MASS</strong> package) uses percents, and function <code>monoMDS</code> (<strong>vegan</strong>
+package) uses proportions, and therefore the same stress is 100 times
+higher in <code>isoMDS</code>. The results of <code>goodness</code> function also depend on
+the definition of stress, and the same <code>goodness</code> is 100 times higher in
+<code>isoMDS</code> than in <code>monoMDS</code>. Both of these conventions are equally
+correct.</p>
+
+<hr/>
+
+<h3>I get zero stress but no convergent solutions in <code>metaMDS</code></h3>
+
+<p>Most common reason is that you have too few observations for your NMDS.
+For <code>n</code> observations (points) and <code>k</code> dimensions you need to estimate
+<code>n*k</code> parameters (ordination scores) using <code>n*(n-1)/2</code> dissimilarities.
+For <code>k</code> dimensions you must have <code>n > 2*k + 1</code>, or for two dimensions at
+least six points. In some degenerate situations you may need even a
+larger number of points. If you have a lower number of points, you can
+find an undefined number of perfect (stress is zero) but different
+solutions. Conventional wisdom due to Kruskal is that you should have
+<code>n > 4*k + 1</code> points for <code>k</code> dimensions. A typical symptom of
+insufficient data is that you have (nearly) zero stress but no two
+convergent solutions. In those cases you should reduce the number of
+dimensions (<code>k</code>) and with very small data sets you should not use
+<code>NMDS</code>, but rely on metric methods.</p>
+
+<p>It seems that local and hybrid scaling with <code>monoMDS</code> have similar lower
+limits in practice (although theoretically they could differ). However,
+higher number of dimensions can be used in metric scaling, both with
+<code>monoMDS</code> and in principal coordinates analysis (<code>cmdscale</code> in
+<strong>stats</strong>, <code>wcmdscale</code> in <strong>vegan</strong>).</p>
+
+<hr/>
+
+<h3>Zero dissimilarities in isoMDS</h3>
+
+<p>Function <code>metaMDS</code> uses function <code>monoMDS</code> as its default method for
+NMDS, and this function can handle zero dissimilarities. Alternative
+function <code>isoMDS</code> cannot handle zero dissimilarities. If you want to use
+<code>isoMDS</code>, you can use argument <code>zerodist = "add"</code> in <code>metaMDS</code> to handle
+zero dissimilarities. With this argument, zero dissimilarities are
+replaced with a small positive value, and they can be handled in
+<code>isoMDS</code>. This is a kluge, and some people do not like this. A more
+principal solution is to remove duplicate sites using R command
+<code>unique</code>. However, after some standardizations or with some
+dissimilarity indices, originally non-unique sites can have zero
+dissimilarity, and you have to resort to the kluge (or work harder with
+your data). Usually it is better to use <code>monoMDS</code>.</p>
+
+<hr/>
+
+<h3>I have heard that you cannot fit environmental vectors or surfaces to NMDS results which only have rank-order scores</h3>
+
+<p>Claims like this have indeed been at large in the Internet, but they are
+based on grave misunderstanding and are plainly wrong. NMDS ordination
+results are strictly metric, and in <strong>vegan</strong> <code>metaMDS</code> and <code>monoMDS</code>
+they are even strictly Euclidean. The method is called “non-metric”
+because the Euclidean distances in ordination space have a non-metric
+rank-order relationship to community dissimilarities. You can inspect
+this non-linear step curve using function <code>stressplot</code> in <strong>vegan</strong>.
+Because the ordination scores are strictly Euclidean, it is correct to
+use <strong>vegan</strong> functions <code>envfit</code> and <code>ordisurf</code> with NMDS results.</p>
+
+<hr/>
+
+<h3>Where can I find numerical scores of ordination axes?</h3>
+
+<p>Normally you can use function <code>scores</code> to extract ordination scores for
+any ordination method. The <code>scores</code> function can also find ordination
+scores for many non-<strong>vegan</strong> functions such as for <code>prcomp</code> and
+<code>princomp</code> and for some <strong>ade4</strong> functions.</p>
+
+<p>In some cases the ordination result object stores raw scores, and the
+axes are also scaled appropriate when you access them with <code>scores</code>. For
+instance, in <code>cca</code> and <code>rda</code> the ordination object has only so-called
+normalized scores, and they are scaled for ordination plots or for other
+use when they are accessed with <code>scores</code>.</p>
+
+<hr/>
+
+<h3>How the RDA results are scaled?</h3>
+
+<p>The scaling or RDA results indeed differ from most other software
+packages. The scaling of RDA is such a complicated issue that it cannot
+be explained in this FAQ, but it is explained in a separate pdf document
+on “Design decision and implementation details in vegan” that you can
+read with <strong>vegan</strong> command <code>vegandocs("decision")</code>.</p>
+
+<hr/>
+
+<h3>cca fails with “data.frame expected” or “"site.env" missing”</h3>
+
+<p>This is not a <strong>vegan</strong> error message, but it comes from the <code>cca</code>
+function in the <strong>ade4</strong> package. There is an unfortunate name clash,
+and if you have loaded <strong>ade4</strong> after <strong>vegan</strong>, the <strong>ade4</strong> version of
+<code>cca</code> will mask the <strong>vegan</strong> version. You can use the <strong>vegan</strong> version
+using command <code>vegan::cca()</code>. If you do not need package <strong>ade4</strong>, you
+can detach it with command <code>detach(package:ade4)</code>.</p>
+
+<hr/>
+
+<h3>Ordination fails with “Error in La.svd”</h3>
+
+<p>Constrained ordination (<code>cca</code>, <code>rda</code>, <code>capscale</code>) will sometimes fail
+with error message
+<code>Error in La.svd(x, nu, nv): error code 1 from Lapack routine 'dgesdd'.</code></p>
+
+<p>It seems that the basic problem is in the <code>svd</code> function of <code>LAPACK</code>
+that is used for numerical analysis in R. <code>LAPACK</code> is an external
+library that is beyond the control of package developers and R core team
+so that these problems may be unsolvable. It seems that the problems
+with the <code>LAPACK</code> code are so common that even the help page of <code>svd</code>
+warns about them</p>
+
+<p>Reducing the range of constraints (environmental variables) helps
+sometimes. For instance, multiplying constraints by a constant < 1.
+This rescaling does not influence the numerical results of constrained
+ordination, but it can complicate further analyses when values of
+constraints are needed, because the same scaling must be applied there.
+We can only hope that this problem is fixed in the future versions of R
+and <code>LAPACK</code>.</p>
+
+<hr/>
+
+<h3>Variance explained by ordination axes.</h3>
+
+<p>In general, <strong>vegan</strong> does not directly give any statistics on the
+“variance explained” by ordination axes or by the constrained axes. This
+is a design decision: I think this information is normally useless and
+often misleading. In community ordination, the goal typically is not to
+explain the variance, but to find the “gradients” or main trends in the
+data. The “total variation” often is meaningless, and all proportions of
+meaningless values also are meaningless. Often a better solution
+explains a smaller part of “total variation”. For instance, in
+unstandardized principal components analysis most of the variance is
+generated by a small number of most abundant species, and they are easy
+to “explain” because data really are not very multivariate. If you
+standardize your data, all species are equally important. The first axes
+explains much less of the “total variation”, but now they explain all
+species equally, and results typically are much more useful for the
+whole community. Correspondence analysis uses another measure of
+variation (which is not variance), and again it typically explains a
+“smaller proportion” than principal components but with a better result.
+Detrended correspondence analysis and nonmetric multidimensional scaling
+even do not try to “explain” the variation, but use other criteria. All
+methods are incommensurable, and it is impossible to compare methods
+using “explanation of variation”.</p>
+
+<p>If you still want to get “explanation of variation” (or a deranged
+editor requests that from you), it is possible to get this information
+for some methods:</p>
+
+<ul>
+<li>  Eigenvector methods: Functions <code>rda</code>, <code>cca</code> and <code>capscale</code> give the
+variation of conditional (partialled), constrained (canonical) and
+residual components, but you must calculate the proportions by hand.
+Function <code>eigenvals</code> extracts the eigenvalues, and
+<code>summary(eigenvals(ord))</code> reports the proportions explained in the
+result object <code>ord</code>. Function <code>RsquareAdj</code> gives the R-squared and
+adjusted R-squared (if available) for constrained components.
+Function <code>goodness</code> gives the same statistics for individual species
+or sites (species are unavailable with <code>capscale</code>). In addition,
+there is a special function <code>varpart</code> for unbiased partitioning of
+variance between up to four separate components in redundancy
+analysis.</li>
+<li>  Detrended correspondence analysis (function <code>decorana</code>). The total
+amount of variation is undefined in detrended correspondence
+analysis, and therefore proportions from total are unknown and
+undefined. DCA is not a method for decomposition of variation, and
+therefore these proportions would not make sense either.</li>
+<li>  Nonmetric multidimensional scaling. NMDS is a method for nonlinear
+mapping, and the concept of of variation explained does not make
+sense. However, 1 - stress^2 transforms nonlinear stress into
+quantity analogous to squared correlation coefficient. Function
+<code>stressplot</code> displays the nonlinear fit and gives this statistic.</li>
+</ul>
+
+<hr/>
+
+<h3>Can I have random effects in constrained ordination or in <code>adonis</code>?</h3>
+
+<p>No. Strictly speaking, this is impossible. However, you can define
+models that respond to similar goals as random effects models, although
+they strictly speaking use only fixed effects.</p>
+
+<p>Constrained ordination functions <code>cca</code>, <code>rda</code> and <code>capscale</code> can have
+<code>Condition()</code> terms in their formula. The <code>Condition()</code> define partial
+terms that are fitted before other constraints and can be used to remove
+the effects of background variables, and their contribution to
+decomposing inertia (variance) is reported separately. These partial
+terms are often regarded as similar to random effects, but they are
+still fitted in the same way as other terms and strictly speaking they
+are fixed terms.</p>
+
+<p>Function <code>adonis</code> evaluates terms sequentially. In a model with
+right-hand-side <code>~ A + B</code> the effects of <code>A</code> are evaluated first, and
+the effects of <code>B</code> after removing the effects of <code>A</code>. Sequential tests
+are also available in <code>anova</code> function for constrained ordination
+results by setting argument <code>by = "term"</code>. In this way, the first terms
+can serve in a similar role as random effects, although they are fitted
+in the same way as all other terms, and strictly speaking they are fixed
+terms.</p>
+
+<p>All permutation tests in <strong>vegan</strong> are based on the <strong>permute</strong> package
+that allows constructing various restricted permutation schemes. For
+instance, you can set levels of <code>plots</code> or <code>blocks</code> for a factor
+regarded as a random term.</p>
+
+<p>A major reason why real random effects models are impossible in most
+<strong>vegan</strong> functions is that their tests are based on the permutation of
+the data. The data are given, that is fixed, and therefore permutation
+tests are basically tests of fixed terms on fixed data. Random effect
+terms would require permutations of data with a random component instead
+of the given, fixed data, and such tests are not available in <strong>vegan</strong>.</p>
+
+<hr/>
+
+<h3>Is it possible to have passive points in ordination?</h3>
+
+<p><strong>Vegan</strong> does not have a concept of passive points, or a point that
+should only little influence the ordination results. However, you can
+add points to eigenvector methods using <code>predict</code> functions with
+<code>newdata</code>. You can first perform an ordination without some species or
+sites, and then you can find scores for all points using your complete
+data as <code>newdata</code>. The <code>predict</code> functions are available for basic
+eigenvector methods in <strong>vegan</strong> (<code>cca</code>, <code>rda</code>, <code>decorana</code>, for an
+up-to-date list, use command <code>methods("predict")</code>). You also can
+simulate the passive points in R by using low weights to row and columns
+(this is the method used in software with passive points). For instance,
+the following command makes row 3 “passive”:
+<code>dune[3,] <- 0.001*dune[3,]</code>.</p>
+
+<hr/>
+
+<h3>Class variables and dummies</h3>
+
+<p>You should define a class variable as an R <code>factor</code>, and <strong>vegan</strong> will
+automatically handle them with formula interface. You also can define
+constrained ordination without formula interface, but then you must code
+your class variables by hand.</p>
+
+<p>R (and <strong>vegan</strong>) knows both unordered and ordered factors. Unordered
+factors are internally coded as dummy variables, but one redundant level
+is removed or aliased. With default contrasts, the removed level is the
+first one. Ordered factors are expressed as polynomial contrasts. Both
+of these contrasts explained in standard R documentation.</p>
+
+<hr/>
+
+<h3>How are environmental arrows scaled?</h3>
+
+<p>The printed output of <code>envfit</code> gives the direction cosines which are the
+coordinates of unit length arrows. For plotting, these are scaled by
+their correlation (square roots of column <code>r2</code>). You can see the scaled
+lengths of <code>envfit</code> arrows using command <code>scores</code>.</p>
+
+<p>The scaled environmental vectors from <code>envfit</code> and the arrows for
+continuous environmental variables in constrained ordination (<code>cca</code>,
+<code>rda</code>, <code>capscale</code>) are adjusted to fill the current graph. The lengths
+of arrows do not have fixed meaning with respect to the points (species,
+sites), but they can only compared against each other, and therefore
+only their relative lengths are important.</p>
+
+<p>If you want change the scaling of the arrows, you can use <code>text</code>
+(plotting arrows and text) or <code>points</code> (plotting only arrows) functions
+for constrained ordination. These functions have argument <code>arrow.mul</code>
+which sets the multiplier. The <code>plot</code> function for <code>envfit</code> also has the
+<code>arrow.mul</code> argument to set the arrow multiplier. If you save the
+invisible result of the constrained ordination <code>plot</code> command, you can
+see the value of the currently used <code>arrow.mul</code> which is saved as an
+attribute of <code>biplot</code> scores.</p>
+
+<p>Function <code>ordiArrowMul</code> is used to find the scaling for the current
+plot. You can use this function to see how arrows would be scaled:</p>
+
+<pre><code class="r">sol <- cca(varespec)
+ef <- envfit(sol ~ ., varechem)
+plot(sol)
+ordiArrowMul(scores(ef, display="vectors"))
+</code></pre>
+
+<hr/>
+
+<h3>I want to use Helmert or sum contrasts</h3>
+
+<p><code>vegan</code> uses standard R utilities for defining contrasts. The default in
+standard installations is to use treatment contrasts, but you can change
+the behaviour globally setting <code>options</code> or locally by using keyword
+<code>contrasts</code>. Please check the R help pages and user manuals for details.</p>
+
+<hr/>
+
+<h3>What are aliased variables and how to see them?</h3>
+
+<p>Aliased variable has no information because it can be expressed with the
+help of other variables. Such variables are automatically removed in
+constrained ordination in <strong>vegan</strong>. The aliased variables can be
+redundant levels of factors or whole variables.</p>
+
+<p><strong>Vegan</strong> function <code>alias</code> gives the defining equations for aliased
+variables. If you only want to see the names of aliased variables or
+levels in solution <code>sol</code>, use <code>alias(sol, names.only=TRUE)</code>.</p>
+
+<hr/>
+
+<h3>Plotting aliased variables</h3>
+
+<p>You can fit vectors or class centroids for aliased variables using
+<code>envfit</code> function. The <code>envfit</code> function uses weighted fitting, and the
+fitted vectors are identical to the vectors in correspondence analysis.</p>
+
+<hr/>
+
+<h3>Restricted permutations in <strong>vegan</strong></h3>
+
+<p><strong>Vegan</strong> uses <strong>permute</strong> package in all its permutation tests. The
+<strong>permute</strong> package will allow restricted permutation designs for time
+series, line transects, spatial grids and blocking factors. The
+construction of restricted permutation schemes is explained in the
+manual page <code>permutations</code> in <strong>vegan</strong> and in the documentation of the
+<strong>permute</strong> package.</p>
+
+<hr/>
+
+<h3>How to use different plotting symbols in ordination graphics?</h3>
+
+<p>The default ordination <code>plot</code> function is intended for fast plotting and
+it is not very configurable. To use different plotting symbols, you
+should first create and empty ordination plot with
+<code>plot(..., type="n")</code>, and then add <code>points</code> or <code>text</code> to the created
+empty frame (here <code>...</code> means other arguments you want to give to your
+<code>plot</code> command). The <code>points</code> and <code>text</code> commands are fully
+configurable, and allow different plotting symbols and characters.</p>
+
+<hr/>
+
+<h3>How to avoid cluttered ordination graphs?</h3>
+
+<p>If there is a really high number of species or sites, the graphs often
+are congested and many labels are overwritten. It may be impossible to
+have complete readable graphics with some data sets. Below we give a
+brief overview of tricks you can use. Gavin Simpson’s blog <a href="http://www.fromthebottomoftheheap.net">From the
+bottom of the heap</a> has a series
+of articles on “decluttering ordination plots” with more detailed
+discussion and examples.</p>
+
+<ul>
+<li>  Use only points, possibly with different types if you do not need to
+see the labels. You may need to first create an empty plot using
+<code>plot(..., type="n")</code>, if you are not satisfied with the default
+graph. (Here and below <code>...</code> means other arguments you want to give
+to your <code>plot</code> command.)</li>
+<li>  Use points and add labels to desired points using interactive
+<code>identify</code> command if you do not need to see all labels.</li>
+<li>  Add labels using function <code>ordilabel</code> which uses non-transparent
+background to the text. The labels still shadow each other, but the
+uppermost labels are readable. Argument <code>priority</code> will help in
+displaying the most interesting labels (see <a href="http://www.fromthebottomoftheheap.net/2013/01/12/decluttering-ordination-plots-in-vegan-part-1-ordilabel/">Decluttering blog, part
+1</a>).</li>
+<li>  Use <code>orditorp</code> function that uses labels only if these can be added
+to a graph without overwriting other labels, and points otherwise,
+if you do not need to see all labels. You must first create an empty
+plot using <code>plot(..., type="n")</code>, and then add labels or points with
+<code>orditorp</code> (see <a href="http://www.fromthebottomoftheheap.net/2013/01/13/decluttering-ordination-plots-in-vegan-part-2-orditorp/">Decluttering
+blog</a>).</li>
+<li>  Use <code>ordipointlabel</code> which uses points and text labels to the
+points, and tries to optimize the location of the text to minimize
+the overlap (see <a href="http://www.fromthebottomoftheheap.net/2013/06/27/decluttering-ordination-plots-in-vegan-part-3-ordipointlabel/">Decluttering
+blog</a>).</li>
+<li>  Ordination <code>text</code> and <code>points</code> functions have argument <code>select</code> that
+can be used for full control of selecting items plotted as text or
+points.</li>
+<li>  Use interactive <code>orditkplot</code> function that lets you drag labels of
+points to better positions if you need to see all labels. Only one
+set of points can be used (see <a href="http://www.fromthebottomoftheheap.net/2013/12/31/decluttering-ordination-in-vegan-part-4-orditkplot/">Decluttering
+blog</a>).</li>
+<li>  Most <code>plot</code> functions allow you to zoom to a part of the graph using
+<code>xlim</code> and <code>ylim</code> arguments to reduce clutter in congested areas.</li>
+</ul>
+
+<hr/>
+
+<h3>Can I flip an axis in ordination diagram?</h3>
+
+<p>Use <code>xlim</code> or <code>ylim</code> with flipped limits. If you have model
+<code>mod <- cca(dune)</code> you can flip the first axis with
+<code>plot(mod, xlim = c(3, -2))</code>.</p>
+
+<hr/>
+
+<h3>Can I zoom into an ordination plot?</h3>
+
+<p>You can use <code>xlim</code> and <code>ylim</code> arguments in <code>plot</code> or <code>ordiplot</code> to zoom
+into ordination diagrams. Normally you must set both <code>xlim</code> and <code>ylim</code>
+because ordination plots will keep the equal aspect ratio of axes, and
+they will fill the graph so that the longer axis will fit.</p>
+
+<p>Dynamic zooming can be done with function <code>orditkplot</code>. You can directly
+save the edited <code>orditkplot</code> graph in various graphic formats, or you
+can export the graph object back to R and use <code>plot</code> to display the
+results.</p>
+
+<hr/>
+
+<h2>Other analysis methods</h2>
+
+<hr/>
+
+<h3>Is there TWINSPAN?</h3>
+
+<p>No. It may be possible to port TWINSPAN to <strong>vegan</strong>, but it is not
+among the <strong>vegan</strong> top priorities. If anybody wants to try porting, I
+will be happy to help. TWINSPAN has a very permissive license, and it
+would be completely legal to port the function into R.</p>
+
+<hr/>
+
+<h3>Why restricted permutation does not influence adonis results?</h3>
+
+<p>The permutation scheme influences the permutation distribution of the
+statistics and probably the significance levels, but does not influence
+the calculation of the statistics.</p>
+
+<hr/>
+
+<h3>How is deviance calculated?</h3>
+
+<p>Some <strong>vegan</strong> functions, such as <code>radfit</code> use base R facility of
+<code>family</code> in maximum likelihood estimation. This allows use of several
+alternative error distributions, among them <code>"poisson"</code> and
+<code>"gaussian"</code>. The R <code>family</code> also defines the deviance. You can see the
+equations for deviance with commands like <code>poisson()$dev</code> or
+<code>gaussian()$dev</code>.</p>
+
+<p>In general, deviance is 2 times log.likelihood shifted so that models
+with exact fit have zero deviance.</p>
+
+<hr/>
+
+</body>
+
+</html>
diff --git a/inst/doc/FAQ-vegan.pdf b/inst/doc/FAQ-vegan.pdf
deleted file mode 100644
index c4044c7..0000000
Binary files a/inst/doc/FAQ-vegan.pdf and /dev/null differ
diff --git a/inst/doc/NEWS.html b/inst/doc/NEWS.html
deleted file mode 100644
index e36b4e9..0000000
--- a/inst/doc/NEWS.html
+++ /dev/null
@@ -1,1633 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: vegan News</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<link rel="stylesheet" type="text/css" href="R.css" />
-</head><body>
-
-<table width="100%" summary="page for NEWS"><tr><td>NEWS</td><td style="text-align: right;">R Documentation</td></tr></table>
-
-<h2>vegan News</h2>
-
-<h3>Changes in version 2.3-1</h3>
-
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li><p> Permutation tests did not always correctly recognize ties
-with the observed statistic and this could result in too low
-<i>P</i>-values. This would happen in particular when all predictor
-variables were factors (classes). The changes concern functions
-<code>adonis</code>, <code>anosim</code>, <code>anova</code> and <code>permutest</code>
-functions for <code>cca</code>, <code>rda</code> and <code>capscale</code>,
-<code>permutest</code> for <code>betadisper</code>, <code>envfit</code>,
-<code>mantel</code> and <code>mantel.partial</code>, <code>mrpp</code>, <code>mso</code>,
-<code>oecosimu</code>, <code>ordiareatest</code>, <code>protest</code> and
-<code>simper</code>. This also fixes issues
-<a href="https://github.com/vegandevs/vegan/issues/120">#120</a> and
-<a href="https://github.com/vegandevs/vegan/issues/132">#132</a> in
-GitHub.
-</p>
-</li>
-<li><p> Automated model building in constrained ordination
-(<code>cca</code>, <code>rda</code>, <code>capscale</code>) with <code>step</code>,
-<code>ordistep</code> and <code>ordiR2step</code> could fail if there were
-aliased candidate variables, or constraints that were completely
-explained by other variables already in the model. This was a
-regression introduced in <span class="pkg">vegan</span> 2.2-0.
-</p>
-</li>
-<li><p> Constrained ordination methods <code>cca</code>, <code>rda</code> and
-<code>capscale</code> treat character variables as factors in analysis,
-but did not return their centroids for plotting.
-</p>
-</li>
-<li><p> Recovery of original data in <code>metaMDS</code> when computing
-WA scores for species would fail if the expression supplied to
-argument <code>comm</code> was long & got deparsed to multiple
-strings. <code>metaMDSdist</code> now returns the (possibly modified)
-data frame of community data <code>comm</code> as attribute
-<code>"comm"</code> of the returned <code>dist</code> object. <code>metaMDS</code>
-now uses this to compute the WA species scores for the NMDS. In
-addition, the deparsed expression for <code>comm</code> is now robust to
-long expressions.  Reported by Richard Telford.
-</p>
-</li>
-<li> <p><code>metaMDS</code> and <code>monoMDS</code> rejected dissimilarities
-with missing values.
-</p>
-</li>
-<li><p> Function <code>rarecurve</code> did not check its input and this
-could cause confusing error messages. Now function checks that
-input data are integers that can be interpreted as counts on
-individuals and all sampling units have some species. Unchecked
-bad inputs were the reason for problems reported in
-<a href="http://stackoverflow.com/questions/30856909/error-while-using-rarecurve-in-r">Stackoverflow</a>.
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES AND FUNCTIONS</h4>
-
-
-<ul>
-<li><p> Scaling of ordination axes in <code>cca</code>, <code>rda</code> and
-<code>capscale</code> can now be expressed with descriptive strings
-<code>"none"</code>, <code>"sites"</code>, <code>"species"</code> or
-<code>"symmetric"</code> to tell which kind of scores should be scaled by
-eigenvalues. These can be further modified with arguments
-<code>hill</code> in <code>cca</code> and <code>correlation</code> in <code>rda</code>. The
-old numeric scaling can still be used.
-</p>
-</li>
-<li><p> The permutation data can be extracted from <code>anova</code>
-results of constrained ordination (<code>cca</code>, <code>rda</code>,
-<code>capscale</code>) and further analysed with <code>permustats</code>
-function.
-</p>
-</li>
-<li><p> New data set <code>BCI.env</code> of site information for the Barro
-Colorado Island tree community data. Most useful variables are the
-UTM coordinates of sample plots. Other variables are constant or
-nearly constant and of little use in normal analysis.
-</p>
-</li></ul>
-
- 
-
-
-<h3>Changes in version 2.3-0</h3>
-
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li><p> Constrained ordination functions <code>cca</code>, <code>rda</code> and
-<code>capscale</code> are now more robust. Scoping of data set names and
-variable names is much improved. This should fix numerous
-long-standing problems, for instance those reported by Benedicte
-Bachelot (in email) and Richard Telford (in Twitter), as well as
-issues <a href="https://github.com/vegandevs/vegan/issues/16">#16</a>
-and <a href="https://github.com/vegandevs/vegan/issues/100">#100</a> in
-GitHub.
-</p>
-</li>
-<li><p> Ordination functions <code>cca</code> and <code>rda</code> silently
-accepted dissimilarities as input although their analysis makes
-no sense with these methods. Dissimilarities should be analysed
-with distance-based redundancy analysis (<code>capscale</code>).
-</p>
-</li>
-<li><p> The variance of the conditional component was over-estimated
-in <code>goodness</code> of <code>rda</code> results, and results were wrong
-for partial RDA. The problems were reported in an
-<a href="https://stat.ethz.ch/pipermail/r-sig-ecology/2015-March/004936.html">R-sig-ecology</a>
-message by Christoph von Redwitz.
-</p>
-</li></ul>
-
- 
-
-
-<h4>WINDOWS</h4>
-
-
-<ul>
-<li> <p><code>orditkplot</code> did not add file type identifier to saved
-graphics in Windows although that is required. The problem only
-concerned Windows OS.
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES AND FUNCTIONS</h4>
-
-
-<ul>
-<li> <p><code>goodness</code> function for constrained ordination
-(<code>cca</code>, <code>rda</code>, <code>capscale</code>) was redesigned. Function
-gained argument <code>addprevious</code> to add the variation explained
-by previous ordination components to axes when <code>statistic =
-      "explained"</code>. With this option, <code>model = "CCA"</code> will include
-the variation explained by partialled-out conditions, and
-<code>model = "CA"</code> will include the accumulated variation
-explained by conditions and constraints. The former behaviour was
-<code>addprevious = TRUE</code> for <code>model = "CCA"</code>, and
-<code>addprevious = FALSE</code> for <code>model = "CA"</code>. The argument
-will have no effect when <code>statistic = "distance"</code>, but this
-will always show the residual distance after all previous
-components. Formerly it displayed the residual distance only for
-the currently analysed model.
-</p>
-</li>
-<li><p> Functions <code>ordiArrowMul</code> and <code>ordiArrowTextXY</code> are
-exported and can be used in normal interactive sessions. These
-functions are used to scale a bunch arrows to fit ordination
-graphics, and formerly they were internal functions used within
-other <span class="pkg">vegan</span> functions.
-</p>
-</li>
-<li> <p><code>orditkplot</code> can export graphics in SVG format. SVG is
-a vector graphics format which can be edited with several external
-programs, such as Illustrator and Inkscape.
-</p>
-</li>
-<li><p> Rarefaction curve (<code>rarecurve</code>) and species
-accumulation models (<code>specaccum</code>, <code>fitspecaccum</code>)
-gained new functions to estimate the slope of curve at given
-location. Originally this was based on a response to an
-<a href="https://stat.ethz.ch/pipermail/r-sig-ecology/2015-May/005038.html">R-SIG-ecology</a>
-query. For rarefaction curves, the function is <code>rareslope</code>,
-and for species accumulation models it is <code>specslope</code>.
-</p>
-<p>The functions are based on analytic equations, and can also be
-evaluated at interpolated non-integer values. In
-<code>specaccum</code> models the functions can be only evaluated for
-analytic models <code>"exact"</code>, <code>"rarefaction"</code> and
-<code>"coleman"</code>. With <code>"random"</code> and <code>"collector"</code>
-methods you can only use finite differences
-(<code>diff(fitted(<result.object>))</code>). Analytic functions for
-slope are used for all non-linear regression models known to
-<code>fitspecaccum</code>.
-</p>
-</li>
-<li><p> Species accumulation models (<code>specaccum</code>) and
-non-liner regression models for species accumulation
-(<code>fitspecaccum</code>) work more consistently with weights. In
-all cases, the models are defined using the number of sites as
-independent variable, which with weights means that observations
-can be non-integer numbers of virtual sites. The <code>predict</code>
-models also use the number of sites with <code>newdata</code>,
-and for analytic models they can estimate the expected values
-for non-integer number of sites, and for non-analytic randomized
-or collector models they can interpolate on non-integer values.
-</p>
-</li>
-<li> <p><code>fitspecaccum</code> gained support functions <code>AIC</code>
-and <code>deviance</code>.
-</p>
-</li>
-<li><p> The <code>varpart</code> plots of four-component models were
-redesigned following Legendre, Borcard & Roberts <em>Ecology</em>
-93, 1234–1240 (2012), and they use now four ellipses instead of
-three circles and two rectangles. The components are now labelled
-in plots, and the circles and ellipses can be easily filled with
-transparent background colour.
-</p>
-</li></ul>
-
- 
-
-
-<h3>Changes in version 2.2-1</h3>
-
-
-
-<h4>GENERAL</h4>
-
-
-<ul>
-<li><p> This is a maintenance release to avoid warning messages
-caused by changes in CRAN repository. The namespace usage is also
-more stringent to avoid warnings and notes in development versions
-of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
-</p>
-</li></ul>
-
-
-
-
-<h4>INSTALLATION</h4>
-
-
-<ul>
-<li> <p><span class="pkg">vegan</span> can be installed and loaded without <span class="pkg">tcltk</span>
-package. The <span class="pkg">tcltk</span> package is needed in <code>orditkplot</code>
-function for interactive editing of ordination graphics.
-</p>
-</li></ul>
-
- 
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li> <p><code>ordisurf</code> failed if <span class="pkg">gam</span> package was loaded due
-to namespace issues: some support functions of <span class="pkg">gam</span> were used
-instead of <span class="pkg">mgcv</span> functions.
-</p>
-</li>
-<li> <p><code>tolerance</code> function failed for unconstrained
-correspondence analysis.
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES</h4>
-
-
-<ul>
-<li> <p><code>estimateR</code> uses a more exact variance formula for
-bias-corrected Chao estimate of extrapolated number of
-species. The new formula may be unpublished, but it was derived
-following the guidelines of Chiu, Wang, Walther & Chao,
-<em>Biometrics</em> 70, 671–682 (2014),
-<a href="http://onlinelibrary.wiley.com/doi/10.1111/biom.12200/suppinfo">online
-supplementary material</a>.
-</p>
-</li>
-<li><p> Diversity accumulation functions <code>specaccum</code>,
-<code>renyiaccum</code>, <code>tsallisaccum</code>, <code>poolaccum</code> and
-<code>estaccumR</code> use now <span class="pkg">permute</span> package for permutations
-of the order of sampling sites. Normally these functions only
-need simple random permutation of sites, but restricted
-permutation of the <span class="pkg">permute</span> package and user-supplied
-permutation matrices can be used.
-</p>
-</li>
-<li> <p><code>estaccumR</code> function can use parallel processing.
-</p>
-</li>
-<li> <p><code>linestack</code> accepts now expressions as labels. This
-allows using mathematical symbols and formula given as
-mathematical expressions.
-</p>
-</li></ul>
-
- 
-
-
-<h3>Changes in version 2.2-0</h3>
-
-
-
-<h4>GENERAL</h4>
-
-
-<ul>
-<li><p> Several <span class="pkg">vegan</span> functions can now use parallel
-processing for slow and repeating calculations. All these
-functions have argument <code>parallel</code>. The argument can be an
-integer giving the number of parallel processes. In unix-alikes
-(Mac OS, Linux) this will launch <code>"multicore"</code> processing
-and in Windows it will set up <code>"snow"</code> clusters as desribed
-in the documentation of the <span class="pkg">parallel</span> package. If <code>option</code>
-<code>"mc.cores"</code> is set to an integer > 1, this will be used to
-automatically start parallel processing. Finally, the argument
-can also be a previously set up <code>"snow"</code> cluster which will
-be used both in Windows and in unix-alikes. <span class="pkg">Vegan</span> vignette
-on Design decision explains the implementation (use
-<code>vegandocs("decission")</code>, and <span class="pkg">parallel</span> package has more
-extensive documentation on parallel processing in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
-</p>
-<p>The following function use parallel processing in analysing
-permutation statistics: <code>adonis</code>, <code>anosim</code>,
-<code>anova.cca</code> (and <code>permutest.cca</code>), <code>mantel</code> (and
-<code>mantel.partial</code>), <code>mrpp</code>, <code>ordiareatest</code>,
-<code>permutest.betadisper</code> and <code>simper</code>. In addition,
-<code>bioenv</code> can compare several candidate sets of models in
-paralle, <code>metaMDS</code> can launch several random starts in
-parallel, and <code>oecosimu</code> can evaluate test statistics for
-several null models in parallel.
-</p>
-</li>
-<li><p> All permutation tests are based on the <span class="pkg">permute</span> package
-which offers strong tools for restricted permutation. All these
-functions have argument <code>permutations</code>. The default usage of
-simple non-restricted permutations is achieved by giving a single
-integer number. Restricted permutations can be defined using the
-<code>how</code> function of the <span class="pkg">permute</span> package. Finally, the
-argument can be a permutation matrix where rows define
-permutations. It is possible to use external or user constructed
-permutations.
-</p>
-<p>See <code>help(permutations)</code> for a brief introduction on
-permutations in <span class="pkg">vegan</span>, and <span class="pkg">permute</span> package for the
-full documention. The vignette of the <span class="pkg">permute</span> package can
-be read from <span class="pkg">vegan</span> with command
-<code>vegandocs("permutations")</code>.
-</p>
-<p>The following functions use the <span class="pkg">permute</span> package:
-<code>CCorA</code>, <code>adonis</code>, <code>anosim</code>, <code>anova.cca</code> (plus
-associated <code>permutest.cca</code>, <code>add1.cca</code>,
-<code>drop1.cca</code>, <code>ordistep</code>, <code>ordiR2step</code>),
-<code>envfit</code> (plus associated <code>factorfit</code> and
-<code>vectorfit</code>), <code>mantel</code> (and <code>mantel.partial</code>),
-<code>mrpp</code>, <code>mso</code>, <code>ordiareatest</code>,
-<code>permutest.betadisper</code>, <code>protest</code> and <code>simper</code>.
-</p>
-</li>
-<li><p> Community null model generation has been completely
-redesigned and rewritten. The communities are constructed with
-new <code>nullmodel</code> function and defined in a low level
-<code>commsim</code> function. The actual null models are generated
-with a <code>simulate</code> function that builds an array of null
-models. The new null models include a wide array of quantitative
-models in addition to the old binary models, and users can plug
-in their own generating functions. The basic tool invoking and
-analysing null models is <code>oecosimu</code>. The null models are
-often used only for the analysis of nestedness, but the
-implementation in <code>oecosimu</code> allows analysing any
-statistic, and null models are better seen as an alternative to
-permutation tests.
-</p>
-</li></ul>
- 
- 
-
-
-<h4>INSTALLATION</h4>
-
-
-<ul>
-<li> <p><span class="pkg">vegan</span> package dependencies and namespace imports
-were adapted to changes in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>, and no more trigger warnings and
-notes in package tests.
-</p>
-</li>
-<li><p> Three-dimensional ordination graphics using
-<span class="pkg">scatterplot3d</span> for static plots and <span class="pkg">rgl</span> for dynamic
-plots were removed from <span class="pkg">vegan</span> and moved to a companion
-package <span class="pkg">vegan3d</span>. The package is available in CRAN.
-</p>
-</li></ul>
- 
- 
-
-
-<h4>NEW FUNCTIONS</h4>
-
-
-<ul>
-<li><p> Function <code>dispweight</code> implements dispersion weighting
-of Clarke et al. (<em>Marine Ecology Progress Series</em>, 320,
-11–27).  In addition, we implemented a new method for
-generalized dispersion weighting <code>gdispweight</code>. Both
-methods downweight species that are significantly
-over-dispersed.
-</p>
-</li>
-<li><p> New <code>hclust</code> support functions <code>reorder</code>,
-<code>rev</code> and <code>scores</code>. Functions <code>reorder</code> and
-<code>rev</code> are similar as these functions for <code>dendrogram</code>
-objects in base <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>. However, <code>reorder</code> can use (and defaults
-to) weighted mean. In weighted mean the node average is always the
-mean of member leaves, whereas the <code>dendrogram</code> uses always
-unweighted means of joined branches.
-</p>
-</li>
-<li><p> Function <code>ordiareatest</code> supplements <code>ordihull</code> and
-<code>ordiellipse</code> and provides a randomization test for the
-one-sided alternative hypothesis that convex hulls or ellipses in
-two-dimensional ordination space have smaller areas than with
-randomized groups.
-</p>
-</li>
-<li><p> Function <code>permustats</code> extracts and inspects permutation
-results with support functions <code>summary</code>, <code>density</code>,
-<code>densityplot</code>, <code>qqnorm</code> and <code>qqmath</code>. The
-<code>density</code> and <code>qqnorm</code> are standard <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> tools that only
-work with one statistic, and <code>densityplot</code> and <code>qqmath</code>
-are <span class="pkg">lattice</span> graphics that work with univariate and
-multivariate statistics. The results of following functions can be
-extracted: <code>anosim</code>, <code>adonis</code>, <code>mantel</code> (and
-<code>mantel.partial</code>), <code>mrpp</code>, <code>oecosimu</code>,
-<code>permustest.cca</code> (but not the corresponding <code>anova</code>
-methods), <code>permutest.betadisper</code>, and <code>protest</code>.
-</p>
-</li>
-<li> <p><code>stressplot</code> functions display the ordination distances
-at given number of dimensions against original distances.  The
-method functins are similar to <code>stressplot</code> for
-<code>metaMDS</code>, and always use the inherent distances of each
-ordination method. The functions are available for the results
-<code>capscale</code>, <code>cca</code>, <code>princomp</code>, <code>prcomp</code>,
-<code>rda</code>, and <code>wcmdscale</code>.
-</p>
-</li></ul>
- 
- 
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li> <p><code>cascadeKM</code> of only one group will be <code>NA</code> instead
-of a random value. 
-</p>
-</li>
-<li> <p><code>ordiellipse</code> can handle points exactly on a line,
-including only two points (with a warning).
-</p>
-</li>
-<li><p> plotting <code>radfit</code> results for several species failed if
-any of the communities had no species or had only one species.
-</p>
-</li>
-<li> <p><code>RsquareAdj</code> for <code>capscale</code> with negative
-eigenvalues will now report <code>NA</code> instead of using biased
-method of <code>rda</code> results.
-</p>
-</li>
-<li> <p><code>simper</code> failed when a group had only a single member.
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES</h4>
-
-
-<ul>
-<li> <p><code>anova.cca</code> functions were re-written to use the
-<span class="pkg">permute</span> package. Old results may not be exactly
-reproduced, and models with missing data may fail in several
-cases. There is a new option of analysing a sequence of models
-against each other.
-</p>
-</li>
-<li> <p><code>simulate</code> functions for <code>cca</code> and <code>rda</code>
-can return several simulations in a <code>nullmodel</code> compatible
-object. The functions can produce simulations with correlated
-errors (also for <code>capscale</code>) in parametric simulation with
-Gaussian error.
-</p>
-</li>
-<li> <p><code>bioenv</code> can use Manhattan, Gower and Mahalanobis
-distances in addition to the default Euclidean. New helper
-function <code>bioenvdist</code> can extract the dissimilarities
-applied in best model or any other model.
-</p>
-</li>
-<li> <p><code>metaMDS(..., trace = 2)</code> will show convergence
-information with the default <code>monoMDS</code> engine.
-</p>
-</li>
-<li><p> Function <code>MDSrotate</code> can rotate a <i>k</i>-dimensional
-ordination to <i>k-1</i> variables. When these variables are
-correlated (like usually is the case), the vectors can also be
-correlated to previously rotated dimensions, but will be
-uncorrelated to all later ones.
-</p>
-</li>
-<li> <p><span class="pkg">vegan</span> 2.0-10 changed the weighted <code>nestednodf</code>
-so that weighted analysis of binary data was equivalent to
-binary analysis. However, this broke the equivalence to the
-original method. Now the function has an argument <code>wbinary</code>
-to select the method of analysis. The problem was reported and a
-fix submitted by Vanderlei Debastiani (Universidade Federal do
-Rio Grande do Sul, Brasil).
-</p>
-</li>
-<li> <p><code>ordiellipse</code>, <code>ordihull</code> and <code>ordiellipse</code>
-can handle missing values in <code>groups</code>.
-</p>
-</li>
-<li> <p><code>ordispider</code> can now use spatial medians instead of
-means. 
-</p>
-</li>
-<li> <p><code>rankindex</code> can use Manhattan, Gower and Mahalanobis
-distance in addition to the default Euclidean.
-</p>
-</li>
-<li><p> User can set colours and line types in function
-<code>rarecurve</code> for plotting rarefaction curves.
-</p>
-</li>
-<li> <p><code>spantree</code> gained a support function <code>as.hclust</code>
-to change the minimum spanning tree into an <code>hclust</code> tree.
-</p>
-</li>
-<li> <p><code>fitspecaccum</code> can do weighted analysis. Gained
-<code>lines</code> method.
-</p>
-</li>
-<li><p> Functions for extrapolated number of species or for the size
-of species pool using Chao method were modified following Chiu et
-al., <em>Biometrics</em> 70, 671–682 (2014).
-</p>
-<p>Incidence based <code>specpool</code> can now use (and defaults to)
-small sample correction with number of sites as the sample
-size. Function uses basic Chao extrapolation based on the ratio of
-singletons and doubletons, but switches now to bias corrected Chao
-extrapolation if there are no doubletons (species found
-twice). The variance formula for bias corrected Chao was derived
-following the supporting
-<a href="http://onlinelibrary.wiley.com/doi/10.1111/biom.12200/suppinfo">online material</a>
-and differs slightly from Chiu et al. (2014).
-</p>
-<p>The <code>poolaccum</code> function was changed similarly, but the small
-sample correction is used always.
-</p>
-<p>The abundance based <code>estimateR</code> uses bias corrected Chao
-extrapolation, but earlier it estimated its variance with classic
-Chao model. Now we use the widespread
-<a href="http://viceroy.eeb.uconn.edu/EstimateS/EstimateSPages/EstSUsersGuide/EstimateSUsersGuide.htm#AppendixB">approximate
-equation</a> for variance.
-</p>
-<p>With these changes these functions are more similar to
-<a href="http://viceroy.eeb.uconn.edu/EstimateS/EstimateSPages/EstSUsersGuide/EstimateSUsersGuide.htm#AppendixB">EstimateS</a>.
-</p>
-</li>
-<li> <p><code>tabasco</code> uses now <code>reorder.hclust</code> for
-<code>hclust</code> object for better ordering than previously when it
-cast trees to <code>dendrogram</code> objects.
-</p>
-</li>
-<li> <p><code>treedive</code> and <code>treedist</code> default now to
-<code>match.force = TRUE</code> and can be silenced with
-<code>verbose = FALSE</code>.
-</p>
-</li>
-<li> <p><code>vegdist</code> gained Mahalanobis distance.
-</p>
-</li>
-<li><p> Nomenclature updated in plant community data with the help
-of <span class="pkg">Taxonstand</span> and <span class="pkg">taxize</span> packages. The taxonomy of
-the <code>dune</code> data was adapted to the same sources and APG
-III.  <code>varespec</code> and <code>dune</code> use 8-character names (4
-from genus + 4 from species epithet). New data set on
-phylogenetic distances for <code>dune</code> was extracted from Zanne
-et al. (<em>Nature</em> 506, 89–92; 2014).
-</p>
-</li>
-<li><p> User configurable plots for <code>rarecurve</code>.
-</p>
-</li></ul>
- 
- 
-
-
-<h4>DEPRECATED AND DEFUNCT</h4>
-
-
-<ul>
-<li> <p><code>strata</code> are deprecated in permutations. It is still
-accepted but will be phased out in next releases. Use <code>how</code>
-of <span class="pkg">permute</span> package.
-</p>
-</li>
-<li> <p><code>cca</code>, <code>rda</code> and <code>capscale</code> do not return
-scores scaled by eigenvalues: use <code>scores</code> function to
-extract scaled results.
-</p>
-</li>
-<li> <p><code>commsimulator</code> is deprecated. Replace
-<code>commsimulator(x, method)</code> with
-<code>simulate(nullmodel(x, method))</code>.
-</p>
-</li>
-<li> <p><code>density</code> and <code>densityplot</code> for permutation
-results are deprecated: use <code>permustats</code> with its
-<code>density</code> and <code>densityplot</code> method.
-</p>
-</li></ul>
- 
- 
-
-
-<h3>Changes in version 2.0-10</h3>
-
-
-
-<h4>GENERAL</h4>
-
-
-<ul>
-<li><p> This version is adapted to the changes in <span class="pkg">permute</span>
-package version 0.8-0 and no more triggers NOTEs in package
-checks.  This release may be the last of the 2.0 series, and the
-next <span class="pkg">vegan</span> release is scheduled to be a major release with
-newly designed <code>oecosimu</code> and community pattern simulation,
-support for parallel processing, and full support of the
-<span class="pkg">permute</span> package. If you are interested in these
-developments, you may try the development versions of
-<span class="pkg">vegan</span> in
-<a href="http://r-forge.r-project.org/projects/vegan/">R-Forge</a> or
-<a href="https://github.com/jarioksa/vegan">GitHub</a> and report the
-problems and user experience to us.  </p>
-</li></ul>
-   
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li> <p><code>envfit</code> function assumed that all external variables
-were either numeric or factors, and failed if they were, say,
-character strings. Now only numeric variables are taken as
-continuous vectors, and all other variables (character strings,
-logical) are coerced to factors if possible. The function also
-should work with degenerate data, like only one level of a
-factor or a constant value of a continuous environmental
-variable. The ties were wrongly in assessing permutation
-<i>P</i>-values in <code>vectorfit</code>.
-</p>
-</li>
-<li> <p><code>nestednodf</code> with quantitative data was not
-consistent with binary models, and the fill was wrongly
-calculated with quantitative data.
-</p>
-</li>
-<li> <p><code>oecosimu</code> now correctly adapts displayed quantiles
-of simulated values to the <code>alternative</code> test direction.
-</p>
-</li>
-<li> <p><code>renyiaccum</code> plotting failed if only one level of
-diversity <code>scale</code> was used.
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES</h4>
-
- 
- 
-<ul>
-<li><p> The Kempton and Taylor algorithm was found unreliable in
-<code>fisherfit</code> and <code>fisher.alpha</code>, and now the estimation
-of Fisher <i>alpha</i> is only based on the number of
-species and the number of individuals.  The estimation of
-standard errors and profile confidence intervals also had to be
-scrapped.
-</p>
-</li>
-<li> <p><code>renyiaccum</code>, <code>specaccum</code> and
-<code>tsallisaccum</code> functions gained <code>subset</code> argument.
-</p>
-</li>
-<li> <p><code>renyiaccum</code> can now add a <code>collector</code> curve to
-to the analysis. The collector curve is the diversity
-accumulation in the order of the sampling units. With an
-interesting ordering or sampling units this allows comparing
-actual species accumulations with the expected randomized
-accumulation.
-</p>
-</li>
-<li> <p><code>specaccum</code> can now perform weighted accumulation
-using the sampling effort as weights.
-</p>
-</li></ul>
-
- 
-
-
-<h3>Changes in version 2.0-9</h3>
-
-
-<ul>
-<li><p> This version is released due to changes in programming
-interface and testing procedures in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.0.2. If you are using an
-older version of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>, there is no need to upgrade <span class="pkg">vegan</span>. There
-are no new features nor bug fixes. The only user-visible changes
-are in documentation and in output messages and formatting. Because
-of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> changes, this version is dependent on <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> version 2.14.0
-or newer and on <span class="pkg">lattice</span> package.
-</p>
-</li></ul>
-
-
-
-<h3>Changes in version 2.0-8</h3>
-
-
-
-<h4>GENERAL</h4>
-
-
-<ul>
-<li><p> This is a maintenance release that fixes some issues
-raised by changed in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> toolset for processing vignettes.  In
-the same we also fix some typographic issues in the vignettes.
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES</h4>
-
-
-<ul>
-<li> <p><code>ordisurf</code> gained new arguments for more flexible
-definition of fitted models to better utilize the
-<span class="pkg">mgcv</span><code>::gam</code> function. 
-</p>
-<p>The linewidth of contours can
-now be set with the argument <code>lwd</code>.
-</p>
-</li>
-<li><p> Labels to arrows are positioned in a better way in
-<code>plot</code> functions for the results of <code>envfit</code>,
-<code>cca</code>, <code>rda</code> and <code>capscale</code>. The labels should no
-longer overlap the arrow tips.
-</p>
-</li>
-<li><p> The setting test direction is clearer in <code>oecosimu</code>.
-</p>
-</li>
-<li> <p><code>ordipointlabel</code> gained a <code>plot</code> method that can
-be used to replot the saved result.
-</p>
-</li></ul>
-
- 
-
-
-<h3>Changes in version 2.0-7</h3>
-
-
-
-<h4>NEW FUNCTIONS</h4>
-
-
-<ul>
-<li> <p><code>tabasco()</code> is a new function for graphical display
-of community data matrix.  Technically it is an interface to <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
-<code>heatmap</code>, but its use is closer to <span class="pkg">vegan</span> function
-<code>vegemite</code>. The function can reorder the community data
-matrix similarly as <code>vegemite</code>, for instance, by ordination
-results. Unlike <code>heatmap</code>, it only displays dendrograms if
-supplied by the user, and it defaults to re-order the
-dendrograms by correspondence analysis.  Species are ordered to
-match site ordering or like determined by the user.
-</p>
-</li></ul>
-
- 
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li><p> Function <code>fitspecaccum(..., model = "asymp")</code> fitted
-logistic model instead of asymptotic model (or the same as 
-<code>model = "logis"</code>).
-</p>
-</li>
-<li> <p><code>nestedtemp()</code> failed with very sparse data (fill
-<i>< 0.38</i>%).
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES</h4>
-
-
-<ul>
-<li><p> The <code>plot</code> function for constrained ordination
-results (<code>cca</code>, <code>rda</code>, <code>capscale</code>) gained
-argument <code>axis.bp</code> (defaults <code>TRUE</code>) which can be used
-to suppress axis scale for biplot arrays.
-</p>
-</li>
-<li><p> Number of iterations in nonmetric multidimensional scaling
-(NMDS) can be set with keyword <code>maxit</code> (defaults
-<code>200</code>) in <code>metaMDS</code>.
-</p>
-</li></ul>
-
- 
-
-
-<h4>DEPRECATED</h4>
-
-
-<ul>
-<li><p> The result objects of <code>cca</code>, <code>rda</code> and
-<code>capscale</code> will no longer have scores <code>u.eig</code>,
-<code>v.eig</code> and <code>wa.eig</code> in the future versions of
-<span class="pkg">vegan</span>. This change does not influence normal usage,
-because <span class="pkg">vegan</span> functions do not need these items.  However,
-external scripts and packages may need changes in the future
-versions of <span class="pkg">vegan</span>.
-</p>
-</li></ul>
-   
- 
-
-
-<h3>Changes in version 2.0-6</h3>
-
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li><p> The species scores were scaled wrongly in
-<code>capscale()</code>. They were scaled correctly only when Euclidean
-distances were used, but usually <code>capscale()</code> is used with
-non-Euclidean distances.  Most graphics will change and should be
-redone.  The change of scaling mainly influences the spread of
-species scores with respect to the site scores.
-</p>
-</li>
-<li><p> Function <code>clamtest()</code> failed to set the minimum
-abundance threshold in some cases. In addition, the output was
-wrong when some of the possible species groups were missing. Both
-problems were reported by Richard Telford (Bergen, Norway).
-</p>
-</li>
-<li><p> Plotting an object fitted by <code>envfit()</code> would fail if
-<code>p.max</code> was used and there were unused levels for one or
-more factors. The unused levels could result from deletion of
-observations with missing values or simply as the result of
-supplying a subset of a larger data set to <code>envfit()</code>.
-</p>
-</li>
-<li> <p><code>multipart()</code> printed wrong information about the
-analysis type (but did the analysis correctly). Reported by
-Valerie Coudrain.
-</p>
-</li>
-<li> <p><code>oecosimu()</code> failed if its <code>nestedfun</code> returned a
-data frame. A more fundamental fix will be in <span class="pkg">vegan</span> 2.2-0,
-where the structure of the <code>oecosimu()</code> result will change.
-</p>
-</li>
-<li><p> The plot of two-dimensional <code>procrustes()</code> solutions
-often draw original axes in a wrong angle. The problem was
-reported by Elizabeth Ottesen (MIT).
-</p>
-</li>
-<li><p> Function <code>treedive()</code> for functional or phylogenetic
-diversity did not correctly match the species names between the
-community data and species tree when the tree contained species
-that did not occur in the data.  Related function
-<code>treedist()</code> for phylogenetic distances did not try to match
-the names at all.
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES</h4>
-
-
-<ul>
-<li><p> The output of <code>capscale()</code> displays the value of the
-additive constant when argument <code>add = TRUE</code> was used.
-</p>
-</li>
-<li> <p><code>fitted()</code> functions for <code>cca()</code>, <code>rda()</code> and
-<code>capscale()</code> can now return conditioned (partial) component
-of the response: Argument <code>model</code> gained a new alternative
-<code>model = "pCCA"</code>. 
-</p>
-</li>
-<li> <p><code>dispindmorisita()</code> output gained a new column for
-Chi-squared based probabilities that the null hypothesis (random
-distribution) is true.
-</p>
-</li>
-<li> <p><code>metaMDS()</code> and <code>monoMDS()</code> have new default
-convergence criteria. Most importantly, scale factor of the
-gradient (<code>sfgrmin</code>) is stricter. The former limit was too
-slack with large data sets and iterations stopped early without
-getting close to the solution. In addition, <code>scores()</code>
-ignore now requests to dimensions beyond those calculated
-instead of failing, and <code>scores()</code> for <code>metaMDS()</code>
-results do not drop dimensions.
-</p>
-</li>
-<li> <p><code>msoplot()</code> gained <code>legend</code> argument for
-positioning the legend.
-</p>
-</li>
-<li><p> Nestedness function <code>nestednodf()</code> gained a <code>plot</code>
-method.
-</p>
-</li>
-<li> <p><code>ordiR2step()</code> gained new argument <code>R2scope</code>
-(defaults <code>TRUE</code>) which can be used to turn off the criterion
-of stopping when the adjusted <i>R-squared</i> of the current
-model exceeds that of the scope.  This option allows model
-building when the <code>scope</code> would be overdetermined (number of
-predictors higher than number of observations).
-</p>
-<p><code>ordiR2step()</code> now handles partial redundancy analysis
-(pRDA).
-</p>
-</li>
-<li> <p><code>orditorp()</code> gained argument <code>select</code> to select
-the rows or columns of the results to display.
-</p>
-</li>
-<li> <p><code>protest()</code> prints the standardized residual statistic
-<i>squared m12</i> in addition to the squared Procrustes
-correlation <i>R-squared</i>.  Both were calculated, but only
-the latter was displayed.
-</p>
-<p>Permutation tests are much faster in <code>protest()</code>. Instead
-of calling repeatedly <code>procrustes()</code>, the goodness of fit
-statistic is evaluated within the function. 
-</p>
-</li>
-<li> <p><code>wcmdscale()</code> gained methods for <code>print</code>,
-<code>plot</code> etc. of the results. These methods are only used if
-the full <code>wcmdscale</code> result is returned with, e.g., argument
-<code>eig = TRUE</code>. The default is still to return only a matrix of
-scores similarly as the standard <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> function <code>cmdscale()</code>,
-and in that case the new methods are not used.
-</p>
-</li></ul>
-
- 
-
-
-<h3>Changes in version 2.0-5</h3>
-
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li> <p><code>anova(<cca_object>, ...)</code> failed with
-<code>by = "axis"</code> and <code>by = "term"</code>. The bug was reported by
-Dr Sven Neulinger (Christian Albrecht University, Kiel, Germany).
-</p>
-</li>
-<li> <p><code>radlattice</code> did not honour argument <code>BIC = TRUE</code>,
-but always displayed AIC.
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FUNCTIONS</h4>
-
-
-<ul>
-<li><p> Most <span class="pkg">vegan</span> functions with permutation tests have now a
-<code>density</code> method that can be used to find empirical
-probability distributions of permutations. There is a new
-<code>plot</code> method for these functions that displays both the
-density and the observed statistic. The <code>density</code> function is
-available for <code>adonis</code>, <code>anosim</code>, <code>mantel</code>,
-<code>mantel.partial</code>, <code>mrpp</code>, <code>permutest.cca</code> and
-<code>procrustes</code>.
-</p>
-<p>Function <code>adonis</code> can return several statistics, and it has
-now a <code>densityplot</code> method (based on <span class="pkg">lattice</span>).
-</p>
-<p>Function <code>oecosimu</code> already had <code>density</code> and
-<code>densityplot</code>, but they are now similar to other <span class="pkg">vegan</span>
-methods, and also work with <code>adipart</code>, <code>hiersimu</code> and
-<code>multipart</code>.
-</p>
-</li>
-<li> <p><code>radfit</code> functions got a <code>predict</code> method that
-also accepts arguments <code>newdata</code> and <code>total</code> for new
-ranks and site totals for prediction.  The functions can also
-interpolate to non-integer “ranks”, and in some models
-also extrapolate.
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES</h4>
-
-
-<ul>
-<li><p> Labels can now be set in the <code>plot</code> of <code>envfit</code>
-results. The labels must be given in the same order that the
-function uses internally, and new support function <code>labels</code>
-can be used to display the default labels in their correct order.
-</p>
-</li>
-<li><p> Mantel tests (functions <code>mantel</code> and
-<code>mantel.partial</code>) gained argument <code>na.rm</code> which can be
-used to remove missing values. This options should be used with
-care: Permutation tests can be biased if the missing values were
-originally in matching or fixed positions.
-</p>
-</li>
-<li> <p><code>radfit</code> results can be consistently accessed with
-the same methods whether they were a single model for a single
-site, all models for a single site or all models for all sites
-in the data.  All functions now have methods <code>AIC</code>,
-<code>coef</code>, <code>deviance</code>, <code>logLik</code>, <code>fitted</code>,
-<code>predict</code> and <code>residuals</code>.
-</p>
-</li></ul>
-
- 
-
-
-<h4>INSTALLATION AND BUILDING</h4>
-
-
-<ul>
-<li><p> Building of <span class="pkg">vegan</span> vignettes failed with the latest
-version of LaTeX (TeXLive 2012).
-</p>
-</li>
-<li> <p><span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> versions later than 2.15-1 (including development
-version) report warnings and errors when installing and checking
-<span class="pkg">vegan</span>, and you must upgrade <span class="pkg">vegan</span> to this version.
-The warnings concern functions <code>cIndexKM</code> and
-<code>betadisper</code>, and the error occurs in <code>betadisper</code>.
-These errors and warnings were triggered by internal changes in
-<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
-</p>
-</li></ul>
-
- 
-
-
-<h3>Changes in version 2.0-4</h3>
-
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li> <p><code>adipart</code> assumed constant gamma diversity in
-simulations when assessing the <i>P</i>-value.  This could give
-biased results if the null model produces variable gamma
-diversities and option <code>weights = "prop"</code> is used.  The
-default null model (<code>"r2dtable"</code>) and the default option
-(<code>weights = "unif"</code>) were analysed correctly.
-</p>
-</li>
-<li> <p><code>anova(<prc-object>, by = "axis")</code> and other
-<code>by</code> cases failed due to ‘<span class="file">NAMESPACE</span>’ issues.
-</p>
-</li>
-<li> <p><code>clamtest</code> wrongly used frequencies instead of the
-counts when calculating sample coverage.  No detectable
-differences were produced when rerunning examples from Chazdon
-et al. 2011 and <span class="pkg">vegan</span> help page.
-</p>
-</li>
-<li> <p><code>envfit</code> failed with unused factor levels.
-</p>
-</li>
-<li> <p><code>predict</code> for <code>cca</code> results with
-<code>type = "response"</code> or <code>type = "working"</code> failed with
-<code>newdata</code> if the number of rows did not match with the
-original data.  Now the <code>newdata</code> is ignored if it has a
-wrong number of rows.  The number of rows must match because
-the results in <code>cca</code> must be weighted by original row
-totals.  The problem did not concern <code>rda</code> or
-<code>capscale</code> results which do not need row weights.
-Reported by Glenn De'ath.
-</p>
-</li></ul>
-
-
-
-
-<h4>NEW FEATURES</h4>
-
-
-<ul>
-<li><p> Functions for diversity partitioning (<code>adipart</code>,
-<code>hiersimu</code> and <code>multipart</code>) have now <code>formula</code>
-and <code>default</code> methods.  The <code>formula</code> method is
-identical to the previous functions, but the <code>default</code>
-method can take two matrices as input. 
-</p>
-<p>Functions <code>adipart</code> and <code>multipart</code> can be used for
-fast and easy overall partitioning to alpha, beta and gamma
-diversities by omitting the argument describing the hierarchy.
-</p>
-</li>
-<li><p> The method in <code>betadisper</code> is biased with small
-sample sizes.  The effects of the bias are strongest with
-unequal sample sizes. A bias adjusted version was developed by
-Adrian Stier and Ben Bolker, and can be invoked with argument
-<code>bias.adjust</code> (defaults to <code>FALSE</code>).
-</p>
-</li>
-<li> <p><code>bioenv</code> accepts dissimilarities (or square matrices
-that can be interpreted as dissimilarities) as an alternative to
-community data.  This allows using other dissimilarities than
-those available in <code>vegdist</code>.
-</p>
-</li>
-<li> <p><code>plot</code> function for <code>envfit</code> results gained new
-argument <code>bg</code> that can be used to set background colour for
-plotted labels.
-</p>
-</li>
-<li> <p><code>msoplot</code> is more configurable, and allows, for
-instance, setting y-axis limits.
-</p>
-</li>
-<li><p> Hulls and ellipses are now filled using semitransparent
-colours in <code>ordihull</code> and <code>ordiellipse</code>, and the
-user can set the degree of transparency with a new argument
-<code>alpha</code>.  The filled shapes are used when these functions
-are called with argument <code>draw = "polygon"</code>.  Function
-<code>ordihull</code> puts labels (with argument <code>label = TRUE</code>)
-now in the real polygon centre.
-</p>
-</li>
-<li> <p><code>ordiplot3d</code> returns function <code>envfit.convert</code>
-and the projected location of the <code>origin</code>.  Together
-these can be used to add <code>envfit</code> results to existing
-<code>ordiplot3d</code> plots.
-</p>
-<p>Equal aspect ratio cannot be set exactly in <code>ordiplot3d</code>
-because underlying core routines do not allow this. Now
-<code>ordiplot3d</code> sets equal axis ranges, and the documents
-urge users to verify that the aspect ratio is reasonably equal
-and the graph looks like a cube.  If the problems cannot be
-solved in the future, <code>ordiplot3d</code> may be removed from
-next releases of <span class="pkg">vegan</span>.
-</p>
-</li>
-<li><p> Function <code>ordipointlabel</code> gained argument to
-<code>select</code> only some of the items for plotting. The
-argument can be used only with one set of points.
-</p>
-</li></ul>
-
- 
-
-
-<h3>Changes in version 2.0-3</h3>
-
-
-
-<h4>NEW FUNCTIONS</h4>
-
-
-<ul>
-<li><p> Added new nestedness functions <code>nestedbetasor</code> and
-<code>nestedbetajac</code> that implement multiple-site dissimilarity
-indices and their decomposition into turnover and nestedness
-components following Baselga (<em>Global Ecology and
-Biogeography</em> 19, 134–143; 2010).
-</p>
-</li>
-<li><p> Added function <code>rarecurve</code> to draw rarefaction curves
-for each row (sampling unit) of the input data, optionally with
-lines showing rarefied species richness with given sample size
-for each curve.
-</p>
-</li>
-<li><p> Added function <code>simper</code> that implements
-“similarity percentages” of Clarke (<em>Australian
-Journal of Ecology</em> 18, 117–143; 1993).  The method compares
-two or more groups and decomposes the average between-group
-Bray-Curtis dissimilarity index to contributions by individual
-species.  The code was developed in 
-<a href="https://github.com/jarioksa/vegan">GitHub</a>
-by Eduard Szöcs (Uni Landau, Germany).
-</p>
-</li></ul>
-
- 
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li> <p><code>betadisper()</code> failed when the <code>groups</code> was a
-factor with empty levels.
-</p>
-</li>
-<li><p> Some constrained ordination methods and their support
-functions are more robust in border cases (completely aliased
-effects, saturated models, user requests for non-existng scores
-etc). Concerns <code>capscale</code>, <code>ordistep</code>, <code>varpart</code>,
-<code>plot</code> function for constrained ordination, and
-<code>anova(<cca.object>, by = "margin")</code>.
-</p>
-</li>
-<li><p> The <code>scores</code> function for <code>monoMDS</code> did not
-honour <code>choices</code> argument and hence dimensions could not be
-chosen in <code>plot</code>.
-</p>
-</li>
-<li><p> The default <code>scores</code> method failed if the number of
-requested axes was higher than the ordination object had.  This
-was reported as an error in <code>ordiplot</code> in
-<a href="https://stat.ethz.ch/pipermail/r-sig-ecology/2012-February/002768.html">R-sig-ecology</a> mailing list.
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES</h4>
-
-
-<ul>
-<li> <p><code>metaMDS</code> argument <code>noshare = 0</code> is now
-regarded as a numeric threshold that always triggers extended
-dissimilarities (<code>stepacross</code>), instead of being treated
-as synonymous with <code>noshare = FALSE</code> which always
-suppresses extended dissimilarities.
-</p>
-</li>
-<li><p> Nestedness discrepancy index <code>nesteddisc</code> gained a
-new argument that allows user to set the number of iterations
-in optimizing the index.
-</p>
-</li>
-<li> <p><code>oecosimu</code> displays the mean of simulations and
-describes alternative hypothesis more clearly in the printed
-output. 
-</p>
-</li>
-<li><p> Implemented adjusted <i>R-squared</i> for partial
-RDA. For partial model <code>rda(Y ~ X1 + Condition(X2))</code> this
-is the same as the component <code>[a] = X1|X2</code> in variance
-partition in <code>varpart</code> and describes the marginal (unique)
-effect of constraining term to adjusted <i>R-squared</i>.
-</p>
-</li>
-<li><p> Added Cao dissimilarity (CYd) as a new dissimilarity
-method in <code>vegdist</code> following Cao et al., <em>Water
-Envir Res</em> 69, 95–106 (1997). The index should be good for
-data with high beta diversity and variable sampling
-intensity. Thanks to consultation to Yong Cao (Univ Illinois,
-USA).
-</p>
-</li></ul>
-
- 
-
-
-<h3>Changes in version 2.0-2</h3>
-
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li><p> Function <code>capscale</code> failed if constrained component
-had zero rank. This happened most likely in partial models when
-the conditions aliased constraints. The problem was observed in
-<code>anova(..., by ="margin")</code> which uses partial models to
-analyses the marginal effects, and was reported in an email
-message to
-<a href="https://stat.ethz.ch/pipermail/r-help/2011-October/293077.html">R-News
-mailing list</a>.
-</p>
-</li>
-<li> <p><code>stressplot</code> and <code>goodness</code> sometimes failed when
-<code>metaMDS</code> was based on <code>isoMDS</code> (<span class="pkg">MASS</span> package)
-because <code>metaMDSdist</code> did not use the same defaults for
-step-across (extended) dissimilarities as
-<code>metaMDS(..., engine = "isoMDS")</code>. The change of defaults can
-also influence triggering of step-across in
-<code>capscale(..., metaMDSdist = TRUE)</code>.
-</p>
-</li>
-<li> <p><code>adonis</code> contained a minor bug resulting from
-incomplete implementation of a speed-up that did not affect the
-results. In fixing this bug, a further bug was identified in
-transposing the hat matrices. This second bug was only active
-following fixing of the first bug. In fixing both bugs, a
-speed-up in the internal f.test() function is fully
-realised. Reported by Nicholas Lewin-Koh.
-</p>
-</li></ul>
-
-  
-
-
-<h4>NEW FEATURES</h4>
-
-
-<ul>
-<li> <p><code>ordiarrows</code> and <code>ordisegments</code> gained argument
-<code>order.by</code> that gives a variable to sort points within
-<code>groups</code>. Earlier the points were assumed to be in order.
-</p>
-</li>
-<li><p> Function <code>ordispider</code> invisibly returns the
-coordinates to which the points were connected.  Typically these
-are class centroids of each point, but for constrained ordination
-with no <code>groups</code> they are the LC scores.
-</p>
-</li></ul>
-		 
-  
-
-
-<h3>Changes in version 2.0-1</h3>
-
-
-
-<h4>NEW FUNCTIONS</h4>
-
-
-<ul>
-<li> <p><code>clamtest</code>: new function to classify species as
-generalists and specialists in two distinct habitats (CLAM test of
-Chazdon et al., <em>Ecology</em> 92, 1332–1343; 2011).  The test is
-based on multinomial distribution of individuals in two habitat
-types or sampling units, and it is applicable only to count data
-with no over-dispersion.
-</p>
-</li>
-<li> <p><code>as.preston</code> gained <code>plot</code> and <code>lines</code>
-methods, and <code>as.fisher</code> gained <code>plot</code> method (which
-also can add items to existing plots). These are similar as
-<code>plot</code> and <code>lines</code> for <code>prestonfit</code> and
-<code>fisherfit</code>, but display only data without the fitted lines.
-</p>
-</li>
-<li> <p><code>raupcrick</code>: new function to implement Raup-Crick
-dissimilarity as a probability of number of co-occurring species
-with occurrence probabilities proportional to species
-frequencies.  <span class="pkg">Vegan</span> has Raup-Crick index as a choice in
-<code>vegdist</code>, but that uses equal sampling probabilities for
-species and analytic equations. The new <code>raupcrick</code>
-function uses simulation with <code>oecosimu</code>. The function
-follows Chase et al. (2011) <em>Ecosphere</em> 2:art24
-[<a href="http://www.esajournals.org/doi/abs/10.1890/ES10-00117.1">doi:10.1890/ES10-00117.1</a>],
-and was developed with the consultation of Brian Inouye.
-</p>
-</li></ul>
-
- 
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li><p> Function <code>meandist</code> could scramble items and give
-wrong results, especially when the <code>grouping</code> was
-numerical. The problem was reported by Dr Miguel Alvarez
-(Univ. Bonn).
-</p>
-</li>
-<li> <p><code>metaMDS</code> did not reset <code>tries</code> when a new model
-was started with a <code>previous.best</code> solution from a different
-model. 
-</p>
-</li>
-<li><p> Function <code>permatswap</code> for community null models using
-quantitative swap never swapped items in a <i>2 by 2</i>
-submatrix if all cells were filled.
-</p>
-</li>
-<li><p> The result from <code>permutest.cca</code> could not be
-<code>update</code>d because of a ‘<span class="file">NAMESPACE</span>’ issue.
-</p>
-</li>
-<li> <p><span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.14.0 changed so that it does not accept using
-<code>sd()</code> function for matrices (which was the behaviour at
-least since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 1.0-0), and several <span class="pkg">vegan</span> functions were
-changed to adapt to this change (<code>rda</code>, <code>capscale</code>,
-<code>simulate</code> methods for <code>rda</code>, <code>cca</code> and
-<code>capscale</code>). The change in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.14.0 does not influence the
-results but you probably wish to upgrade <span class="pkg">vegan</span> to avoid
-annoying warnings.
-</p>
-</li></ul>
-	
- 
-
-
-<h4>ANALYSES</h4>
-
-
-<ul>
-<li> <p><code>nesteddisc</code> is slacker and hence faster when trying
-to optimize the statistic for tied column frequencies. Tracing
-showed that in most cases an improved ordering was found rather
-early in tries, and the results are equally good in most cases.
-</p>
-</li></ul>
-
- 
-
-
-<h3>Changes in version 2.0-0</h3>
-
-
-
-<h4>GENERAL</h4>
-
-
-<ul>
-<li><p> Peter Minchin joins the <span class="pkg">vegan</span> team.
-</p>
-</li>
-<li> <p><span class="pkg">vegan</span> implements standard <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> ‘<span class="file">NAMESPACE</span>’. In
-general, <code>S3</code> methods are not exported which means that you
-cannot directly use or see contents of functions like
-<code>cca.default</code>, <code>plot.cca</code> or <code>anova.ccabyterm</code>. To
-use these functions you should rely on <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> delegation and simply
-use <code>cca</code> and for its result objects use <code>plot</code> and
-<code>anova</code> without suffix <code>.cca</code>. To see the contents of
-the function you can use <code>:::</code>, such as
-<code>vegan:::cca.default</code>. This change may break packages,
-documents or scripts that rely on non-exported names.
-</p>
-</li>
-<li> <p><span class="pkg">vegan</span> depends on the <span class="pkg">permute</span> package. This
-package provides powerful tools for restricted permutation
-schemes. All <span class="pkg">vegan</span> permutation will gradually move to use
-<span class="pkg">permute</span>, but currently only <code>betadisper</code> uses the new
-feature. 
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FUNCTIONS</h4>
-
-
-<ul>
-<li> <p><code>monoMDS</code>: a new function for non-metric
-multidimensional scaling (NMDS). This function replaces
-<code>MASS::isoMDS</code> as the default method in
-<code>metaMDS</code>. Major advantages of <code>monoMDS</code> are that it
-has ‘weak’ (‘primary’) tie treatment which means
-that it can split tied observed dissimilarities.  ‘Weak’
-tie treatment improves ordination of heterogeneous data sets,
-because maximum dissimilarities of <i>1</i> can be split. In
-addition to global NMDS, <code>monoMDS</code> can perform local and
-hybrid NMDS and metric MDS.  It can also handle missing and zero
-dissimilarities.  Moreover, <code>monoMDS</code> is faster than
-previous alternatives. The function uses <code>Fortran</code> code
-written by Peter Minchin.
-</p>
-</li>
-<li> <p><code>MDSrotate</code> a new function to replace
-<code>metaMDSrotate</code>. This function can rotate both <code>metaMDS</code>
-and <code>monoMDS</code> results so that the first axis is parallel to
-an environmental vector.
-</p>
-</li>
-<li> <p><code>eventstar</code> finds the minimum of the evenness profile
-on the Tsallis entropy, and uses this to find the corresponding
-values of diversity, evenness and numbers equivalent following
-Mendes et al. (<em>Ecography</em> 31, 450-456; 2008). The code was
-contributed by Eduardo Ribeira Cunha and Heloisa Beatriz Antoniazi
-Evangelista and adapted to <span class="pkg">vegan</span> by Peter Solymos.
-</p>
-</li>
-<li> <p><code>fitspecaccum</code> fits non-linear regression models to
-the species accumulation results from <code>specaccum</code>. The
-function can use new self-starting species accumulation models
-in <span class="pkg">vegan</span> or other self-starting non-linear regression
-models in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>. The function can fit Arrhenius, Gleason, Gitay,
-Lomolino (in <span class="pkg">vegan</span>), asymptotic, Gompertz,
-Michaelis-Menten, logistic and Weibull (in base <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>) models. The
-function has <code>plot</code> and <code>predict</code> methods.
-</p>
-</li>
-<li><p> Self-starting non-linear species accumulation models
-<code>SSarrhenius</code>, <code>SSgleason</code>, <code>SSgitay</code> and
-<code>SSlomolino</code>. These can be used with <code>fitspecaccum</code> or
-directly in non-linear regression with <code>nls</code>. These functions
-were implemented because they were found good for species-area
-models by Dengler (<em>J. Biogeogr.</em> 36, 728-744; 2009).
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES</h4>
-
-
-<ul>
-<li> <p><code>adonis</code>, <code>anosim</code>, <code>meandist</code> and
-<code>mrpp</code> warn on negative dissimilarities, and
-<code>betadisper</code> refuses to analyse them. All these functions
-expect dissimilarities, and giving something else (like
-correlations) probably is a user error.
-</p>
-</li>
-<li> <p><code>betadisper</code> uses restricted permutation of the
-<span class="pkg">permute</span> package. 
-</p>
-</li>
-<li> <p><code>metaMDS</code> uses <code>monoMDS</code> as its default ordination
-engine. Function gains new argument <code>engine</code> that can be used
-to alternatively select <code>MASS::isoMDS</code>.  The default is not
-to use <code>stepacross</code> with <code>monoMDS</code> because its
-‘weak’ tie treatment can cope with tied maximum
-dissimilarities of one. However, <code>stepacross</code> is the default
-with <code>isoMDS</code> because it cannot handle adequately these tied
-maximum dissimilarities.
-</p>
-</li>
-<li> <p><code>specaccum</code> gained <code>predict</code> method which uses
-either linear or spline interpolation for data between observed
-points. Extrapolation is possible with spline interpolation, but
-may make little sense.
-</p>
-</li>
-<li> <p><code>specpool</code> can handle missing values or empty factor
-levels in the grouping factor <code>pool</code>.  Now also checks that
-the length of the <code>pool</code> matches the number of
-observations.
-</p>
-</li></ul>
-
- 
-
-
-<h4>DEPRECATED AND DEFUNCT</h4>
-
-
-<ul>
-<li> <p><code>metaMDSrotate</code> was replaced with <code>MDSrotate</code>
-that can also handle the results of <code>monoMDS</code>.
-</p>
-</li>
-<li> <p><code>permuted.index2</code> and other “new” permutation
-code was removed in favour of the <span class="pkg">permute</span> package. This code
-was not intended for normal use, but packages depending on that
-code in <span class="pkg">vegan</span> should instead depend on <span class="pkg">permute</span>.
-</p>
-</li></ul>
-  
- 
-
-
-<h4>ANALYSES</h4>
-
-
-<ul>
-<li> <p><code>treeheight</code> uses much snappier code. The results
-should be unchanged.
-</p>
-</li></ul>
-
- 
-
-
-</body></html>
diff --git a/inst/doc/decision-vegan.Rnw b/inst/doc/decision-vegan.Rnw
index 6e00ca8..5658dcb 100644
--- a/inst/doc/decision-vegan.Rnw
+++ b/inst/doc/decision-vegan.Rnw
@@ -251,7 +251,6 @@ cross <- function(x, a, p) f(x,p) - a + x
 r <- uniroot(cross, c(0,1), a = x+y, p = mod$p)$root
 arrows(x,y, r, f(r, mod$p), lwd=4)
 @
-\label{fig:nestedtemp}
 \caption{Matrix temperature for \emph{Falco subbuteo} on Sibbo
   Svartholmen (dot). The curve is the fill line, and in a cold
   matrix, all presences (red squares) should be in the upper left
@@ -260,6 +259,7 @@ arrows(x,y, r, f(r, mod$p), lwd=4)
   the fill line. The ``surprise'' for this point is $u = (d/D)^2$ and
   the matrix temperature is based on the sum of surprises: presences
   outside the fill line or absences within the fill line.}
+\label{fig:nestedtemp}
 \end{figure}
 The function can be implemented in many ways following the general
 principles.  \citet{RodGir06} have seen the original code and reveal
diff --git a/inst/doc/decision-vegan.pdf b/inst/doc/decision-vegan.pdf
index a2ae6fa..2b0ed37 100644
Binary files a/inst/doc/decision-vegan.pdf and b/inst/doc/decision-vegan.pdf differ
diff --git a/inst/doc/diversity-vegan.pdf b/inst/doc/diversity-vegan.pdf
index d329def..264cbe9 100644
Binary files a/inst/doc/diversity-vegan.pdf and b/inst/doc/diversity-vegan.pdf differ
diff --git a/inst/doc/intro-vegan.pdf b/inst/doc/intro-vegan.pdf
index 944f661..7f1fc42 100644
Binary files a/inst/doc/intro-vegan.pdf and b/inst/doc/intro-vegan.pdf differ
diff --git a/inst/doc/partitioning.R b/inst/doc/partitioning.R
new file mode 100644
index 0000000..37d499f
--- /dev/null
+++ b/inst/doc/partitioning.R
@@ -0,0 +1,34 @@
+### R code from vignette source 'partitioning.Rnw'
+
+###################################################
+### code chunk number 1: partitioning.Rnw:20-26
+###################################################
+par(mfrow=c(1,1))
+figset <- function() par(mar=c(4,4,1,1)+.1)
+options(SweaveHooks = list(fig = figset))
+library(vegan)
+labs <- paste("Table", 1:4)
+cls <- c("hotpink", "skyblue", "orange", "limegreen")
+
+
+###################################################
+### code chunk number 2: partitioning.Rnw:39-40
+###################################################
+getOption("SweaveHooks")[["fig"]]()
+showvarparts(2, bg = cls, Xnames=labs)
+
+
+###################################################
+### code chunk number 3: partitioning.Rnw:51-52
+###################################################
+getOption("SweaveHooks")[["fig"]]()
+showvarparts(3, bg = cls, Xnames=labs)
+
+
+###################################################
+### code chunk number 4: partitioning.Rnw:64-65
+###################################################
+getOption("SweaveHooks")[["fig"]]()
+showvarparts(4, bg = cls, Xnames=labs)
+
+
diff --git a/inst/doc/partitioning.Rnw b/inst/doc/partitioning.Rnw
new file mode 100644
index 0000000..14dda7c
--- /dev/null
+++ b/inst/doc/partitioning.Rnw
@@ -0,0 +1,80 @@
+%\VignetteIndexEntry{Partition of Variation}
+%% This file rewrites Pierre Legendre's introduction and takes pages
+%% of Pierre Legendre's pdf documents and puts them together.
+
+\documentclass[10pt]{article}
+\usepackage{vegan} %% vegan setup
+\usepackage{pdfpages}
+\setkeys{Gin}{width=0.6\linewidth}
+
+
+\title{Diagrams and Procedures for Partition of Variation}
+\author{Pierre Legendre}
+\date{\footnotesize{
+  processed with vegan \Sexpr{packageDescription("vegan", field="Version")}
+  in \Sexpr{R.version.string} on \today}}
+
+\begin{document}
+%% Sweave document
+\SweaveOpts{strip.white=true}
+<<echo=false>>=
+par(mfrow=c(1,1))
+figset <- function() par(mar=c(4,4,1,1)+.1)
+options(SweaveHooks = list(fig = figset))
+library(vegan)
+labs <- paste("Table", 1:4)
+cls <- c("hotpink", "skyblue", "orange", "limegreen")
+@
+
+\maketitle
+
+\noindent Diagrams describing the partitions of variation of a
+response data table by two (Fig.~\ref{fig:part2}), three
+(Fig.~\ref{fig:part3}) and four tables (Fig.~\ref{fig:part4}) of
+explanatory variables. The fraction names [a] to [p] in the output of
+\code{varpart} function follow the notation in these Venn diagrams,
+and the diagrams were produced using the \code{showvarparts} function.
+%%%%%%%%%%%%%%%
+\begin{figure}[!ht]
+<<echo=FALSE,fig=TRUE>>=
+showvarparts(2, bg = cls, Xnames=labs)
+@ 
+\caption{3 regression/ canonical analyses and 3 subtraction equations
+  are needed to estimate the $4\;(=2^2)$ fractions. 
+  
+  [a] and [c] can be tested for significance (3 canonical analyses per
+  permutation). Fraction [b] cannot be tested singly.}
+\label{fig:part2}
+\end{figure}
+%%%%%%%%%%%
+\begin{figure}[!ht]
+<<echo=FALSE,fig=TRUE>>=
+showvarparts(3, bg = cls, Xnames=labs)
+@ 
+\caption{7 regression/ canonical analyses and 10 subtraction equations
+  are needed to estimate the $8\;(=2^3)$ fractions. 
+  
+  [a] to [c] and subsets containing [a] to [c] can be tested for
+  significance (4 canonical analyses per permutation to test [a] to
+  [c]). Fractions [d] to [g] cannot be tested singly.}
+\label{fig:part3}
+\end{figure}
+%%%%%%%%%%%
+\begin{figure}[!ht]
+<<echo=FALSE,fig=TRUE>>=
+showvarparts(4, bg = cls, Xnames=labs)
+@ 
+\caption{15 regression/ canonical analyses and 27 subtraction equations
+  are needed to estimate the $16\;(=2^4)$ fractions. 
+  
+  [a] to [d] and subsets containing [a] to [d] can be tested for
+  significance (5 canonical analyses per permutation to test [a] to
+  [d]). Fractions [e] to [o] cannot be tested singly.}
+\label{fig:part4}
+\end{figure}
+\clearpage
+\setkeys{Gin}{width=\paperwidth}
+%% Add partitioning models 2-3 and 4.
+\includepdf[fitpaper=true,pages=-]{varpart23.pdf}
+\includepdf[fitpaper=true, pages=-]{varpart4.pdf}
+\end{document}
diff --git a/inst/doc/partitioning.pdf b/inst/doc/partitioning.pdf
index 2faadde..b1b0176 100644
Binary files a/inst/doc/partitioning.pdf and b/inst/doc/partitioning.pdf differ
diff --git a/man/cca.Rd b/man/cca.Rd
index 8a70748..9c9f562 100644
--- a/man/cca.Rd
+++ b/man/cca.Rd
@@ -34,7 +34,9 @@
     of the model formula.}
   \item{X}{ Community data matrix. }
   \item{Y}{ Constraining matrix, typically of environmental variables.
-    Can be missing. }
+    Can be missing. It is better to use \code{formula} instead of this
+    argument, and some further analyses only work when \code{formula}
+    was used.}
   \item{Z}{ Conditioning matrix, the effect of which is removed
     (`partialled out') before next step. Can be missing.}
   \item{scale}{Scale species to unit variance (like correlations).}
@@ -70,10 +72,13 @@
   algorithm of \pkg{vegan}. The algorithm of CCA is similar, but
   involves standardization by row and column weights.
 
-  The functions can be called either with matrix-like entries for community
-  data and constraints, or with formula interface.  In general, the
-  formula interface is preferred, because it allows a better control of
-  the model and allows factor constraints.
+  The functions can be called either with matrix-like entries for
+  community data and constraints, or with formula interface.  In
+  general, the formula interface is preferred, because it allows a
+  better control of the model and allows factor constraints. Some
+  analyses of ordination results are only possible if model was fitted
+  with formula (e.g., most cases of \code{\link{anova.cca}}, automatic
+  model building).
 
   In the following sections, \code{X}, \code{Y} and \code{Z}, although
   referred to as matrices, are more commonly data frames.
@@ -243,8 +248,8 @@
   several components (\code{\link{varpart}}).
 
   Design decisions are explained in \code{\link{vignette}}
-  \file{decision-vegan} which also can be accessed with
-  \code{\link{vegandocs}}.
+  on \dQuote{Design decisions} which can be accessed with
+  \code{browseVignettes("vegan")}.
 
   Package \pkg{ade4} provides alternative constrained ordination
   functions \code{\link[ade4]{cca}} and \code{\link[ade4]{pcaiv}}.
@@ -271,10 +276,6 @@ data(dune)
 data(dune.env)
 dune.Manure <- rda(dune ~ Manure, dune.env)
 plot(dune.Manure) 
-## For further documentation:
-\dontrun{
-vegandocs("decision")
-}
 }
 \keyword{ multivariate }
 
diff --git a/man/clamtest.Rd b/man/clamtest.Rd
index c6417c5..feb69d4 100644
--- a/man/clamtest.Rd
+++ b/man/clamtest.Rd
@@ -114,7 +114,7 @@ Peter Solymos \email{solymos at ualberta.ca}
 }
 \note{
 The code was tested against standalone CLAM software provided
-on the website of Anne Chao (\url{http://chao.stat.nthu.edu.tw/softwarece.html});
+on the website of Anne Chao (\url{http://chao.stat.nthu.edu.tw/wordpress/});
 minor inconsistencies were found, especially for finding the
 threshold for 'too rare' species.
 These inconsistencies are probably due to numerical differences between the
diff --git a/man/diversity.Rd b/man/diversity.Rd
index 0307ffd..c2ce3a8 100644
--- a/man/diversity.Rd
+++ b/man/diversity.Rd
@@ -79,12 +79,12 @@ specnumber(x, groups, MARGIN = 1)
 \seealso{These functions calculate only some basic indices, but many
   others can be derived with them (see Examples). Facilities related to
   diversity are discussed in a \pkg{vegan} vignette that can be read
-  with command \code{vegandocs("diversity")}.  Functions
-  \code{\link{renyi}} and \code{\link{tsallis}} estimate a series of
-  generalized diversity indices. Function \code{\link{rarefy}} finds
-  estimated number of species for given sample size. Beta diversity can
-  be estimated with \code{\link{betadiver}}. Diversities can be
-  partitioned with \code{\link{adipart}} and \code{\link{multipart}}. }
+  with \code{browseVignettes("vegan")}.  Functions \code{\link{renyi}}
+  and \code{\link{tsallis}} estimate a series of generalized diversity
+  indices. Function \code{\link{rarefy}} finds estimated number of
+  species for given sample size. Beta diversity can be estimated with
+  \code{\link{betadiver}}. Diversities can be partitioned with
+  \code{\link{adipart}} and \code{\link{multipart}}. }
 
 \author{ Jari Oksanen  and  Bob O'Hara (\code{fisher.alpha}).}
 
diff --git a/man/mso.Rd b/man/mso.Rd
index 310db85..286fb88 100644
--- a/man/mso.Rd
+++ b/man/mso.Rd
@@ -18,12 +18,13 @@ msoplot(x, alpha = 0.05, explained = FALSE, ylim = NULL, legend = "topleft", ...
 }
 \arguments{
   \item{object.cca}{ An object of class cca, created by the \code{\link{cca}} or
-    \code{\link{rda}} function.} 
-  \item{object.xy}{ A vector, matrix or data frame with the spatial
-    coordinates of the data represented by object.cca. Must have the
-    same number of rows as \code{object.cca$CA$Xbar} (see
-    \code{\link{cca.object}}). } 
-  \item{grain}{ Interval size for distance classes.}
+    \code{\link{rda}} function.}
+   \item{object.xy}{ A vector, matrix or data frame with the spatial
+    coordinates of the data represented by \code{object.cca}. The
+    number of rows must match the number of observations (as given by
+    \code{nobs}) in \code{cca.object}. Alternatively, interpoint
+    distances can be supplied as a \code{\link{dist}} object. }
+   \item{grain}{ Interval size for distance classes.}
   \item{round.up}{ Determines the choice of breaks. If false, distances
     are rounded to the nearest multiple of grain. If true, distances are
     rounded to the upper multiple of grain.} 
diff --git a/man/nestedtemp.Rd b/man/nestedtemp.Rd
index 0ae7e48..cb10295 100644
--- a/man/nestedtemp.Rd
+++ b/man/nestedtemp.Rd
@@ -93,7 +93,7 @@ nestedbetajac(comm)
   cautious in interpreting the results. The details of calculations are
   explained in the \code{\link{vignette}} \emph{Design decisions and
   implementation} that you can read using functions
-  \code{\link{vignette}} or \code{\link{vegandocs}}. Function
+  \code{\link{browseVignettes}}. Function
   \code{\link[bipartite]{nestedness}} in the \pkg{bipartite} package is
   a direct port of the BINMATNEST programme of
   \enc{Rodríguez-Gironés}{Rodriguez-Girones} & Santamaria (2006).
diff --git a/man/oecosimu.Rd b/man/oecosimu.Rd
index 5790ef2..12974b6 100644
--- a/man/oecosimu.Rd
+++ b/man/oecosimu.Rd
@@ -80,8 +80,7 @@ oecosimu(comm, nestfun, method, nsimul = 99, burnin = 0, thin = 1,
     processing. The parallel processing is done with \pkg{parallel}
     package.  If you define a \code{nestfun} in Windows that needs other
     \R packages than \pkg{vegan} or \pkg{permute}, you must set up a
-    socket cluster before the call. See \code{\link{vegandocs}}
-    \code{decision-vegan} for details. }
+    socket cluster before the call. }
   \item{x}{An \code{oecosimu} result object.}
 
   \item{\dots}{Other arguments to functions.}
diff --git a/man/plot.cca.Rd b/man/plot.cca.Rd
index b35960d..a7be07f 100644
--- a/man/plot.cca.Rd
+++ b/man/plot.cca.Rd
@@ -88,9 +88,10 @@
   \item{const}{General scaling constant to \code{rda} scores. The
     default is to use a constant that gives biplot scores, that is,
     scores that approximate original data (see \code{\link{vignette}}
-    \samp{decision-vegan.pdf} with \code{\link{vegandocs}} for details
-    and discussion). If \code{const} is a vector of two items, the first
-    is used for species, and the second item for site scores.}
+    on \sQuote{Design Decisions} with \code{browseVignettes("vegan")}
+    for details and discussion). If \code{const} is a vector of two
+    items, the first is used for species, and the second item for site
+    scores.}
   \item{axis.bp}{Draw \code{\link{axis}} for biplot arrows.}
   \item{axes}{Number of axes in summaries.}
   \item{digits}{Number of digits in output.}
@@ -181,9 +182,6 @@ points(mod, pch=21, col="red", bg="yellow", cex=1.2)
 text(mod, "species", col="blue", cex=0.8)
 ## Limited output of 'summary'
 head(summary(mod), tail=2)
-## Read description of scaling in RDA in vegan:
-\dontrun{vegandocs("decision")}
-
 ## Scaling can be numeric or more user-friendly names
 ## e.g. Hill's scaling for (C)CA
 scrs <- scores(mod, scaling = "sites", hill = TRUE)
diff --git a/man/procrustes.Rd b/man/procrustes.Rd
index 193defb..d967158 100644
--- a/man/procrustes.Rd
+++ b/man/procrustes.Rd
@@ -22,9 +22,12 @@ procrustes(X, Y, scale = TRUE, symmetric = FALSE, scores = "sites", ...)
 \method{plot}{procrustes}(x, kind=1, choices=c(1,2), to.target = TRUE, 
     type = "p", xlab, ylab, main, ar.col = "blue", len=0.05, 
     cex = 0.7, ...)
-\method{points}{procrustes}(x, display = c("target", "rotated"), ...)
-\method{text}{procrustes}(x, display = c("target", "rotated"), labels, ...)
-\method{lines}{procrustes}(x, type = c("segments", "arrows"), choices = c(1, 2), ...)  
+\method{points}{procrustes}(x, display = c("target", "rotated"),
+    choices = c(1,2), truemean = FALSE, ...)
+\method{text}{procrustes}(x, display = c("target", "rotated"),
+    choices = c(1,2), labels, truemean = FALSE, ...)
+\method{lines}{procrustes}(x, type = c("segments", "arrows"),
+    choices = c(1, 2), truemean = FALSE, ...)
 \method{residuals}{procrustes}(object, ...)
 \method{fitted}{procrustes}(object, truemean = TRUE, ...)
 \method{predict}{procrustes}(object, newdata, truemean = TRUE, ...)
@@ -61,7 +64,8 @@ protest(X, Y, scores = "sites", permutations = how(nperm = 999), ...)
     target and rotated configuration.}
   \item{truemean}{Use the original range of target matrix instead of
     centring the fitted values. Function \code{plot.procrustes} needs
-    \code{truemean = FALSE}.}
+    \code{truemean = FALSE}, and adding graphical items to the plots
+    from the original results may need \code{truemean = TRUE}.}
   \item{newdata}{Matrix of coordinates to be rotated and translated to
      the target.}
   \item{permutations}{a list of control values for the permutations
diff --git a/man/rarefy.Rd b/man/rarefy.Rd
index 7db8977..943c404 100644
--- a/man/rarefy.Rd
+++ b/man/rarefy.Rd
@@ -47,17 +47,20 @@ rareslope(x, sample)
   \code{rarefy} is based on Hurlbert's (1971) formulation, and the
   standard errors on Heck et al. (1975).
 
-  Function \code{rrarefy} generates one randomly rarefied community data
-  frame or vector of given \code{sample} size. The \code{sample} can be
-  a vector giving the sample sizes for each row, and its values must be
-  less or equal to observed number of individuals. The random
-  rarefaction is made without replacement so that the variance of
-  rarefied communities is rather related to rarefaction proportion than
-  to to the size of the \code{sample}.
-
-  Function \code{drarefy} returns probabilities that species occur in a
-  rarefied community of size \code{sample}. The \code{sample} can be a
-  vector giving the sample sizes for each row.
+  Function \code{rrarefy} generates one randomly rarefied community
+  data frame or vector of given \code{sample} size. The \code{sample}
+  can be a vector giving the sample sizes for each row.  If the
+  \code{sample} size is equal to or smaller than the observed number
+  of individuals, the non-rarefied community will be returned.  The
+  random rarefaction is made without replacement so that the variance
+  of rarefied communities is rather related to rarefaction proportion
+  than to the size of the \code{sample}.
+
+  Function \code{drarefy} returns probabilities that species occur in
+  a rarefied community of size \code{sample}. The \code{sample} can be
+  a vector giving the sample sizes for each row. If the \code{sample}
+  is equal to or smaller than the observed number of individuals, all
+  observed species will have sampling probability 1.
 
   Function \code{rarecurve} draws a rarefaction curve for each row of
   the input data. The rarefaction curves are evaluated using the
diff --git a/man/simper.Rd b/man/simper.Rd
index faf81b8..73aea3c 100644
--- a/man/simper.Rd
+++ b/man/simper.Rd
@@ -31,9 +31,7 @@ simper(comm, group, permutations = 0, trace = FALSE,
   \item{digits}{Number of digits in output.}
   \item{parallel}{Number of parallel processes or a predefined socket
     cluster.  With \code{parallel = 1} uses ordinary, non-parallel
-    processing. The parallel processing is done with \pkg{parallel}
-    package. See \code{\link{vegandocs}} \code{decision-vegan} for
-    details.}
+    processing.}
   \item{...}{Parameters passed to other functions. In \code{simper} the
     extra parameters are passed to \code{\link[permute]{shuffleSet}} if
     permutations are used.}
diff --git a/man/specpool.Rd b/man/specpool.Rd
index ce78039..68b16dc 100644
--- a/man/specpool.Rd
+++ b/man/specpool.Rd
@@ -121,18 +121,17 @@ estaccumR(x, permutations = 100, parallel = getOption("mc.cores"))
     the number 
     of individuals in rare species.
 
-    Functions estimate the standard errors of the estimates. These
-    only concern the number of added species, and assume that there is
-    no variance in the observed richness.  The equations of standard
-    errors are too complicated to be reproduced in this help page, but
-    they can be studied in the \R source code of the function and are
-    discussed in the \code{\link{vignette}} \dQuote{diversity-vegan}
-    that can be read with the \code{\link{vegandocs}} command. The
-    standard error are based on the following sources: Chiu et
-    al. (2014) for the Chao estimates and Smith and van Belle (1984)
-    for the first-order Jackknife and the bootstrap (second-order
-    jackknife is still missing).  For the variance estimator of
-    \eqn{S_{ace}}{S_ace} see O'Hara (2005).
+    Functions estimate the standard errors of the estimates. These only
+    concern the number of added species, and assume that there is no
+    variance in the observed richness.  The equations of standard errors
+    are too complicated to be reproduced in this help page, but they can
+    be studied in the \R source code of the function and are discussed
+    in the \code{\link{vignette}} that can be read with the
+    \code{browseVignettes("vegan")}. The standard error are based on the
+    following sources: Chiu et al. (2014) for the Chao estimates and
+    Smith and van Belle (1984) for the first-order Jackknife and the
+    bootstrap (second-order jackknife is still missing).  For the
+    variance estimator of \eqn{S_{ace}}{S_ace} see O'Hara (2005).
 
   Functions \code{poolaccum} and \code{estaccumR} are similar to
   \code{\link{specaccum}}, but estimate extrapolated richness indices
diff --git a/man/varpart.Rd b/man/varpart.Rd
index deef977..ef71c15 100644
--- a/man/varpart.Rd
+++ b/man/varpart.Rd
@@ -92,10 +92,9 @@ table. }
   explained by the explanatory table. 
 
   The identifiable fractions are designated by lower case alphabets. The
-  meaning of the symbols can be found in the separate document
-  "partitioning.pdf" (which can be read using \code{\link{vegandocs}}),
-  or can be displayed graphically using function
-  \code{showvarparts}.
+  meaning of the symbols can be found in the separate document (use
+  \code{browseVignettes("vegan")}), or can be displayed graphically
+  using function \code{showvarparts}.
 
   A fraction is testable if it can be directly
   expressed as an RDA model.  In these cases the printed output also
@@ -107,9 +106,9 @@ table. }
   the number of estimated models.
 
   An abridged explanation of the alphabetic symbols for the individual
-  fractions follows, but computational details should be checked in
-  "partitioning.pdf" (readable with \code{\link{vegandocs}}) or in the
-  source code. 
+  fractions follows, but computational details should be checked in the
+  vignette (readable with \code{browseVignettes("vegan")}) or in the
+  source code.
 
   With two explanatory tables, the fractions explained 
   uniquely by each of the two tables are \code{[a]} and
@@ -209,11 +208,11 @@ Montreal, Canada.  Adapted to \pkg{vegan} by Jari Oksanen. }
 
 \note{
 
-  You can use command \code{\link{vegandocs}} to display document
-  "partitioning.pdf" which presents Venn diagrams showing the fraction
-  names in partitioning the variation of Y with respect to 2, 3, and 4
-  tables of explanatory variables, as well as the equations used in
-  variation partitioning.
+  You can use command \code{browseVignettes("vegan")} to display
+  document which presents Venn diagrams showing the fraction names in
+  partitioning the variation of Y with respect to 2, 3, and 4 tables of
+  explanatory variables, as well as the equations used in variation
+  partitioning.
 
   The functions frequently give negative estimates of variation.
   Adjusted \eqn{R^2}{R-squared} can be negative for any fraction;
@@ -252,11 +251,6 @@ data(mite)
 data(mite.env)
 data(mite.pcnm)
 
-## See detailed documentation:
-\dontrun{
-vegandocs("partition")
-}
-
 # Two explanatory matrices -- Hellinger-transform Y
 # Formula shortcut "~ ." means: use all variables in 'data'.
 mod <- varpart(mite, ~ ., mite.pcnm, data=mite.env, transfo="hel")
diff --git a/man/vegan-internal.Rd b/man/vegan-internal.Rd
index 34ae300..33652e7 100644
--- a/man/vegan-internal.Rd
+++ b/man/vegan-internal.Rd
@@ -27,7 +27,7 @@ ordiTerminfo(d, data)
 ordiNAexclude(x, excluded)
 ordiNApredict(omit, x)
 ordiArgAbsorber(..., shrink, origin, scaling, triangular,
-                display, choices, const, FUN)
+                display, choices, const, truemean, FUN)
 centroids.cca(x, mf, wt)
 getPermuteMatrix(perm, N, strata = NULL)
 howHead(x, ...)
diff --git a/man/vegan-package.Rd b/man/vegan-package.Rd
index a5ba941..3d45a0c 100644
--- a/man/vegan-package.Rd
+++ b/man/vegan-package.Rd
@@ -12,31 +12,26 @@ community ordination and dissimilarity analysis. Most of its
 multivariate tools can be used for other data types as well.  }
 
 \details{The functions in the \pkg{vegan} package contain tools for
-diversity analysis (see \code{\link{vignette}}
-\code{vegandocs("diversity")}), ordination and analysis of
-dissimilarities (see \code{\link{vignette}}
-\code{vegandocs("intro")}). Together with the \pkg{labdsv} package,
-the \pkg{vegan} package provides most standard tools of descriptive
-community analysis. Package \pkg{ade4} provides an alternative
-comprehensive package, and several other packages complement
-\pkg{vegan} and provide tools for deeper analysis in specific
-fields. Package \pkg{BiodiversityR} provides a GUI for a large subset
-of \pkg{vegan} functionality.
+diversity analysis, ordination methods and tools for the analysis of
+dissimilarities. Together with the \pkg{labdsv} package, the \pkg{vegan}
+package provides most standard tools of descriptive community
+analysis. Package \pkg{ade4} provides an alternative comprehensive
+package, and several other packages complement \pkg{vegan} and provide
+tools for deeper analysis in specific fields. Package
+\pkg{BiodiversityR} provides a GUI for a large subset of \pkg{vegan}
+functionality.
 
 The \pkg{vegan} package is developed at GitHub
 (\url{https://github.com/vegandevs/vegan/}).  GitHub provides up-to-date
 information and forums for bug reports.
 
-The \pkg{vegan} documents can be read with \code{\link{vegandocs}}
-function. In addition to \code{\link{vignette}}s of basic usage, you
-can read \code{NEWS} on the new features and bug fixes in the release
-version (\code{vegandocs("NEWS")}), and more technical and fine
-grained \code{ChangeLog} (\code{vegandocs("Change")}).  Several
-frequently asked questions really are answered in the vegan FAQ
-(\code{vegandocs("FAQ")}). The discussion on design decisions can be
-read with \code{vegandocs("decision")}.  A tutorial of the package at
-\url{http://cc.oulu.fi/~jarioksa/opetus/metodi/vegantutor.pdf}
-provides a more thorough introduction to the package.
+Most important changes in \pkg{vegan} documents can be read with
+\code{news(package="vegan")} and vignettes can be browsed with
+\code{browseVignettes("vegan")}. The vignettes include a \pkg{vegan}
+FAQ, discussion on design decisions, short introduction to ordination
+and discussion on diversity methods.  A tutorial of the package at
+\url{http://cc.oulu.fi/~jarioksa/opetus/metodi/vegantutor.pdf} provides
+a more thorough introduction to the package.
 
 To see the preferable citation of the package, type
 \code{citation("vegan")}.  
diff --git a/man/vegandocs.Rd b/man/vegandocs.Rd
index f36e708..da3fdc5 100644
--- a/man/vegandocs.Rd
+++ b/man/vegandocs.Rd
@@ -1,94 +1,27 @@
 \name{vegandocs}
 \alias{vegandocs}
 
-\title{Display Package Documentation}
+\title{Display vegan Documentation}
 
-\description{ Display NEWS, vignettes, other special documents or
-  ChangeLog in \pkg{vegan}, or vignettes in \pkg{permute}. }
+\description{Deprecated function to display news and vignettes in
+  \pkg{vegan}. You should use \code{\link[utils]{news}} or
+  \code{\link[utils]{browseVignettes}} instead. }
 
 \usage{
-vegandocs(doc = c("NEWS", "ONEWS", "FAQ-vegan.pdf",
-    "intro-vegan.pdf", "diversity-vegan.pdf", "decision-vegan.pdf",
-    "partitioning.pdf", "permutations.pdf"))
+vegandocs(doc = c("NEWS", "ONEWS", "FAQ-vegan", "intro-vegan",
+    "diversity-vegan", "decision-vegan", "partitioning", "permutations"))
 }
 
 \arguments{
   \item{doc}{The name of the document (partial match, case sensitive). }
 }
 
-\details{
-  You can read the following documents with this function:
-
-  \itemize{
- 
-   \item \code{NEWS}: most important new functions, features, fixes
-     etc. from the user's point of view. These can be also read using
-     \R command \code{\link{news}} as \code{news(package = "vegan")}.
-
-   \item \code{ONEWS}: old news about \pkg{vegan} version \code{1.*}
-     before September 2011.
-
-   \item \code{FAQ-vegan}: Frequently Asked Questions. Consult here
-     before writing to Mail groups.
-
-   \item \code{intro-vegan}: a \code{\link{vignette}} demonstrating a
-    simple, standard ordination analysis. This can be also read using
-    \code{vignette("intro-vegan", package="vegan")}. 
-
-   \item \code{diversity-vegan}: a \code{\link{vignette}} describing
-     (most) diversity analyses in \pkg{vegan}. This can be also read
-     using \code{vignette("diversity-vegan", package="vegan")}.
-
-   \item \code{decision-vegan}: a \code{\link{vignette}} discussing
-     design decisions in \pkg{vegan}.  Currently this discusses
-     parallel processing in \pkg{vegan}, implementing nestedness
-     temperature (\code{\link{nestedtemp}}), backtracking algorithm in
-     community null models (\code{\link{make.commsim}}), scaling of
-     RDA results, and why WA scores are used as default instead of LC
-     scores in constrained ordination.
-
-   \item \code{partitioning}: Detailed description of variation
-     partitioning schemes used in \code{\link{varpart}}.
-
-   \item \code{permutations}: a \code{\link{vignette}} in the
-     \pkg{permute} package giving an introduction to restricted
-     permutation schemes. You can also read this using
-     \code{vignette("permutations", package="permute")}.
-
-  }
-
-}
-
-
 \author{Jari Oksanen }
 
-\note{ Function \code{\link{vignette}} only works with vignettes
-  processed by \R, but the current function also shows other
-  \code{pdf} documents. You can extract \R code from
-  \code{\link{vignette}}s, but not from other documents (see
-  \code{Examples}).
+\note{The function is deprecated.}
 
-  The \code{permutations.pdf} document is in the \pkg{permute}
-  package.
+\seealso{\code{\link[utils]{browseVignettes}},
+\code{\link[utils]{vignette}}, \code{\link[utils]{news}}. }
 
-}
-
-\seealso{\code{\link{vignette}}, \code{\link{news}}. }
-\examples{
-\dontrun{
-## Read NEWS
-vegandocs()
-## Alternatively (perhaps with different formatting)
-news(package="vegan")
-## Read a vignette
-vegandocs("intro")
-## with vignette()
-vignette("intro-vegan", package="vegan")
-## extract R code
-vig <- vignette("intro-vegan", package="vegan")
-edit(vig)
-##
-}
-}
 \keyword{ utilities }
 \keyword{ documentation }
diff --git a/src/monoMDS.f b/src/monoMDS.f
index f9b0fe5..03fd2a1 100644
--- a/src/monoMDS.f
+++ b/src/monoMDS.f
@@ -10,6 +10,10 @@ C 1.00 March 28, 2011
 C 1.01 April 6, 2011  - added argument STRS(NGRP) to return the stress
 C                       for each of the NGRP groups of dissimilarities
 C                       i.e., from each separate regression.
+C 1.02 January 7, 2016 - fixed bug in MONREG so that huge 
+C                        dissimilarities are correctly handled in
+C                        creating the initial partition for monotone 
+C                        regression with primary tie treatment.
 C
 C Written by Dr. Peter R. Minchin
 C            Department of Biological Sciences
@@ -596,9 +600,9 @@ C OTHERWISE, UPDATE STEP SIZE.
 C
       ELSE
         FACTR1=4.0**COSAV
-        FACTR2=1.6/( (1.0+(MIN(1D0,SRATAV))**5) *
+        FACTR2=1.6/( (1.0+(MIN(1.0,SRATAV))**5) *
      .    (1.0+ACOSAV-ABS(COSAV)) )
-        FACTR3=SQRT(MIN(1D0,SRATIO))
+        FACTR3=SQRT(MIN(1.0,SRATIO))
         STEP=STEP*FACTR1*FACTR2*FACTR3
       ENDIF
       RETURN
@@ -900,7 +904,9 @@ C-----------------------------------------------------------------------
         IF (I.LT.N) THEN
           DNEXT=DISS(I+1)
         ELSE
-          DNEXT=DISS(I)+1.0
+C---Bug fix January 7, 2016: correctly handles huge dissimilarities
+C          DNEXT=DISS(I)+1.0
+          DNEXT=DISS(I)*2.0
         END IF
         IF (ABS(DNEXT-DISS(I)).GT.TOLER) THEN
 C---NTIE is the number of DISS values in the current group of tied values
diff --git a/vignettes/.install_extras b/vignettes/.install_extras
deleted file mode 100644
index e1862b3..0000000
--- a/vignettes/.install_extras
+++ /dev/null
@@ -1,2 +0,0 @@
-FAQ-vegan.pdf
-NEWS.html
diff --git a/vignettes/FAQ-vegan.Rmd b/vignettes/FAQ-vegan.Rmd
new file mode 100644
index 0000000..1e07b2d
--- /dev/null
+++ b/vignettes/FAQ-vegan.Rmd
@@ -0,0 +1,700 @@
+<!--
+%\VignetteIndexEntry{vegan FAQ}
+%\VignetteEngine{knitr::knitr}
+%\VignetteEncoding{UTF-8}
+-->
+
+**vegan** FAQ
+=============
+
+This document contains answers to some of the most frequently asked
+questions about R package **vegan**.
+
+> This work is licensed under the Creative Commons Attribution 3.0
+> License. To view a copy of this license, visit
+> <http://creativecommons.org/licenses/by/3.0/> or send a letter to
+> Creative Commons, 543 Howard Street, 5th Floor, San Francisco,
+> California, 94105, USA.
+>
+> Copyright © 2008-2016 vegan development team
+
+------------------------------------------------------------------------
+
+Introduction
+------------
+
+------------------------------------------------------------------------
+
+### What is **vegan**?
+
+**Vegan** is an R package for community ecologists. It contains the most
+popular methods of multivariate analysis needed in analysing ecological
+communities, and tools for diversity analysis, and other potentially
+useful functions. **Vegan** is not self-contained but it must be run
+under R statistical environment, and it also depends on many other R
+packages. **Vegan** is [free
+software](http://www.gnu.org/philosophy/free-sw.html) and distributed
+under [GPL2 license](http://www.gnu.org/licenses/gpl.html).
+
+------------------------------------------------------------------------
+
+### What is R?
+
+R is a system for statistical computation and graphics. It consists of a
+language plus a run-time environment with graphics, a debugger, access
+to certain system functions, and the ability to run programs stored in
+script files.
+
+R has a home page at <http://www.R-project.org/>. It is [free
+software](http://www.gnu.org/philosophy/free-sw.html) distributed under
+a GNU-style [copyleft](http://www.gnu.org/copyleft/copyleft.html), and
+an official part of the [GNU](http://www.gnu.org/) project (“GNU S”).
+
+------------------------------------------------------------------------
+
+### How to obtain **vegan** and R?
+
+Both R and latest release version of **vegan** can be obtained through
+[CRAN](http://cran.r-project.org). Unstable development version of
+**vegan** can be obtained through
+[GitHub](https://github.com/vegandevs/vegan). Formerly **vegan** was
+developed in [R-Forge](http://r-forge.r-project.org/projects/vegan/),
+but after moving to [GitHub](https://github.com/vegandevs/vegan) the
+R-Forge repository may be out of date.
+
+------------------------------------------------------------------------
+
+### What R packages **vegan** depends on?
+
+**Vegan** depends on the **permute** package which will provide advanced
+and flexible permutation routines for **vegan**. The **permute** package
+is developed together with **vegan** in
+[GitHub](https://github.com/gavinsimpson/permute).
+
+Some individual **vegan** functions depend on packages **MASS**,
+**mgcv**, **parallel**, **cluster**, **lattice** and **tcltk**. These
+all are base or recommended R packages that should be available in
+every R installation.  **Vegan** declares these as suggested or
+imported packages, and you can install **vegan** and use most of its
+functions without these packages.
+
+**Vegan** is accompanied with a supporting package **vegan3d** for
+three-dimensional and dynamic plotting. The **vegan3d** package needs
+non-standard packages **rgl** and **scatterplot3d**.
+
+------------------------------------------------------------------------
+
+### What other packages are available for ecologists?
+
+CRAN [Task Views](http://cran.r-project.org/src/contrib/Views/) include
+entries like `Environmetrics`, `Multivariate` and `Spatial` that
+describe several useful packages and functions. If you install R package
+**ctv**, you can inspect Task Views from your R session, and
+automatically install sets of most important packages.
+
+------------------------------------------------------------------------
+
+### What other documentation is available for **vegan**?
+
+**Vegan** is a fully documented R package with standard help pages.
+These are the most authoritative sources of documentation (and as a last
+resource you can use the force and the read the source, as **vegan** is
+open source). **Vegan** package ships with other documents which can be
+read with `vegandocs` command (documented in the **vegan** help). The
+documents included in the **vegan** package are
+
+-   **Vegan** `NEWS`
+-   This document (`FAQ-vegan`).
+-   Short introduction to basic ordination methods in **vegan**
+    (`intro-vegan`).
+-   Introduction to diversity methods in **vegan**
+    (`diversity-vegan`).
+-   Discussion on design decisions in **vegan** (`decision-vegan`).
+-   Description of variance partition procedures in function `varpart`
+    (`partitioning`).
+
+Web documents outside the package include:
+
+-   <https://github.com/vegandevs/vegan>: **vegan** homepage.
+-   <http://cc.oulu.fi/~jarioksa/opetus/metodi/vegantutor.pdf>:
+    **vegan** tutorial.
+
+------------------------------------------------------------------------
+
+### Is there a Graphical User Interface (GUI) for **vegan**?
+
+Roeland Kindt has made package **BiodiversityR** which provides a GUI
+for **vegan**. The package is available at
+[CRAN](https://cran.r-project.org/package=BiodiversityR).
+It is not a mere GUI for **vegan**, but adds some new functions and
+complements **vegan** functions in order to provide a workbench for
+biodiversity analysis. You can install **BiodiversityR** using
+`install.packages("BiodiversityR")` or graphical package management menu
+in R. The GUI works on Windows, MacOS X and Linux.
+
+------------------------------------------------------------------------
+
+### How to cite **vegan**?
+
+Use command `citation("vegan")` in R to see the recommended citation to
+be used in publications.
+
+------------------------------------------------------------------------
+
+### How to build **vegan** from sources?
+
+In general, you do not need to build **vegan** from sources, but binary
+builds of release versions are available through
+[CRAN](http://cran.r-project.org/) for Windows and MacOS X. If you use
+some other operating systems, you may have to use source packages.
+**Vegan** is a standard R package, and can be built like instructed in R
+documentation. **Vegan** contains source files in C and FORTRAN, and you
+need appropriate compilers (which may need more work in Windows and
+MacOS X).
+
+------------------------------------------------------------------------
+
+### Are there binaries for devel versions?
+
+[R-Forge](http://r-forge.r-project.org/projects/vegan/) runs daily tests
+on the devel package, and if passed, it builds source package together
+with Windows binaries. However, the R-Forge may be out of date, because
+**vegan** is mainly developed in
+[GitHub](https://github.com/vegandevs/vegan). You can install R-Forge
+packages within R with command
+`install.packages("vegan", repos="http://r-forge.r-project.org/")`. If
+you use GUI menu entry, you must select or define the R-Forge
+repository.
+
+------------------------------------------------------------------------
+
+### How to report a bug in **vegan**?
+
+If you think you have found a bug in **vegan**, you should report it to
+**vegan** maintainers or developers. The preferred forum to report bugs
+is [GitHub](https://github.com/vegandevs/vegan/issues). The bug report
+should be so detailed that the bug can be replicated and corrected.
+Preferably, you should send an example that causes a bug. If it needs a
+data set that is not available in R, you should send a minimal data set
+as well. You also should paste the output or error message in your
+message. You also should specify which version of **vegan** you used.
+
+Bug reports are welcome: they are the only way to make **vegan**
+non-buggy.
+
+Please note that you shall not send bug reports to R mailing lists,
+since **vegan** is not a standard R package.
+
+------------------------------------------------------------------------
+
+### Is it a bug or a feature?
+
+It is not necessarily a bug if some function gives different results
+than you expect: That may be a deliberate design decision. It may be
+useful to check the documentation of the function to see what was the
+intended behaviour. It may also happen that function has an argument to
+switch the behaviour to match your expectation. For instance, function
+`vegdist` always calculates quantitative indices (when this is
+possible). If you expect it to calculate a binary index, you should use
+argument `binary = TRUE`.
+
+------------------------------------------------------------------------
+
+### Can I contribute to **vegan**?
+
+**Vegan** is dependent on user contribution. All feedback is welcome. If
+you have problems with **vegan**, it may be as simple as incomplete
+documentation, and we shall do our best to improve the documents.
+
+Feature requests also are welcome, but they are not necessarily
+fulfilled. A new feature will be added if it is easy to do and it looks
+useful, or if you submit code.
+
+If you can write code yourself, the best forum to contribute to vegan is
+[GitHub](https://github.com/vegandevs/vegan).
+
+------------------------------------------------------------------------
+
+Ordination
+----------
+
+------------------------------------------------------------------------
+
+### I have only numeric and positive data but **vegan** still complains
+
+You are wrong! Computers are painfully pedantic, and if they find
+non-numeric or negative data entries, you really have them. Check your
+data. Most common reasons for non-numeric data are that row names were
+read as a non-numeric variable instead of being used as row names (check
+argument `row.names` in reading the data), or that the column names were
+interpreted as data (check argument `header = TRUE` in reading the
+data). Another common reason is that you had empty cells in your input
+data, and these were interpreted as missing values.
+
+------------------------------------------------------------------------
+
+### Can I analyse binary or cover class data?
+
+Yes. Most **vegan** methods can handle binary data or cover abundance
+data. Most statistical tests are based on permutation, and do not make
+distributional assumptions. There are some methods (mainly in diversity
+analysis) that need count data. These methods check that input data are
+integers, but they may be fooled by cover class data.
+
+------------------------------------------------------------------------
+
+### Why dissimilarities in **vegan** differ from other sources?
+
+Most commonly the reason is that other software use presence–absence
+data whereas **vegan** used quantitative data. Usually **vegan** indices
+are quantitative, but you can use argument `binary = TRUE` to make them
+presence–absence. However, the index name is the same in both cases,
+although different names usually occur in literature. For instance,
+Jaccard index actually refers to the binary index, but **vegan** uses
+name `"jaccard"` for the quantitative index, too.
+
+Another reason may be that indices indeed are defined differently,
+because people use same names for different indices.
+
+------------------------------------------------------------------------
+
+### Why NMDS stress is sometimes 0.1 and sometimes 10?
+
+Stress is a proportional measure of badness of fit. The proportions can
+be expressed either as parts of one or as percents. Function `isoMDS`
+(**MASS** package) uses percents, and function `monoMDS` (**vegan**
+package) uses proportions, and therefore the same stress is 100 times
+higher in `isoMDS`. The results of `goodness` function also depend on
+the definition of stress, and the same `goodness` is 100 times higher in
+`isoMDS` than in `monoMDS`. Both of these conventions are equally
+correct.
+
+------------------------------------------------------------------------
+
+### I get zero stress but no convergent solutions in `metaMDS`
+
+Most common reason is that you have too few observations for your NMDS.
+For `n` observations (points) and `k` dimensions you need to estimate
+`n*k` parameters (ordination scores) using `n*(n-1)/2` dissimilarities.
+For `k` dimensions you must have `n > 2*k + 1`, or for two dimensions at
+least six points. In some degenerate situations you may need even a
+larger number of points. If you have a lower number of points, you can
+find an undefined number of perfect (stress is zero) but different
+solutions. Conventional wisdom due to Kruskal is that you should have
+`n > 4*k + 1` points for `k` dimensions. A typical symptom of
+insufficient data is that you have (nearly) zero stress but no two
+convergent solutions. In those cases you should reduce the number of
+dimensions (`k`) and with very small data sets you should not use
+`NMDS`, but rely on metric methods.
+
+It seems that local and hybrid scaling with `monoMDS` have similar lower
+limits in practice (although theoretically they could differ). However,
+higher number of dimensions can be used in metric scaling, both with
+`monoMDS` and in principal coordinates analysis (`cmdscale` in
+**stats**, `wcmdscale` in **vegan**).
+
+------------------------------------------------------------------------
+
+### Zero dissimilarities in isoMDS
+
+Function `metaMDS` uses function `monoMDS` as its default method for
+NMDS, and this function can handle zero dissimilarities. Alternative
+function `isoMDS` cannot handle zero dissimilarities. If you want to use
+`isoMDS`, you can use argument `zerodist = "add"` in `metaMDS` to handle
+zero dissimilarities. With this argument, zero dissimilarities are
+replaced with a small positive value, and they can be handled in
+`isoMDS`. This is a kluge, and some people do not like this. A more
+principal solution is to remove duplicate sites using R command
+`unique`. However, after some standardizations or with some
+dissimilarity indices, originally non-unique sites can have zero
+dissimilarity, and you have to resort to the kluge (or work harder with
+your data). Usually it is better to use `monoMDS`.
+
+------------------------------------------------------------------------
+
+### I have heard that you cannot fit environmental vectors or surfaces to NMDS results which only have rank-order scores
+
+Claims like this have indeed been at large in the Internet, but they are
+based on grave misunderstanding and are plainly wrong. NMDS ordination
+results are strictly metric, and in **vegan** `metaMDS` and `monoMDS`
+they are even strictly Euclidean. The method is called “non-metric”
+because the Euclidean distances in ordination space have a non-metric
+rank-order relationship to community dissimilarities. You can inspect
+this non-linear step curve using function `stressplot` in **vegan**.
+Because the ordination scores are strictly Euclidean, it is correct to
+use **vegan** functions `envfit` and `ordisurf` with NMDS results.
+
+------------------------------------------------------------------------
+
+### Where can I find numerical scores of ordination axes?
+
+Normally you can use function `scores` to extract ordination scores for
+any ordination method. The `scores` function can also find ordination
+scores for many non-**vegan** functions such as for `prcomp` and
+`princomp` and for some **ade4** functions.
+
+In some cases the ordination result object stores raw scores, and the
+axes are also scaled appropriate when you access them with `scores`. For
+instance, in `cca` and `rda` the ordination object has only so-called
+normalized scores, and they are scaled for ordination plots or for other
+use when they are accessed with `scores`.
+
+------------------------------------------------------------------------
+
+### How the RDA results are scaled?
+
+The scaling or RDA results indeed differ from most other software
+packages. The scaling of RDA is such a complicated issue that it cannot
+be explained in this FAQ, but it is explained in a separate pdf document
+on “Design decision and implementation details in vegan” that you can
+read with **vegan** command `vegandocs("decision")`.
+
+------------------------------------------------------------------------
+
+### cca fails with “data.frame expected” or “"site.env" missing”
+
+This is not a **vegan** error message, but it comes from the `cca`
+function in the **ade4** package. There is an unfortunate name clash,
+and if you have loaded **ade4** after **vegan**, the **ade4** version of
+`cca` will mask the **vegan** version. You can use the **vegan** version
+using command `vegan::cca()`. If you do not need package **ade4**, you
+can detach it with command `detach(package:ade4)`.
+
+------------------------------------------------------------------------
+
+### Ordination fails with “Error in La.svd”
+
+Constrained ordination (`cca`, `rda`, `capscale`) will sometimes fail
+with error message
+`Error in La.svd(x, nu, nv): error code 1 from Lapack routine 'dgesdd'.`
+
+It seems that the basic problem is in the `svd` function of `LAPACK`
+that is used for numerical analysis in R. `LAPACK` is an external
+library that is beyond the control of package developers and R core team
+so that these problems may be unsolvable. It seems that the problems
+with the `LAPACK` code are so common that even the help page of `svd`
+warns about them
+
+Reducing the range of constraints (environmental variables) helps
+sometimes. For instance, multiplying constraints by a constant \< 1.
+This rescaling does not influence the numerical results of constrained
+ordination, but it can complicate further analyses when values of
+constraints are needed, because the same scaling must be applied there.
+We can only hope that this problem is fixed in the future versions of R
+and `LAPACK`.
+
+------------------------------------------------------------------------
+
+### Variance explained by ordination axes.
+
+In general, **vegan** does not directly give any statistics on the
+“variance explained” by ordination axes or by the constrained axes. This
+is a design decision: I think this information is normally useless and
+often misleading. In community ordination, the goal typically is not to
+explain the variance, but to find the “gradients” or main trends in the
+data. The “total variation” often is meaningless, and all proportions of
+meaningless values also are meaningless. Often a better solution
+explains a smaller part of “total variation”. For instance, in
+unstandardized principal components analysis most of the variance is
+generated by a small number of most abundant species, and they are easy
+to “explain” because data really are not very multivariate. If you
+standardize your data, all species are equally important. The first axes
+explains much less of the “total variation”, but now they explain all
+species equally, and results typically are much more useful for the
+whole community. Correspondence analysis uses another measure of
+variation (which is not variance), and again it typically explains a
+“smaller proportion” than principal components but with a better result.
+Detrended correspondence analysis and nonmetric multidimensional scaling
+even do not try to “explain” the variation, but use other criteria. All
+methods are incommensurable, and it is impossible to compare methods
+using “explanation of variation”.
+
+If you still want to get “explanation of variation” (or a deranged
+editor requests that from you), it is possible to get this information
+for some methods:
+
+-   Eigenvector methods: Functions `rda`, `cca` and `capscale` give the
+    variation of conditional (partialled), constrained (canonical) and
+    residual components, but you must calculate the proportions by hand.
+    Function `eigenvals` extracts the eigenvalues, and
+    `summary(eigenvals(ord))` reports the proportions explained in the
+    result object `ord`. Function `RsquareAdj` gives the R-squared and
+    adjusted R-squared (if available) for constrained components.
+    Function `goodness` gives the same statistics for individual species
+    or sites (species are unavailable with `capscale`). In addition,
+    there is a special function `varpart` for unbiased partitioning of
+    variance between up to four separate components in redundancy
+    analysis.
+-   Detrended correspondence analysis (function `decorana`). The total
+    amount of variation is undefined in detrended correspondence
+    analysis, and therefore proportions from total are unknown and
+    undefined. DCA is not a method for decomposition of variation, and
+    therefore these proportions would not make sense either.
+-   Nonmetric multidimensional scaling. NMDS is a method for nonlinear
+    mapping, and the concept of of variation explained does not make
+    sense. However, 1 - stress\^2 transforms nonlinear stress into
+    quantity analogous to squared correlation coefficient. Function
+    `stressplot` displays the nonlinear fit and gives this statistic.
+
+------------------------------------------------------------------------
+
+### Can I have random effects in constrained ordination or in `adonis`?
+
+No. Strictly speaking, this is impossible. However, you can define
+models that respond to similar goals as random effects models, although
+they strictly speaking use only fixed effects.
+
+Constrained ordination functions `cca`, `rda` and `capscale` can have
+`Condition()` terms in their formula. The `Condition()` define partial
+terms that are fitted before other constraints and can be used to remove
+the effects of background variables, and their contribution to
+decomposing inertia (variance) is reported separately. These partial
+terms are often regarded as similar to random effects, but they are
+still fitted in the same way as other terms and strictly speaking they
+are fixed terms.
+
+Function `adonis` evaluates terms sequentially. In a model with
+right-hand-side `~ A + B` the effects of `A` are evaluated first, and
+the effects of `B` after removing the effects of `A`. Sequential tests
+are also available in `anova` function for constrained ordination
+results by setting argument `by = "term"`. In this way, the first terms
+can serve in a similar role as random effects, although they are fitted
+in the same way as all other terms, and strictly speaking they are fixed
+terms.
+
+All permutation tests in **vegan** are based on the **permute** package
+that allows constructing various restricted permutation schemes. For
+instance, you can set levels of `plots` or `blocks` for a factor
+regarded as a random term.
+
+A major reason why real random effects models are impossible in most
+**vegan** functions is that their tests are based on the permutation of
+the data. The data are given, that is fixed, and therefore permutation
+tests are basically tests of fixed terms on fixed data. Random effect
+terms would require permutations of data with a random component instead
+of the given, fixed data, and such tests are not available in **vegan**.
+
+------------------------------------------------------------------------
+
+### Is it possible to have passive points in ordination?
+
+**Vegan** does not have a concept of passive points, or a point that
+should only little influence the ordination results. However, you can
+add points to eigenvector methods using `predict` functions with
+`newdata`. You can first perform an ordination without some species or
+sites, and then you can find scores for all points using your complete
+data as `newdata`. The `predict` functions are available for basic
+eigenvector methods in **vegan** (`cca`, `rda`, `decorana`, for an
+up-to-date list, use command `methods("predict")`). You also can
+simulate the passive points in R by using low weights to row and columns
+(this is the method used in software with passive points). For instance,
+the following command makes row 3 “passive”:
+`dune[3,] <- 0.001*dune[3,]`.
+
+------------------------------------------------------------------------
+
+### Class variables and dummies
+
+You should define a class variable as an R `factor`, and **vegan** will
+automatically handle them with formula interface. You also can define
+constrained ordination without formula interface, but then you must code
+your class variables by hand.
+
+R (and **vegan**) knows both unordered and ordered factors. Unordered
+factors are internally coded as dummy variables, but one redundant level
+is removed or aliased. With default contrasts, the removed level is the
+first one. Ordered factors are expressed as polynomial contrasts. Both
+of these contrasts explained in standard R documentation.
+
+------------------------------------------------------------------------
+
+### How are environmental arrows scaled?
+
+The printed output of `envfit` gives the direction cosines which are the
+coordinates of unit length arrows. For plotting, these are scaled by
+their correlation (square roots of column `r2`). You can see the scaled
+lengths of `envfit` arrows using command `scores`.
+
+The scaled environmental vectors from `envfit` and the arrows for
+continuous environmental variables in constrained ordination (`cca`,
+`rda`, `capscale`) are adjusted to fill the current graph. The lengths
+of arrows do not have fixed meaning with respect to the points (species,
+sites), but they can only compared against each other, and therefore
+only their relative lengths are important.
+
+If you want change the scaling of the arrows, you can use `text`
+(plotting arrows and text) or `points` (plotting only arrows) functions
+for constrained ordination. These functions have argument `arrow.mul`
+which sets the multiplier. The `plot` function for `envfit` also has the
+`arrow.mul` argument to set the arrow multiplier. If you save the
+invisible result of the constrained ordination `plot` command, you can
+see the value of the currently used `arrow.mul` which is saved as an
+attribute of `biplot` scores.
+
+Function `ordiArrowMul` is used to find the scaling for the current
+plot. You can use this function to see how arrows would be scaled:
+
+
+```{r eval=FALSE}
+sol <- cca(varespec)
+ef <- envfit(sol ~ ., varechem)
+plot(sol)
+ordiArrowMul(scores(ef, display="vectors"))
+```
+
+------------------------------------------------------------------------
+
+### I want to use Helmert or sum contrasts
+
+`vegan` uses standard R utilities for defining contrasts. The default in
+standard installations is to use treatment contrasts, but you can change
+the behaviour globally setting `options` or locally by using keyword
+`contrasts`. Please check the R help pages and user manuals for details.
+
+------------------------------------------------------------------------
+
+### What are aliased variables and how to see them?
+
+Aliased variable has no information because it can be expressed with the
+help of other variables. Such variables are automatically removed in
+constrained ordination in **vegan**. The aliased variables can be
+redundant levels of factors or whole variables.
+
+**Vegan** function `alias` gives the defining equations for aliased
+variables. If you only want to see the names of aliased variables or
+levels in solution `sol`, use `alias(sol, names.only=TRUE)`.
+
+------------------------------------------------------------------------
+
+### Plotting aliased variables
+
+You can fit vectors or class centroids for aliased variables using
+`envfit` function. The `envfit` function uses weighted fitting, and the
+fitted vectors are identical to the vectors in correspondence analysis.
+
+------------------------------------------------------------------------
+
+### Restricted permutations in **vegan**
+
+**Vegan** uses **permute** package in all its permutation tests. The
+**permute** package will allow restricted permutation designs for time
+series, line transects, spatial grids and blocking factors. The
+construction of restricted permutation schemes is explained in the
+manual page `permutations` in **vegan** and in the documentation of the
+**permute** package.
+
+------------------------------------------------------------------------
+
+### How to use different plotting symbols in ordination graphics?
+
+The default ordination `plot` function is intended for fast plotting and
+it is not very configurable. To use different plotting symbols, you
+should first create and empty ordination plot with
+`plot(..., type="n")`, and then add `points` or `text` to the created
+empty frame (here `...` means other arguments you want to give to your
+`plot` command). The `points` and `text` commands are fully
+configurable, and allow different plotting symbols and characters.
+
+------------------------------------------------------------------------
+
+### How to avoid cluttered ordination graphs?
+
+If there is a really high number of species or sites, the graphs often
+are congested and many labels are overwritten. It may be impossible to
+have complete readable graphics with some data sets. Below we give a
+brief overview of tricks you can use. Gavin Simpson’s blog [From the
+bottom of the heap](http://www.fromthebottomoftheheap.net) has a series
+of articles on “decluttering ordination plots” with more detailed
+discussion and examples.
+
+-   Use only points, possibly with different types if you do not need to
+    see the labels. You may need to first create an empty plot using
+    `plot(..., type="n")`, if you are not satisfied with the default
+    graph. (Here and below `...` means other arguments you want to give
+    to your `plot` command.)
+-   Use points and add labels to desired points using interactive
+    `identify` command if you do not need to see all labels.
+-   Add labels using function `ordilabel` which uses non-transparent
+    background to the text. The labels still shadow each other, but the
+    uppermost labels are readable. Argument `priority` will help in
+    displaying the most interesting labels (see [Decluttering blog, part
+    1](http://www.fromthebottomoftheheap.net/2013/01/12/decluttering-ordination-plots-in-vegan-part-1-ordilabel/)).
+-   Use `orditorp` function that uses labels only if these can be added
+    to a graph without overwriting other labels, and points otherwise,
+    if you do not need to see all labels. You must first create an empty
+    plot using `plot(..., type="n")`, and then add labels or points with
+    `orditorp` (see [Decluttering
+    blog](http://www.fromthebottomoftheheap.net/2013/01/13/decluttering-ordination-plots-in-vegan-part-2-orditorp/)).
+-   Use `ordipointlabel` which uses points and text labels to the
+    points, and tries to optimize the location of the text to minimize
+    the overlap (see [Decluttering
+    blog](http://www.fromthebottomoftheheap.net/2013/06/27/decluttering-ordination-plots-in-vegan-part-3-ordipointlabel/)).
+-   Ordination `text` and `points` functions have argument `select` that
+    can be used for full control of selecting items plotted as text or
+    points.
+-   Use interactive `orditkplot` function that lets you drag labels of
+    points to better positions if you need to see all labels. Only one
+    set of points can be used (see [Decluttering
+    blog](http://www.fromthebottomoftheheap.net/2013/12/31/decluttering-ordination-in-vegan-part-4-orditkplot/)).
+-   Most `plot` functions allow you to zoom to a part of the graph using
+    `xlim` and `ylim` arguments to reduce clutter in congested areas.
+
+------------------------------------------------------------------------
+
+### Can I flip an axis in ordination diagram?
+
+Use `xlim` or `ylim` with flipped limits. If you have model
+`mod <- cca(dune)` you can flip the first axis with
+`plot(mod, xlim = c(3, -2))`.
+
+------------------------------------------------------------------------
+
+### Can I zoom into an ordination plot?
+
+You can use `xlim` and `ylim` arguments in `plot` or `ordiplot` to zoom
+into ordination diagrams. Normally you must set both `xlim` and `ylim`
+because ordination plots will keep the equal aspect ratio of axes, and
+they will fill the graph so that the longer axis will fit.
+
+Dynamic zooming can be done with function `orditkplot`. You can directly
+save the edited `orditkplot` graph in various graphic formats, or you
+can export the graph object back to R and use `plot` to display the
+results.
+
+------------------------------------------------------------------------
+
+Other analysis methods
+----------------------
+
+------------------------------------------------------------------------
+
+### Is there TWINSPAN?
+
+No. It may be possible to port TWINSPAN to **vegan**, but it is not
+among the **vegan** top priorities. If anybody wants to try porting, I
+will be happy to help. TWINSPAN has a very permissive license, and it
+would be completely legal to port the function into R.
+
+------------------------------------------------------------------------
+
+### Why restricted permutation does not influence adonis results?
+
+The permutation scheme influences the permutation distribution of the
+statistics and probably the significance levels, but does not influence
+the calculation of the statistics.
+
+------------------------------------------------------------------------
+
+### How is deviance calculated?
+
+Some **vegan** functions, such as `radfit` use base R facility of
+`family` in maximum likelihood estimation. This allows use of several
+alternative error distributions, among them `"poisson"` and
+`"gaussian"`. The R `family` also defines the deviance. You can see the
+equations for deviance with commands like `poisson()$dev` or
+`gaussian()$dev`.
+
+In general, deviance is 2 times log.likelihood shifted so that models
+with exact fit have zero deviance.
+
+------------------------------------------------------------------------
diff --git a/vignettes/FAQ-vegan.pdf b/vignettes/FAQ-vegan.pdf
deleted file mode 100644
index c4044c7..0000000
Binary files a/vignettes/FAQ-vegan.pdf and /dev/null differ
diff --git a/vignettes/FAQ-vegan.texi b/vignettes/FAQ-vegan.texi
deleted file mode 100644
index 1c962c9..0000000
--- a/vignettes/FAQ-vegan.texi
+++ /dev/null
@@ -1,829 +0,0 @@
-\input texinfo
-
- at macro pkg {p}
- at strong{\p\}
- at end macro
-
- at c %**start of header
- at setfilename FAQ- at pkg{vegan}.info
- at settitle @pkg{vegan} FAQ
- at setchapternewpage on
- at set FAQ_YEAR 2015
- at afourpaper
- at c %**end of header
-
- at copying
- at ifnottex
-This document contains answers to some of the most frequently asked
-questions about R package @pkg{vegan}. 
- at end ifnottex
-
- at quotation
-This work is licensed under the Creative Commons Attribution 3.0
-License. To view a copy of this license, visit
- at uref{http://creativecommons.org/licenses/by/3.0/} or send a letter to
-Creative Commons, 543 Howard Street, 5th Floor, San Francisco,
-California, 94105, USA.
-
-Copyright @copyright{} 2008-2015 vegan development team
- at end quotation
- at end copying
-
- at dircategory Programming
- at direntry
-* R @pkg{vegan} FAQ: (FAQ- at pkg{vegan}).             FAQ for R package @pkg{vegan}.
- at end direntry
-
- at finalout
-
- at titlepage
- at title @pkg{vegan} @acronym{FAQ}
- at subtitle Frequently Asked Questions on R package @pkg{vegan}
- at author Jari Oksanen
-
- at vskip 0pt plus 1fill
- at insertcopying
- at end titlepage
-
- at ifnothtml
- at contents
- at end ifnothtml
-
-
- at ifnottex
- at node Top, Introduction, (dir), (dir)
- at top @pkg{vegan} FAQ
- at insertcopying
- at end ifnottex
-
-
-
-
- at menu
-* Introduction::
-* Ordination::
-* Other analysis methods ::
- at end menu
-
- at node Introduction, Ordination, Top, Top
- at chapter Introduction
-
- at menu
-* What is @pkg{vegan}?::
-* What is R?::
-* How to obtain @pkg{vegan} and R?::
-* What R packages @pkg{vegan} depends on?::
-* What other packages are available for ecologists?::
-* What other documentation is available for @pkg{vegan}?::
-* Is there a Graphical User Interface (GUI) for @pkg{vegan}?::
-* How to cite @pkg{vegan}?::
-* How to build @pkg{vegan} from sources?::
-* Are there binaries for devel versions?::
-* Can I use @pkg{vegan} in Mac?::
-* How to report a bug in @pkg{vegan}?::
-* Is it a bug or a feature?::
-* Can I contribute to @pkg{vegan}?::
- at end menu
-
- at node What is @pkg{vegan}?, What is R?, Introduction, Introduction
- at section What is @pkg{vegan}?
-
- at pkg{Vegan} is an R package for community ecologists. It contains the most
-popular methods of multivariate analysis needed in analysing ecological
-communities, and tools for diversity analysis, and other potentially
-useful functions.  @pkg{Vegan} is not self-contained but it must be run under
-R statistical environment, and it also depends on many other R
-packages. @pkg{Vegan} is @uref{http://www.gnu.org/philosophy/free-sw.html, free
-software} and distributed under
- at uref{http://www.gnu.org/licenses/gpl.html, ,GPL2 license}.
-
- at node What is R?, How to obtain @pkg{vegan} and R?, What is @pkg{vegan}?, Introduction
- at section What is R?
-
-R is a system for statistical computation and graphics.  It consists of
-a language plus a run-time environment with graphics, a debugger, access
-to certain system functions, and the ability to run programs stored in
-script files.
-
-R has a home page at @uref{http://www.R-project.org/}.  It is
- at uref{http://www.gnu.org/philosophy/free-sw.html, free software}
-distributed under a @acronym{GNU}-style
- at uref{http://www.gnu.org/copyleft/copyleft.html, copyleft}, and an
-official part of the @uref{http://www.gnu.org/, @acronym{GNU}} project
-(``@acronym{GNU} S'').
-
- at node How to obtain @pkg{vegan} and R?, What R packages @pkg{vegan} depends on?, What is R?, Introduction
- at section How to obtain @pkg{vegan} and R?
-
-Both R and latest release version of @pkg{vegan} can be obtained through
- at uref{http://cran.r-project.org,,CRAN}. Unstable development version of
- at pkg{vegan} can be obtained through
- at uref{https://github.com/vegandevs/vegan,,GitHub}. Formerly @pkg{vegan}
-was developed in 
- at uref{http://r-forge.r-project.org/projects/vegan/,,R-Forge},
-but after moving to @uref{https://github.com/vegandevs/vegan,,GitHub}
-the R-Forge repository may be out of date.
-
- at node What R packages @pkg{vegan} depends on?, What other packages are available for ecologists?, How to obtain @pkg{vegan} and R?, Introduction
- at section What R packages @pkg{vegan} depends on?
-
- at pkg{Vegan} depends on the @pkg{permute} package which will provide
-advanced and flexible permutation routines for @pkg{vegan}. The
- at pkg{permute} package is developed together with @pkg{vegan} in
- at uref{https://github.com/gavinsimpson/permute,,GitHub}. 
-
-Some individual @pkg{vegan} functions depend on packages @pkg{MASS},
- at pkg{mgcv}, @pkg{cluster}, @pkg{lattice} and @pkg{tcltk}.  These all are
-base or recommended R packages that should be available in every R
-installation. @pkg{Vegan} declares these as suggested or imported
-packages, and you can install @pkg{vegan} and use most of its functions
-without these packages.
-
- at pkg{Vegan} is accompanied with a supporting package @pkg{vegan3d} for
-three-dimensional and dynamic plotting. The @pkg{vegan3d} package needs
-non-standard packages @pkg{rgl} and @pkg{scatterplot3d}.
-
- at node What other packages are available for ecologists?, What other documentation is available for @pkg{vegan}?, What R packages @pkg{vegan} depends on?, Introduction
- at section What other packages are available for ecologists?
-
- at acronym{CRAN} @uref{http://cran.r-project.org/src/contrib/Views/,,Task
-Views} include entries like @code{Environmetrics}, @code{Multivariate}
-and @code{Spatial} that describe several useful packages and functions.
-If you install R package @pkg{ctv}, you can inspect Task Views from your
-R session, and automatically install sets of most important packages.
-
- at node What other documentation is available for @pkg{vegan}?, Is there a Graphical User Interface (GUI) for @pkg{vegan}?, What other packages are available for ecologists?, Introduction
- at section What other documentation is available for @pkg{vegan}?
-
- at pkg{Vegan} is a fully documented R package with standard help pages.  These
-are the most authoritative sources of documentation (and as a last
-resource you can use the force and the read the source, as @pkg{vegan} is open
-source).  @pkg{Vegan} package ships with other documents which can be read
-with @code{vegandocs} command (documented in the @pkg{vegan} help).  The
-documents included in the @pkg{vegan} package are
- at itemize
- at item
- at pkg{Vegan} @code{NEWS}
- at item 
- at pkg{Vegan} @code{ChangeLog}.
- at item
-This document (@code{FAQ-vegan.pdf}).
- at item
-Short introduction to basic ordination methods in @pkg{vegan}
-(@code{intro-vegan.pdf}).
- at item
-Introduction to diversity methods in @pkg{vegan} (@code{diversity-vegan.pdf}).
- at item 
-Discussion on design decisions in @pkg{vegan} (@code{decision-vegan.pdf}).
- at item
-Description of variance partition procedures in function
- at code{varpart} (@code{partitioning.pdf}).
- at end itemize
-
-
-Web documents outside the package include:
- at itemize
-
- at item
- at uref{https://github.com/vegandevs/vegan}: @pkg{vegan} homepage.
- at item
- at uref{http://cc.oulu.fi/~jarioksa/opetus/metodi/vegantutor.pdf}: @pkg{vegan}
-tutorial.
-
- at end itemize
-
- at node Is there a Graphical User Interface (GUI) for @pkg{vegan}?, How to cite @pkg{vegan}?, What other documentation is available for @pkg{vegan}?, Introduction
- at section Is there a Graphical User Interface (GUI) for @pkg{vegan}?
-
-Roeland Kindt has made package @pkg{BiodiversityR} which provides a
-GUI for @pkg{vegan}. The package is available at 
- at uref{http://cran.r-project.org/src/contrib/Descriptions/BiodiversityR.html,,CRAN}.
-It is not a mere GUI for @pkg{vegan}, but adds some new functions and
-complements @pkg{vegan} functions in order to provide a 
-workbench for biodiversity analysis. You can install @pkg{BiodiversityR} using
- at code{install.packages("BiodiversityR")} or graphical package
-management menu in R. The GUI works on Windows, MacOS X and Linux.
-
- at node How to cite @pkg{vegan}?, How to build @pkg{vegan} from sources?, Is there a Graphical User Interface (GUI) for @pkg{vegan}?, Introduction
- at section How to cite @pkg{vegan}? 
-
-Use command @code{citation("vegan")} in R to see the recommended
-citation to be used in publications. 
-
- at node How to build @pkg{vegan} from sources?, Are there binaries for devel versions?, How to cite @pkg{vegan}?, Introduction
- at section How to build @pkg{vegan} from sources?
-
-In general, you do not need to build @pkg{vegan} from sources, but binary
-builds of release versions are available through
- at uref{http://cran.r-project.org/,,CRAN} for Windows and MacOS X.  If you
-use some other operating systems, you may have to use source packages.
- at pkg{Vegan} is a standard R package, and can be built like instructed in R
-documentation.  @pkg{Vegan} contains source files in C and @acronym{FORTRAN},
-and you need appropriate compilers (which may need more work in Windows
-and MacOS X).
-
- at node Are there binaries for devel versions?, Can I use @pkg{vegan} in Mac?, How to build @pkg{vegan} from sources?, Introduction
- at section Are there binaries for devel versions?
-
- at uref{http://r-forge.r-project.org/projects/vegan/,,R-Forge} runs daily
-tests on the devel package, and if passed, it builds source package
-together with Windows binaries. However, the R-Forge may be out of date,
-because @pkg{vegan} is mainly developed in
- at uref{https://github.com/vegandevs/vegan,,GitHub}. You can install R-Forge
-packages within R with command 
- at code{install.packages("vegan", repos="http://r-forge.r-project.org/")}.
-If you use GUI menu entry, you must select or define the R-Forge
-repository. 
-
- at node Can I use @pkg{vegan} in Mac?, How to report a bug in @pkg{vegan}?, Are there binaries for devel versions?, Introduction
- at section Can I use @pkg{vegan} in Mac?
-
-Yes, you can, and @pkg{vegan} binaries are available for Mac through
- at uref{http://cran.r-project.org,,CRAN}. However, in some cases you may
-need to install extra tools packages available in
- at uref{http://cran.r-project.org/bin/macosx/tools/,,MacOS tools} pages:
-If you use function such as @code{orditkplot} that need @code{Tcl/Tk}
-you may need to install @code{tcltk} package. No Mac binaries of
-development versions are available in any repository we know. 
-
- at node How to report a bug in @pkg{vegan}?, Is it a bug or a feature?, Can I use @pkg{vegan} in Mac?, Introduction
- at section How to report a bug in @pkg{vegan}?
-
-If you think you have found a bug in @pkg{vegan}, you should report it to
- at pkg{vegan} maintainers or developers.  The preferred forum to report
-bugs is @uref{https://github.com/vegandevs/vegan/issues,,GitHub}. The
-bug report should be so detailed 
-that the bug can be replicated and corrected.  Preferably, you should
-send an example that causes a bug.  If it needs a data set that is not
-available in R, you should send a minimal data set as well. You also
-should paste the output or error message in your message.  You also
-should specify which version of @pkg{vegan} you used.
-
-Bug reports are welcome: they are the only way to make @pkg{vegan} non-buggy.
-
-Please note that you shall not send bug reports to R mailing lists,
-since @pkg{vegan} is not a standard R package.
-
- at node Is it a bug or a feature?, Can I contribute to @pkg{vegan}?, How to report a bug in @pkg{vegan}?, Introduction
- at section Is it a bug or a feature?
-
-It is not necessarily a bug if some function gives different
-results than you expect: That may be a deliberate design decision. It
-may be useful to check the documentation of the function to see what
-was the intended behaviour. It may also happen that function has an
-argument to switch the behaviour to match your expectation. For
-instance, function @code{vegdist} always calculates quantitative
-indices (when this is possible). If you expect it to calculate a
-binary index, you should use argument @code{binary = TRUE}.
-
- at node Can I contribute to @pkg{vegan}?,  , Is it a bug or a feature?, Introduction
- at section Can I contribute to @pkg{vegan}?
-
- at pkg{Vegan} is dependent on user contribution.  All feedback is welcome.  If
-you have problems with @pkg{vegan}, it may be as simple as incomplete
-documentation, and we shall do our best to improve the documents.
-
-Feature requests also are welcome, but they are not necessarily
-fulfilled.  A new feature will be added if it is easy to do and it looks
-useful, or if you submit code. 
-
-If you can write code yourself, the best forum to contribute to vegan is
- at uref{https://github.com/vegandevs/vegan,,GitHub}. 
-
- at node Ordination, Other analysis methods , Introduction, Top
- at chapter Ordination
-
- at menu
-* I have only numeric and positive data but @pkg{vegan} still complains::
-* Can I analyse binary or cover class data?::
-* Why dissimilarities in @pkg{vegan} differ from other sources?::
-* Why NMDS stress is sometimes 0.1 and sometimes 10?::
-* I get zero stress but no convergent solutions in @code{metaMDS}::
-* Zero dissimilarities in isoMDS::
-* I have heard that you cannot fit environmental vectors or surfaces to NMDS results which only have rank-order scores::
-* Where can I find numerical scores of ordination axes?::
-* How the RDA results are scaled?::
-* cca fails with ``data.frame expected'' or ``"site.env" missing''::
-* Ordination fails with ``Error in La.svd''::
-* Variance explained by ordination axes::
-* Can I have random effects in constrained ordination or in @code{adonis}?::
-* Is it possible to have passive points in ordination?::
-* Class variables and dummies::
-* How are environmental arrows scaled?::
-* I want to use Helmert or sum contrasts::
-* What are aliased variables and how to see them?::
-* Plotting aliased variables::
-* Restricted permutations in @pkg{vegan}::
-* How to use different plotting symbols in ordination graphics?::
-* How to avoid cluttered ordination graphs?::
-* Can I flip an axis in ordination diagram?::
-* Can I zoom into an ordination plot?::
- at end menu
-
- at node  I have only numeric and positive data but @pkg{vegan} still complains, Can I analyse binary or cover class data?, Ordination, Ordination
- at comment  node-name,  next,  previous,  up
- at section I have only numeric and positive data but @pkg{vegan} still complains
-
-You are wrong! Computers are painfully pedantic, and if they find
-non-numeric or negative data entries, you really have them. Check your
-data. Most common reasons for non-numeric data are that row names were
-read as a non-numeric variable instead of being used as row names (check
-argument @code{row.names} in reading the data), or that the column names
-were interpreted as data (check argument @code{header = TRUE} in reading
-the data). Another common reason is that you had empty cells in your
-input data, and these were interpreted as missing values.
-
- at node Can I analyse binary or cover class data?, Why dissimilarities in @pkg{vegan} differ from other sources?, I have only numeric and positive data but @pkg{vegan} still complains, Ordination
- at section Can I analyse binary or cover class data?
-
-Yes. Most @pkg{vegan} methods can handle binary data or cover abundance data.
-Most statistical tests are based on permutation, and do not make
-distributional assumptions.  There are some methods (mainly in diversity
-analysis) that need count data.  These methods check that input data are
-integers, but they may be fooled by cover class data.
-
- at node Why dissimilarities in @pkg{vegan} differ from other sources?, Why NMDS stress is sometimes 0.1 and sometimes 10?, Can I analyse binary or cover class data?, Ordination
- at section Why dissimilarities in @pkg{vegan} differ from other sources?
-
-Most commonly the reason is that other software use presence--absence
-data whereas @pkg{vegan} used quantitative data.  Usually @pkg{vegan} indices are
-quantitative, but you can use argument @code{binary = TRUE} to make them
-presence--absence.  However, the index name is the same in both cases,
-although different names usually occur in literature.  For instance,
-Jaccard index actually refers to the binary index, but @pkg{vegan} uses
-name @code{"jaccard"} for the quantitative index, too.
-
-Another reason may be that indices indeed are defined differently,
-because people use same names for different indices.
-
- at node Why NMDS stress is sometimes 0.1 and sometimes 10?, I get zero stress but no convergent solutions in @code{metaMDS}, Why dissimilarities in @pkg{vegan} differ from other sources?, Ordination
- at section Why @acronym{NMDS} stress is sometimes 0.1 and sometimes 10?
-
-Stress is a proportional measure of badness of fit. The proportions can
-be expressed either as parts of one or as percents.  Function
- at code{isoMDS} (@pkg{MASS} package) uses percents, and function @code{monoMDS}
-(@pkg{vegan} package) uses proportions, and therefore the same stress is 100
-times higher in @code{isoMDS}. The results of @code{goodness} function
-also depend on the definition of stress, and the same @code{goodness} is
-100 times higher in @code{isoMDS} than in @code{monoMDS}.  Both of these
-conventions are equally correct.
-
- at node I get zero stress but no convergent solutions in @code{metaMDS}, Zero dissimilarities in isoMDS, Why NMDS stress is sometimes 0.1 and sometimes 10?, Ordination
- at section I get zero stress but no convergent solutions in @code{metaMDS}
-
-Most common reason is that you have too few observations for your
- at acronym{NMDS}. For @code{n} observations (points) and @code{k}
-dimensions you need to estimate @code{n*k} parameters (ordination
-scores) using @code{n*(n-1)/2} dissimilarities.  For @code{k} dimensions
-you must have @code{n > 2*k + 1}, or for two dimensions at least six
-points.  In some degenerate situations you may need even a larger number
-of points.  If you have a lower number of points, you can find an
-undefined number of perfect (stress is zero) but different solutions.
-Conventional wisdom due to Kruskal is that you should have @code{n > 4*k
-+ 1} points for @code{k} dimensions.  A typical symptom of insufficient
-data is that you have (nearly) zero stress but no two convergent
-solutions.  In those cases you should reduce the number of dimensions
-(@code{k}) and with very small data sets you should not use @code{NMDS},
-but rely on metric methods.
-
-It seems that local and hybrid scaling with @code{monoMDS} have similar
-lower limits in practice (although theoretically they could differ).
-However, higher number of dimensions can be used in metric scaling, both
-with @code{monoMDS} and in principal coordinates analysis
-(@code{cmdscale} in @pkg{stats}, @code{wcmdscale} in @pkg{vegan}).
-
- at node Zero dissimilarities in isoMDS, I have heard that you cannot fit environmental vectors or surfaces to NMDS results which only have rank-order scores, I get zero stress but no convergent solutions in @code{metaMDS}, Ordination
- at section Zero dissimilarities in isoMDS
-
-Function @code{metaMDS} uses function @code{monoMDS} as its default
-method for @acronym{NMDS}, and this function can handle zero
-dissimilarities. Alternative function @code{isoMDS} cannot handle zero
-dissimilarities. If you want to use @code{isoMDS}, you can use argument
- at code{zerodist = "add"} in @code{metaMDS} to handle zero
-dissimilarities.  With this argument, zero dissimilarities are replaced
-with a small positive value, and they can be handled in @code{isoMDS}.
-This is a kluge, and some people do not like this. A more principal
-solution is to remove duplicate sites using R command @code{unique}.
-However, after some standardizations or with some dissimilarity indices,
-originally non-unique sites can have zero dissimilarity, and you have to
-resort to the kluge (or work harder with your data). Usually it is
-better to use @code{monoMDS}.
-
- at node I have heard that you cannot fit environmental vectors or surfaces to NMDS results which only have rank-order scores, Where can I find numerical scores of ordination axes?, Zero dissimilarities in isoMDS, Ordination
- at section I have heard that you cannot fit environmental vectors or surfaces to NMDS results which only have rank-order scores
-
-Claims like this have indeed been at large in the Internet, but they are
-based on grave misunderstanding and are plainly wrong. @acronym{NMDS}
-ordination results are strictly metric, and in @pkg{vegan}
- at code{metaMDS} and @code{monoMDS} they are even strictly Euclidean. The
-method is called ``non-metric'' because the Euclidean distances in
-ordination space have a non-metric rank-order relationship to community
-dissimilarities. You can inspect this non-linear step curve using
-function @code{stressplot} in @pkg{vegan}. Because the ordination scores
-are strictly Euclidean, it is correct to use @pkg{vegan} functions
- at code{envfit} and @code{ordisurf} with @acronym{NMDS} results.
-
- at node Where can I find numerical scores of ordination axes?, How the RDA results are scaled?, I have heard that you cannot fit environmental vectors or surfaces to NMDS results which only have rank-order scores, Ordination
- at section Where can I find numerical scores of ordination axes?
-
-Normally you can use function @code{scores} to extract ordination scores
-for any ordination method. The @code{scores} function can also find
-ordination scores for many non- at pkg{vegan} functions such as for
- at code{prcomp} and @code{princomp} and for some @pkg{ade4} functions.
-
-In some cases the ordination result object stores raw scores, and
-the axes are also scaled appropriate when you access them with
- at code{scores}.  For instance, in @code{cca} and @code{rda} the
-ordination object has only so-called normalized scores, and they are
-scaled for ordination plots or for other use when they are accessed with
- at code{scores}. 
-
- at node How the RDA results are scaled?, cca fails with ``data.frame expected'' or ``"site.env" missing'', Where can I find numerical scores of ordination axes?, Ordination
- at section How the @acronym{RDA} results are scaled?
-
-The scaling or @acronym{RDA} results indeed differ from most other
-software packages. The scaling of @acronym{RDA} is such a complicated
-issue that it cannot be explained in this @acronym{FAQ}, but it is
-explained in a separate @acronym{pdf} document on ``Design decision and
-implementation details in vegan'' that you can read with @pkg{vegan}
-command @code{vegandocs("decision")}.
-
- at node cca fails with ``data.frame expected'' or ``"site.env" missing'', Ordination fails with ``Error in La.svd'', How the RDA results are scaled?, Ordination
- at section cca fails with ``data.frame expected'' or ``"site.env" missing''
-
-This is not a @pkg{vegan} error message, but it comes from the
- at code{cca} function in the @pkg{ade4} package. There is an unfortunate
-name clash, and if you have loaded @pkg{ade4} after @pkg{vegan}, the
- at pkg{ade4} version of @code{cca} will mask the @pkg{vegan} version. You
-can use the @pkg{vegan} version using command @code{vegan::cca()}. If
-you do not need package @pkg{ade4}, you can detach it with command
- at code{detach(package:ade4)}.
-
- at node Ordination fails with ``Error in La.svd'', Variance explained by ordination axes, cca fails with ``data.frame expected'' or ``"site.env" missing'', Ordination
- at section Ordination fails with ``Error in La.svd''
-
-Constrained ordination (@code{cca}, @code{rda}, @code{capscale}) will
-sometimes fail with error message 
- at code{Error in La.svd(x, nu, nv): error code 1 from Lapack routine 'dgesdd'.}  
-
-It seems that the basic problem is in the @code{svd} function of
- at code{LAPACK} that is used for numerical analysis in R.  @code{LAPACK}
-is an external library that is beyond the control of package developers
-and R core team so that these problems may be unsolvable. It seems that
-the problems with the @code{LAPACK} code are so common that even the
-help page of @code{svd} warns about them
-
-Reducing the range of constraints (environmental variables) helps
-sometimes. For instance, multiplying constraints by a constant < 1. This
-rescaling does not influence the numerical results of constrained
-ordination, but it can complicate further analyses when values of
-constraints are needed, because the same scaling must be applied
-there. We can only hope that this problem is fixed in the future
-versions of R and @code{LAPACK}.
-
- at node Variance explained by ordination axes, Can I have random effects in constrained ordination or in @code{adonis}?, Ordination fails with ``Error in La.svd'', Ordination
- at section Variance explained by ordination axes.
-
-In general, @pkg{vegan} does not directly give any statistics on the
-``variance explained'' by ordination axes or by the constrained axes.
-This is a design decision: I think this information is normally useless
-and often misleading.  In community ordination, the goal typically is
-not to explain the variance, but to find the ``gradients'' or main
-trends in the data.  The ``total variation'' often is meaningless, and
-all proportions of meaningless values also are meaningless.  Often a
-better solution explains a smaller part of ``total variation''.  For
-instance, in unstandardized principal components analysis most of the
-variance is generated by a small number of most abundant species, and
-they are easy to ``explain'' because data really are not very
-multivariate.  If you standardize your data, all species are equally
-important.  The first axes explains much less of the ``total
-variation'', but now they explain all species equally, and results
-typically are much more useful for the whole community.  Correspondence
-analysis uses another measure of variation (which is not variance), and
-again it typically explains a ``smaller proportion'' than principal
-components but with a better result.  Detrended correspondence analysis
-and nonmetric multidimensional scaling even do not try to ``explain''
-the variation, but use other criteria.  All methods are incommensurable,
-and it is impossible to compare methods using ``explanation of
-variation''.
-
-If you still want to get ``explanation of variation'' (or a deranged
-editor requests that from you), it is possible to get this information
-for some methods:
- at itemize
- at item Eigenvector methods:
-Functions @code{rda}, @code{cca} and @code{capscale} give the variation
-of conditional (partialled), constrained (canonical) and residual
-components, but you must calculate the proportions by hand.  Function
- at code{eigenvals} extracts the eigenvalues, and
- at code{summary(eigenvals(ord))} reports the proportions explained in the
-result object @code{ord}.  Function @code{RsquareAdj} gives the
-R-squared and adjusted R-squared (if available) for constrained
-components.  Function @code{goodness} gives the same statistics for
-individual species or sites (species are unavailable with
- at code{capscale}). In addition, there is a special function
- at code{varpart} for unbiased partitioning of variance between up to four
-separate components in redundancy analysis.
-
- at item Detrended correspondence analysis (function @code{decorana}).
-The total amount of variation is undefined in detrended correspondence
-analysis, and therefore proportions from total are unknown and
-undefined.  @acronym{DCA} is not a method for decomposition of
-variation, and therefore these proportions would not make sense either.
-
- at item Nonmetric multidimensional scaling. 
- at acronym{NMDS} is a method for nonlinear mapping, and the concept of
-of variation explained does not make sense.  However, 1 - stress^2
-transforms nonlinear stress into quantity analogous to squared
-correlation coefficient.  Function @code{stressplot} displays the
-nonlinear fit and gives this statistic.
-
- at end itemize
-
- at node Can I have random effects in constrained ordination or in @code{adonis}?, Is it possible to have passive points in ordination?, Variance explained by ordination axes, Ordination
- at section Can I have random effects in constrained ordination or in @code{adonis}?
-
-No. Strictly speaking, this is impossible. However, you can define
-models that respond to similar goals as random effects models, although
-they strictly speaking use only fixed effects.
-
-Constrained ordination functions @code{cca}, @code{rda} and
- at code{capscale} can have @code{Condition()} terms in their formula. The
- at code{Condition()} define partial terms that are fitted before other
-constraints and can be used to remove the effects of background
-variables, and their contribution to decomposing inertia (variance) is
-reported separately.  These partial terms are often regarded as similar
-to random effects, but they are still fitted in the same way as other
-terms and strictly speaking they are fixed terms.
-
-Function @code{adonis} evaluates terms sequentially. In a model with
-right-hand-side @code{~ A + B} the effects of @code{A} are evaluated
-first, and the effects of @code{B} after removing the effects of
- at code{A}. Sequential tests are also available in @code{anova} function
-for constrained ordination results by setting argument @code{by = "term"}.  
-In this way, the first terms can serve in a similar role as
-random effects, although they are fitted in the same way as all other
-terms, and strictly speaking they are fixed terms.
-
-All permutation tests in @pkg{vegan} are based on the @pkg{permute}
-package that allows constructing various restricted permutation
-schemes. For instance, you can set levels of @code{plots} or
- at code{blocks} for a factor regarded as a random term.
-
-A major reason why real random effects models are impossible in most
- at pkg{vegan} functions is that their tests are based on the permutation
-of the data. The data are given, that is fixed, and therefore
-permutation tests are basically tests of fixed terms on fixed data.
-Random effect terms would require permutations of data with a random
-component instead of the given, fixed data, and such tests are not
-available in @pkg{vegan}.
-
- at node Is it possible to have passive points in ordination?, Class variables and dummies, Can I have random effects in constrained ordination or in @code{adonis}?, Ordination
- at section Is it possible to have passive points in ordination?
-
- at pkg{Vegan} does not have a concept of passive points, or a point that should
-only little influence the ordination results. However, you can add
-points to eigenvector methods using @code{predict} functions with
- at code{newdata}.  You can first perform an ordination without some
-species or sites, and then you can find scores for all points using your
-complete data as @code{newdata}.  The @code{predict} functions are
-available for basic eigenvector methods in @pkg{vegan} (@code{cca},
- at code{rda}, @code{decorana}, for an up-to-date list, use command
- at code{methods("predict")}). You also can simulate the passive points in
-R by using low weights to row and columns (this is the method used in
-software with passive points). For instance, the following command makes
-row 3 ``passive'': @code{dune[3,] <- 0.001*dune[3,]}.
-
-
- at node Class variables and dummies, How are environmental arrows scaled?, Is it possible to have passive points in ordination?, Ordination
- at section Class variables and dummies
-
-You should define a class variable as an R @code{factor}, and @pkg{vegan} will
-automatically handle them with formula interface.  You also can define
-constrained ordination without formula interface, but then you must
-code your class variables by hand.
-
-R (and @pkg{vegan}) knows both unordered and ordered factors.  Unordered
-factors are internally coded as dummy variables, but one redundant
-level is removed or aliased.  With default contrasts, the removed
-level is the first one.  Ordered factors are expressed as polynomial
-contrasts. Both of these contrasts explained in standard R
-documentation. 
-
-
- at node How are environmental arrows scaled?, I want to use Helmert or sum contrasts, Class variables and dummies, Ordination
- at section How are environmental arrows scaled?
-
-The printed output of @code{envfit} gives the direction cosines which
-are the coordinates of unit length arrows. For plotting, these are
-scaled by their correlation (square roots of column @code{r2}). You can
-see the scaled lengths of @code{envfit} arrows using command
- at code{scores}.
-
-The scaled environmental vectors from @code{envfit} and the arrows for
-continuous environmental variables in constrained ordination
-(@code{cca}, @code{rda}, @code{capscale}) are adjusted to fill the
-current graph.  The lengths of arrows do not have fixed meaning with
-respect to the points (species, sites), but they can only compared
-against each other, and therefore only their relative lengths are
-important.
-
-If you want change the scaling of the arrows, you can use @code{text}
-(plotting arrows and text) or @code{points} (plotting only arrows)
-functions for constrained ordination. These functions have argument
- at code{arrow.mul} which sets the multiplier.  The @code{plot} function
-for @code{envfit} also has the @code{arrow.mul} argument to set the
-arrow multiplier.  If you save the invisible result of the constrained
-ordination @code{plot} command, you can see the value of the currently
-used @code{arrow.mul} which is saved as an attribute of @code{biplot}
-scores.
-
-Function @code{ordiArrowMul} is used to find the scaling for the
-current plot. You can use this function to see how arrows would be
-scaled:
- at example
-sol <- cca(varespec)
-ef <- envfit(sol ~ ., varechem)
-plot(sol)
-ordiArrowMul(scores(ef, display="vectors"))
- at end example
-
- at node I want to use Helmert or sum contrasts, What are aliased variables and how to see them?, How are environmental arrows scaled?, Ordination
- at section I want to use Helmert or sum contrasts
-
- at code{@pkg{vegan}} uses standard R utilities for defining
-contrasts. The default in standard installations is to use treatment
-contrasts, but you can change the behaviour globally setting
- at code{options} or locally by using keyword @code{contrasts}. Please
-check the R help pages and user manuals for details.
-
- at node What are aliased variables and how to see them?, Plotting aliased variables, I want to use Helmert or sum contrasts, Ordination
- at section What are aliased variables and how to see them?
-
-Aliased variable has no information because it can be expressed with
-the help of other variables.  Such variables are automatically removed
-in constrained ordination in @pkg{vegan}.  The aliased variables can be
-redundant levels of factors or whole variables.
-
- at pkg{Vegan} function @code{alias} gives the defining equations for aliased
-variables.  If you only want to see the names of aliased variables or
-levels in solution @code{sol}, use @code{alias(sol, names.only=TRUE)}.
-
- at node Plotting aliased variables, Restricted permutations in @pkg{vegan}, What are aliased variables and how to see them?, Ordination
- at section Plotting aliased variables
-
-You can fit vectors or class centroids for aliased variables using
- at code{envfit} function.  The @code{envfit} function uses weighted
-fitting, and the fitted vectors are identical to the vectors in
-correspondence analysis.
-
- at node Restricted permutations in @pkg{vegan}, How to use different plotting symbols in ordination graphics?, Plotting aliased variables, Ordination
- at section Restricted permutations in @pkg{vegan}
-
- at pkg{Vegan} uses @pkg{permute} package in all its permutation tests.
-The @pkg{permute} package will allow restricted permutation designs for
-time series, line transects, spatial grids and blocking factors. The
-construction of restricted permutation schemes is explained in the
-manual page @code{permutations} in @pkg{vegan} and in the documentation
-of the @pkg{permute} package.
-
- at node How to use different plotting symbols in ordination graphics?, How to avoid cluttered ordination graphs?, Restricted permutations in @pkg{vegan}, Ordination
- at section How to use different plotting symbols in ordination graphics?
-
-The default ordination @code{plot} function is intended for fast
-plotting and it is not very configurable. To use different plotting
-symbols, you should first create and empty ordination plot with
- at code{plot(..., type="n")}, and then add @code{points} or @code{text} to
-the created empty frame (here @code{...} means other arguments you want
-to give to your @code{plot} command). The @code{points} and @code{text}
-commands are fully configurable, and allow different plotting symbols
-and characters.
-
- at node How to avoid cluttered ordination graphs?, Can I flip an axis in ordination diagram?, How to use different plotting symbols in ordination graphics?, Ordination
- at section How to avoid cluttered ordination graphs?
-
-If there is a really high number of species or sites, the graphs often
-are congested and many labels are overwritten. It may be impossible to
-have complete readable graphics with some data sets. Below we give a
-brief overview of tricks you can use. Gavin Simpson's blog
- at uref{http://www.fromthebottomoftheheap.net,, From the bottom of the
-heap} has a series of articles on ``decluttering ordination plots'' with
-more detailed discussion and examples.
- at itemize
-
- at item 
-Use only points, possibly with different types if you do not need
-to see the labels. You may need to first create an empty plot using
- at code{plot(..., type="n")}, if you are not satisfied with the default
-graph. (Here and below  @code{...} means other arguments you want
-to give to your @code{plot} command.)
-
- at item 
-Use points and add labels to desired points using interactive
- at code{identify} command if you do not need to see all labels.
-
- at item 
-Add labels using function @code{ordilabel} which uses non-transparent
-background to the text. The labels still shadow each other, but the
-uppermost labels are readable. Argument @code{priority} will help in
-displaying the most interesting labels (see
- at uref{http://www.fromthebottomoftheheap.net/2013/01/12/decluttering-ordination-plots-in-vegan-part-1-ordilabel/,,Decluttering
-blog, part 1}).
-
- at item 
-Use @code{orditorp} function that uses labels only if these can be
-added to a graph without overwriting other labels, and points otherwise,
-if you do not need to see all labels. You must first create an empty
-plot using  @code{plot(..., type="n")}, and then add labels or points
-with @code{orditorp} (see
- at uref{http://www.fromthebottomoftheheap.net/2013/01/13/decluttering-ordination-plots-in-vegan-part-2-orditorp/,,Decluttering
-blog}). 
-
- at item 
-Use @code{ordipointlabel} which uses points and text labels to the
-points, and tries to optimize the location of the text to minimize the
-overlap (see
- at uref{http://www.fromthebottomoftheheap.net/2013/06/27/decluttering-ordination-plots-in-vegan-part-3-ordipointlabel/,,
-Decluttering blog}).
-
- at item
-Ordination @code{text} and @code{points} functions have argument
- at code{select} that can be used for full control of selecting items
-plotted as text or points.
-
- at item 
-Use interactive @code{orditkplot} function that lets you drag
-labels of points to better positions if you need to see all labels. Only
-one set of points can be used (see
- at uref{http://www.fromthebottomoftheheap.net/2013/12/31/decluttering-ordination-in-vegan-part-4-orditkplot/,,Decluttering
-blog}).
-
- at item 
-Most @code{plot} functions allow you to zoom to a part of the
-graph using @code{xlim} and @code{ylim} arguments to reduce clutter in
-congested areas.  
-
- at end itemize
-
- at node  Can I flip an axis in ordination diagram?, Can I zoom into an ordination plot?, How to avoid cluttered ordination graphs?, Ordination
- at comment  node-name,  next,  previous,  up 
- at section Can I flip an axis in ordination diagram?
-
-Use @code{xlim} or @code{ylim} with flipped limits. If you have model
- at code{mod <- cca(dune)} you can flip the first axis with @code{plot(mod,
-xlim = c(3, -2))}.
-
- at node  Can I zoom into an ordination plot?,  , Can I flip an axis in ordination diagram?, Ordination
- at comment  node-name,  next,  previous,  up
- at section Can I zoom into an ordination plot?
-You can use @code{xlim} and @code{ylim} arguments in @code{plot} or
- at code{ordiplot} to zoom into ordination diagrams. Normally you must set
-both @code{xlim} and @code{ylim} because ordination plots will keep the
-equal aspect ratio of axes, and they will fill the graph so that the
-longer axis will fit. 
-
-Dynamic zooming can be done with function @code{orditkplot}. You can
-directly save the edited @code{orditkplot} graph in various graphic
-formats, or you can export the graph object back to R and use
- at code{plot} to display the results. 
-
- at node Other analysis methods ,  , Ordination, Top
- at chapter Other analysis methods
-
- at menu
-* Is there TWINSPAN?::
-* Why restricted permutation does not influence adonis results?::
-* How is deviance calculated?::
- at end menu
-
- at node Is there TWINSPAN?, Why restricted permutation does not influence adonis results?, Other analysis methods , Other analysis methods
- at section Is there TWINSPAN?
-
-No.  It may be possible to port @acronym{TWINSPAN} to @pkg{vegan}, but it is
-not among the @pkg{vegan} top priorities.  If anybody wants to try porting, I
-will be happy to help.  @acronym{TWINSPAN} has a very permissive
-license, and it would be completely legal to port the function into R.
-
- at node  Why restricted permutation does not influence adonis results?, How is deviance calculated?, Is there TWINSPAN?, Other analysis methods
- at comment  node-name,  next,  previous,  up
- at section Why restricted permutation does not influence adonis results?
-The permutation scheme influences the permutation distribution of the
-statistics and probably the significance levels, but does not influence
-the calculation of the statistics.
-
-
- at node How is deviance calculated?,  , Why restricted permutation does not influence adonis results?, Other analysis methods
- at section How is deviance calculated?
-
-Some @pkg{vegan} functions, such as @code{radfit} use base R facility of
- at code{family} in maximum likelihood estimation.  This allows use of
-several alternative error distributions, among them @code{"poisson"}
-and @code{"gaussian"}. The R @code{family} also defines the
-deviance.  You can see the equations for deviance with commands like
- at code{poisson()$dev} or @code{gaussian()$dev}.  
-
-In general, deviance is 2 times log.likelihood 
-shifted so that models with exact fit have zero deviance.
-
-
- at bye
diff --git a/vignettes/Makefile b/vignettes/Makefile
deleted file mode 100644
index 290c9cd..0000000
--- a/vignettes/Makefile
+++ /dev/null
@@ -1,15 +0,0 @@
-all: FAQ-vegan.pdf decision-vegan.pdf intro-vegan.pdf diversity-vegan.pdf NEWS.html
-FAQ-vegan.pdf: FAQ-vegan.texi
-	"$(R_HOME)/bin/R" CMD texi2dvi --pdf --clean FAQ-vegan.texi
-decision-vegan.pdf: decision-vegan.tex
-	"$(R_HOME)/bin/R" CMD texi2dvi --pdf --clean decision-vegan.tex
-	-rm -f decision-vegan-0*.* Rplots.*
-intro-vegan.pdf: intro-vegan.tex
-	"$(R_HOME)/bin/R" CMD texi2dvi --pdf --clean intro-vegan.tex
-	-rm -f intro-vegan-0*.* Rplots.*
-diversity-vegan.pdf: diversity-vegan.tex
-	"$(R_HOME)/bin/R" CMD texi2dvi --pdf --clean diversity-vegan.tex
-	-rm -f diversity-vegan-0*.* Rplots.*
-NEWS.html: ../inst/NEWS.Rd
-	"$(R_HOME)/bin/R" CMD Rd2txt -t html ../inst/NEWS.Rd -o NEWS.html
-
diff --git a/vignettes/NEWS.html b/vignettes/NEWS.html
deleted file mode 100644
index e36b4e9..0000000
--- a/vignettes/NEWS.html
+++ /dev/null
@@ -1,1633 +0,0 @@
-<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"><html xmlns="http://www.w3.org/1999/xhtml"><head><title>R: vegan News</title>
-<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
-<link rel="stylesheet" type="text/css" href="R.css" />
-</head><body>
-
-<table width="100%" summary="page for NEWS"><tr><td>NEWS</td><td style="text-align: right;">R Documentation</td></tr></table>
-
-<h2>vegan News</h2>
-
-<h3>Changes in version 2.3-1</h3>
-
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li><p> Permutation tests did not always correctly recognize ties
-with the observed statistic and this could result in too low
-<i>P</i>-values. This would happen in particular when all predictor
-variables were factors (classes). The changes concern functions
-<code>adonis</code>, <code>anosim</code>, <code>anova</code> and <code>permutest</code>
-functions for <code>cca</code>, <code>rda</code> and <code>capscale</code>,
-<code>permutest</code> for <code>betadisper</code>, <code>envfit</code>,
-<code>mantel</code> and <code>mantel.partial</code>, <code>mrpp</code>, <code>mso</code>,
-<code>oecosimu</code>, <code>ordiareatest</code>, <code>protest</code> and
-<code>simper</code>. This also fixes issues
-<a href="https://github.com/vegandevs/vegan/issues/120">#120</a> and
-<a href="https://github.com/vegandevs/vegan/issues/132">#132</a> in
-GitHub.
-</p>
-</li>
-<li><p> Automated model building in constrained ordination
-(<code>cca</code>, <code>rda</code>, <code>capscale</code>) with <code>step</code>,
-<code>ordistep</code> and <code>ordiR2step</code> could fail if there were
-aliased candidate variables, or constraints that were completely
-explained by other variables already in the model. This was a
-regression introduced in <span class="pkg">vegan</span> 2.2-0.
-</p>
-</li>
-<li><p> Constrained ordination methods <code>cca</code>, <code>rda</code> and
-<code>capscale</code> treat character variables as factors in analysis,
-but did not return their centroids for plotting.
-</p>
-</li>
-<li><p> Recovery of original data in <code>metaMDS</code> when computing
-WA scores for species would fail if the expression supplied to
-argument <code>comm</code> was long & got deparsed to multiple
-strings. <code>metaMDSdist</code> now returns the (possibly modified)
-data frame of community data <code>comm</code> as attribute
-<code>"comm"</code> of the returned <code>dist</code> object. <code>metaMDS</code>
-now uses this to compute the WA species scores for the NMDS. In
-addition, the deparsed expression for <code>comm</code> is now robust to
-long expressions.  Reported by Richard Telford.
-</p>
-</li>
-<li> <p><code>metaMDS</code> and <code>monoMDS</code> rejected dissimilarities
-with missing values.
-</p>
-</li>
-<li><p> Function <code>rarecurve</code> did not check its input and this
-could cause confusing error messages. Now function checks that
-input data are integers that can be interpreted as counts on
-individuals and all sampling units have some species. Unchecked
-bad inputs were the reason for problems reported in
-<a href="http://stackoverflow.com/questions/30856909/error-while-using-rarecurve-in-r">Stackoverflow</a>.
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES AND FUNCTIONS</h4>
-
-
-<ul>
-<li><p> Scaling of ordination axes in <code>cca</code>, <code>rda</code> and
-<code>capscale</code> can now be expressed with descriptive strings
-<code>"none"</code>, <code>"sites"</code>, <code>"species"</code> or
-<code>"symmetric"</code> to tell which kind of scores should be scaled by
-eigenvalues. These can be further modified with arguments
-<code>hill</code> in <code>cca</code> and <code>correlation</code> in <code>rda</code>. The
-old numeric scaling can still be used.
-</p>
-</li>
-<li><p> The permutation data can be extracted from <code>anova</code>
-results of constrained ordination (<code>cca</code>, <code>rda</code>,
-<code>capscale</code>) and further analysed with <code>permustats</code>
-function.
-</p>
-</li>
-<li><p> New data set <code>BCI.env</code> of site information for the Barro
-Colorado Island tree community data. Most useful variables are the
-UTM coordinates of sample plots. Other variables are constant or
-nearly constant and of little use in normal analysis.
-</p>
-</li></ul>
-
- 
-
-
-<h3>Changes in version 2.3-0</h3>
-
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li><p> Constrained ordination functions <code>cca</code>, <code>rda</code> and
-<code>capscale</code> are now more robust. Scoping of data set names and
-variable names is much improved. This should fix numerous
-long-standing problems, for instance those reported by Benedicte
-Bachelot (in email) and Richard Telford (in Twitter), as well as
-issues <a href="https://github.com/vegandevs/vegan/issues/16">#16</a>
-and <a href="https://github.com/vegandevs/vegan/issues/100">#100</a> in
-GitHub.
-</p>
-</li>
-<li><p> Ordination functions <code>cca</code> and <code>rda</code> silently
-accepted dissimilarities as input although their analysis makes
-no sense with these methods. Dissimilarities should be analysed
-with distance-based redundancy analysis (<code>capscale</code>).
-</p>
-</li>
-<li><p> The variance of the conditional component was over-estimated
-in <code>goodness</code> of <code>rda</code> results, and results were wrong
-for partial RDA. The problems were reported in an
-<a href="https://stat.ethz.ch/pipermail/r-sig-ecology/2015-March/004936.html">R-sig-ecology</a>
-message by Christoph von Redwitz.
-</p>
-</li></ul>
-
- 
-
-
-<h4>WINDOWS</h4>
-
-
-<ul>
-<li> <p><code>orditkplot</code> did not add file type identifier to saved
-graphics in Windows although that is required. The problem only
-concerned Windows OS.
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES AND FUNCTIONS</h4>
-
-
-<ul>
-<li> <p><code>goodness</code> function for constrained ordination
-(<code>cca</code>, <code>rda</code>, <code>capscale</code>) was redesigned. Function
-gained argument <code>addprevious</code> to add the variation explained
-by previous ordination components to axes when <code>statistic =
-      "explained"</code>. With this option, <code>model = "CCA"</code> will include
-the variation explained by partialled-out conditions, and
-<code>model = "CA"</code> will include the accumulated variation
-explained by conditions and constraints. The former behaviour was
-<code>addprevious = TRUE</code> for <code>model = "CCA"</code>, and
-<code>addprevious = FALSE</code> for <code>model = "CA"</code>. The argument
-will have no effect when <code>statistic = "distance"</code>, but this
-will always show the residual distance after all previous
-components. Formerly it displayed the residual distance only for
-the currently analysed model.
-</p>
-</li>
-<li><p> Functions <code>ordiArrowMul</code> and <code>ordiArrowTextXY</code> are
-exported and can be used in normal interactive sessions. These
-functions are used to scale a bunch arrows to fit ordination
-graphics, and formerly they were internal functions used within
-other <span class="pkg">vegan</span> functions.
-</p>
-</li>
-<li> <p><code>orditkplot</code> can export graphics in SVG format. SVG is
-a vector graphics format which can be edited with several external
-programs, such as Illustrator and Inkscape.
-</p>
-</li>
-<li><p> Rarefaction curve (<code>rarecurve</code>) and species
-accumulation models (<code>specaccum</code>, <code>fitspecaccum</code>)
-gained new functions to estimate the slope of curve at given
-location. Originally this was based on a response to an
-<a href="https://stat.ethz.ch/pipermail/r-sig-ecology/2015-May/005038.html">R-SIG-ecology</a>
-query. For rarefaction curves, the function is <code>rareslope</code>,
-and for species accumulation models it is <code>specslope</code>.
-</p>
-<p>The functions are based on analytic equations, and can also be
-evaluated at interpolated non-integer values. In
-<code>specaccum</code> models the functions can be only evaluated for
-analytic models <code>"exact"</code>, <code>"rarefaction"</code> and
-<code>"coleman"</code>. With <code>"random"</code> and <code>"collector"</code>
-methods you can only use finite differences
-(<code>diff(fitted(<result.object>))</code>). Analytic functions for
-slope are used for all non-linear regression models known to
-<code>fitspecaccum</code>.
-</p>
-</li>
-<li><p> Species accumulation models (<code>specaccum</code>) and
-non-liner regression models for species accumulation
-(<code>fitspecaccum</code>) work more consistently with weights. In
-all cases, the models are defined using the number of sites as
-independent variable, which with weights means that observations
-can be non-integer numbers of virtual sites. The <code>predict</code>
-models also use the number of sites with <code>newdata</code>,
-and for analytic models they can estimate the expected values
-for non-integer number of sites, and for non-analytic randomized
-or collector models they can interpolate on non-integer values.
-</p>
-</li>
-<li> <p><code>fitspecaccum</code> gained support functions <code>AIC</code>
-and <code>deviance</code>.
-</p>
-</li>
-<li><p> The <code>varpart</code> plots of four-component models were
-redesigned following Legendre, Borcard & Roberts <em>Ecology</em>
-93, 1234–1240 (2012), and they use now four ellipses instead of
-three circles and two rectangles. The components are now labelled
-in plots, and the circles and ellipses can be easily filled with
-transparent background colour.
-</p>
-</li></ul>
-
- 
-
-
-<h3>Changes in version 2.2-1</h3>
-
-
-
-<h4>GENERAL</h4>
-
-
-<ul>
-<li><p> This is a maintenance release to avoid warning messages
-caused by changes in CRAN repository. The namespace usage is also
-more stringent to avoid warnings and notes in development versions
-of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
-</p>
-</li></ul>
-
-
-
-
-<h4>INSTALLATION</h4>
-
-
-<ul>
-<li> <p><span class="pkg">vegan</span> can be installed and loaded without <span class="pkg">tcltk</span>
-package. The <span class="pkg">tcltk</span> package is needed in <code>orditkplot</code>
-function for interactive editing of ordination graphics.
-</p>
-</li></ul>
-
- 
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li> <p><code>ordisurf</code> failed if <span class="pkg">gam</span> package was loaded due
-to namespace issues: some support functions of <span class="pkg">gam</span> were used
-instead of <span class="pkg">mgcv</span> functions.
-</p>
-</li>
-<li> <p><code>tolerance</code> function failed for unconstrained
-correspondence analysis.
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES</h4>
-
-
-<ul>
-<li> <p><code>estimateR</code> uses a more exact variance formula for
-bias-corrected Chao estimate of extrapolated number of
-species. The new formula may be unpublished, but it was derived
-following the guidelines of Chiu, Wang, Walther & Chao,
-<em>Biometrics</em> 70, 671–682 (2014),
-<a href="http://onlinelibrary.wiley.com/doi/10.1111/biom.12200/suppinfo">online
-supplementary material</a>.
-</p>
-</li>
-<li><p> Diversity accumulation functions <code>specaccum</code>,
-<code>renyiaccum</code>, <code>tsallisaccum</code>, <code>poolaccum</code> and
-<code>estaccumR</code> use now <span class="pkg">permute</span> package for permutations
-of the order of sampling sites. Normally these functions only
-need simple random permutation of sites, but restricted
-permutation of the <span class="pkg">permute</span> package and user-supplied
-permutation matrices can be used.
-</p>
-</li>
-<li> <p><code>estaccumR</code> function can use parallel processing.
-</p>
-</li>
-<li> <p><code>linestack</code> accepts now expressions as labels. This
-allows using mathematical symbols and formula given as
-mathematical expressions.
-</p>
-</li></ul>
-
- 
-
-
-<h3>Changes in version 2.2-0</h3>
-
-
-
-<h4>GENERAL</h4>
-
-
-<ul>
-<li><p> Several <span class="pkg">vegan</span> functions can now use parallel
-processing for slow and repeating calculations. All these
-functions have argument <code>parallel</code>. The argument can be an
-integer giving the number of parallel processes. In unix-alikes
-(Mac OS, Linux) this will launch <code>"multicore"</code> processing
-and in Windows it will set up <code>"snow"</code> clusters as desribed
-in the documentation of the <span class="pkg">parallel</span> package. If <code>option</code>
-<code>"mc.cores"</code> is set to an integer > 1, this will be used to
-automatically start parallel processing. Finally, the argument
-can also be a previously set up <code>"snow"</code> cluster which will
-be used both in Windows and in unix-alikes. <span class="pkg">Vegan</span> vignette
-on Design decision explains the implementation (use
-<code>vegandocs("decission")</code>, and <span class="pkg">parallel</span> package has more
-extensive documentation on parallel processing in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
-</p>
-<p>The following function use parallel processing in analysing
-permutation statistics: <code>adonis</code>, <code>anosim</code>,
-<code>anova.cca</code> (and <code>permutest.cca</code>), <code>mantel</code> (and
-<code>mantel.partial</code>), <code>mrpp</code>, <code>ordiareatest</code>,
-<code>permutest.betadisper</code> and <code>simper</code>. In addition,
-<code>bioenv</code> can compare several candidate sets of models in
-paralle, <code>metaMDS</code> can launch several random starts in
-parallel, and <code>oecosimu</code> can evaluate test statistics for
-several null models in parallel.
-</p>
-</li>
-<li><p> All permutation tests are based on the <span class="pkg">permute</span> package
-which offers strong tools for restricted permutation. All these
-functions have argument <code>permutations</code>. The default usage of
-simple non-restricted permutations is achieved by giving a single
-integer number. Restricted permutations can be defined using the
-<code>how</code> function of the <span class="pkg">permute</span> package. Finally, the
-argument can be a permutation matrix where rows define
-permutations. It is possible to use external or user constructed
-permutations.
-</p>
-<p>See <code>help(permutations)</code> for a brief introduction on
-permutations in <span class="pkg">vegan</span>, and <span class="pkg">permute</span> package for the
-full documention. The vignette of the <span class="pkg">permute</span> package can
-be read from <span class="pkg">vegan</span> with command
-<code>vegandocs("permutations")</code>.
-</p>
-<p>The following functions use the <span class="pkg">permute</span> package:
-<code>CCorA</code>, <code>adonis</code>, <code>anosim</code>, <code>anova.cca</code> (plus
-associated <code>permutest.cca</code>, <code>add1.cca</code>,
-<code>drop1.cca</code>, <code>ordistep</code>, <code>ordiR2step</code>),
-<code>envfit</code> (plus associated <code>factorfit</code> and
-<code>vectorfit</code>), <code>mantel</code> (and <code>mantel.partial</code>),
-<code>mrpp</code>, <code>mso</code>, <code>ordiareatest</code>,
-<code>permutest.betadisper</code>, <code>protest</code> and <code>simper</code>.
-</p>
-</li>
-<li><p> Community null model generation has been completely
-redesigned and rewritten. The communities are constructed with
-new <code>nullmodel</code> function and defined in a low level
-<code>commsim</code> function. The actual null models are generated
-with a <code>simulate</code> function that builds an array of null
-models. The new null models include a wide array of quantitative
-models in addition to the old binary models, and users can plug
-in their own generating functions. The basic tool invoking and
-analysing null models is <code>oecosimu</code>. The null models are
-often used only for the analysis of nestedness, but the
-implementation in <code>oecosimu</code> allows analysing any
-statistic, and null models are better seen as an alternative to
-permutation tests.
-</p>
-</li></ul>
- 
- 
-
-
-<h4>INSTALLATION</h4>
-
-
-<ul>
-<li> <p><span class="pkg">vegan</span> package dependencies and namespace imports
-were adapted to changes in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>, and no more trigger warnings and
-notes in package tests.
-</p>
-</li>
-<li><p> Three-dimensional ordination graphics using
-<span class="pkg">scatterplot3d</span> for static plots and <span class="pkg">rgl</span> for dynamic
-plots were removed from <span class="pkg">vegan</span> and moved to a companion
-package <span class="pkg">vegan3d</span>. The package is available in CRAN.
-</p>
-</li></ul>
- 
- 
-
-
-<h4>NEW FUNCTIONS</h4>
-
-
-<ul>
-<li><p> Function <code>dispweight</code> implements dispersion weighting
-of Clarke et al. (<em>Marine Ecology Progress Series</em>, 320,
-11–27).  In addition, we implemented a new method for
-generalized dispersion weighting <code>gdispweight</code>. Both
-methods downweight species that are significantly
-over-dispersed.
-</p>
-</li>
-<li><p> New <code>hclust</code> support functions <code>reorder</code>,
-<code>rev</code> and <code>scores</code>. Functions <code>reorder</code> and
-<code>rev</code> are similar as these functions for <code>dendrogram</code>
-objects in base <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>. However, <code>reorder</code> can use (and defaults
-to) weighted mean. In weighted mean the node average is always the
-mean of member leaves, whereas the <code>dendrogram</code> uses always
-unweighted means of joined branches.
-</p>
-</li>
-<li><p> Function <code>ordiareatest</code> supplements <code>ordihull</code> and
-<code>ordiellipse</code> and provides a randomization test for the
-one-sided alternative hypothesis that convex hulls or ellipses in
-two-dimensional ordination space have smaller areas than with
-randomized groups.
-</p>
-</li>
-<li><p> Function <code>permustats</code> extracts and inspects permutation
-results with support functions <code>summary</code>, <code>density</code>,
-<code>densityplot</code>, <code>qqnorm</code> and <code>qqmath</code>. The
-<code>density</code> and <code>qqnorm</code> are standard <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> tools that only
-work with one statistic, and <code>densityplot</code> and <code>qqmath</code>
-are <span class="pkg">lattice</span> graphics that work with univariate and
-multivariate statistics. The results of following functions can be
-extracted: <code>anosim</code>, <code>adonis</code>, <code>mantel</code> (and
-<code>mantel.partial</code>), <code>mrpp</code>, <code>oecosimu</code>,
-<code>permustest.cca</code> (but not the corresponding <code>anova</code>
-methods), <code>permutest.betadisper</code>, and <code>protest</code>.
-</p>
-</li>
-<li> <p><code>stressplot</code> functions display the ordination distances
-at given number of dimensions against original distances.  The
-method functins are similar to <code>stressplot</code> for
-<code>metaMDS</code>, and always use the inherent distances of each
-ordination method. The functions are available for the results
-<code>capscale</code>, <code>cca</code>, <code>princomp</code>, <code>prcomp</code>,
-<code>rda</code>, and <code>wcmdscale</code>.
-</p>
-</li></ul>
- 
- 
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li> <p><code>cascadeKM</code> of only one group will be <code>NA</code> instead
-of a random value. 
-</p>
-</li>
-<li> <p><code>ordiellipse</code> can handle points exactly on a line,
-including only two points (with a warning).
-</p>
-</li>
-<li><p> plotting <code>radfit</code> results for several species failed if
-any of the communities had no species or had only one species.
-</p>
-</li>
-<li> <p><code>RsquareAdj</code> for <code>capscale</code> with negative
-eigenvalues will now report <code>NA</code> instead of using biased
-method of <code>rda</code> results.
-</p>
-</li>
-<li> <p><code>simper</code> failed when a group had only a single member.
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES</h4>
-
-
-<ul>
-<li> <p><code>anova.cca</code> functions were re-written to use the
-<span class="pkg">permute</span> package. Old results may not be exactly
-reproduced, and models with missing data may fail in several
-cases. There is a new option of analysing a sequence of models
-against each other.
-</p>
-</li>
-<li> <p><code>simulate</code> functions for <code>cca</code> and <code>rda</code>
-can return several simulations in a <code>nullmodel</code> compatible
-object. The functions can produce simulations with correlated
-errors (also for <code>capscale</code>) in parametric simulation with
-Gaussian error.
-</p>
-</li>
-<li> <p><code>bioenv</code> can use Manhattan, Gower and Mahalanobis
-distances in addition to the default Euclidean. New helper
-function <code>bioenvdist</code> can extract the dissimilarities
-applied in best model or any other model.
-</p>
-</li>
-<li> <p><code>metaMDS(..., trace = 2)</code> will show convergence
-information with the default <code>monoMDS</code> engine.
-</p>
-</li>
-<li><p> Function <code>MDSrotate</code> can rotate a <i>k</i>-dimensional
-ordination to <i>k-1</i> variables. When these variables are
-correlated (like usually is the case), the vectors can also be
-correlated to previously rotated dimensions, but will be
-uncorrelated to all later ones.
-</p>
-</li>
-<li> <p><span class="pkg">vegan</span> 2.0-10 changed the weighted <code>nestednodf</code>
-so that weighted analysis of binary data was equivalent to
-binary analysis. However, this broke the equivalence to the
-original method. Now the function has an argument <code>wbinary</code>
-to select the method of analysis. The problem was reported and a
-fix submitted by Vanderlei Debastiani (Universidade Federal do
-Rio Grande do Sul, Brasil).
-</p>
-</li>
-<li> <p><code>ordiellipse</code>, <code>ordihull</code> and <code>ordiellipse</code>
-can handle missing values in <code>groups</code>.
-</p>
-</li>
-<li> <p><code>ordispider</code> can now use spatial medians instead of
-means. 
-</p>
-</li>
-<li> <p><code>rankindex</code> can use Manhattan, Gower and Mahalanobis
-distance in addition to the default Euclidean.
-</p>
-</li>
-<li><p> User can set colours and line types in function
-<code>rarecurve</code> for plotting rarefaction curves.
-</p>
-</li>
-<li> <p><code>spantree</code> gained a support function <code>as.hclust</code>
-to change the minimum spanning tree into an <code>hclust</code> tree.
-</p>
-</li>
-<li> <p><code>fitspecaccum</code> can do weighted analysis. Gained
-<code>lines</code> method.
-</p>
-</li>
-<li><p> Functions for extrapolated number of species or for the size
-of species pool using Chao method were modified following Chiu et
-al., <em>Biometrics</em> 70, 671–682 (2014).
-</p>
-<p>Incidence based <code>specpool</code> can now use (and defaults to)
-small sample correction with number of sites as the sample
-size. Function uses basic Chao extrapolation based on the ratio of
-singletons and doubletons, but switches now to bias corrected Chao
-extrapolation if there are no doubletons (species found
-twice). The variance formula for bias corrected Chao was derived
-following the supporting
-<a href="http://onlinelibrary.wiley.com/doi/10.1111/biom.12200/suppinfo">online material</a>
-and differs slightly from Chiu et al. (2014).
-</p>
-<p>The <code>poolaccum</code> function was changed similarly, but the small
-sample correction is used always.
-</p>
-<p>The abundance based <code>estimateR</code> uses bias corrected Chao
-extrapolation, but earlier it estimated its variance with classic
-Chao model. Now we use the widespread
-<a href="http://viceroy.eeb.uconn.edu/EstimateS/EstimateSPages/EstSUsersGuide/EstimateSUsersGuide.htm#AppendixB">approximate
-equation</a> for variance.
-</p>
-<p>With these changes these functions are more similar to
-<a href="http://viceroy.eeb.uconn.edu/EstimateS/EstimateSPages/EstSUsersGuide/EstimateSUsersGuide.htm#AppendixB">EstimateS</a>.
-</p>
-</li>
-<li> <p><code>tabasco</code> uses now <code>reorder.hclust</code> for
-<code>hclust</code> object for better ordering than previously when it
-cast trees to <code>dendrogram</code> objects.
-</p>
-</li>
-<li> <p><code>treedive</code> and <code>treedist</code> default now to
-<code>match.force = TRUE</code> and can be silenced with
-<code>verbose = FALSE</code>.
-</p>
-</li>
-<li> <p><code>vegdist</code> gained Mahalanobis distance.
-</p>
-</li>
-<li><p> Nomenclature updated in plant community data with the help
-of <span class="pkg">Taxonstand</span> and <span class="pkg">taxize</span> packages. The taxonomy of
-the <code>dune</code> data was adapted to the same sources and APG
-III.  <code>varespec</code> and <code>dune</code> use 8-character names (4
-from genus + 4 from species epithet). New data set on
-phylogenetic distances for <code>dune</code> was extracted from Zanne
-et al. (<em>Nature</em> 506, 89–92; 2014).
-</p>
-</li>
-<li><p> User configurable plots for <code>rarecurve</code>.
-</p>
-</li></ul>
- 
- 
-
-
-<h4>DEPRECATED AND DEFUNCT</h4>
-
-
-<ul>
-<li> <p><code>strata</code> are deprecated in permutations. It is still
-accepted but will be phased out in next releases. Use <code>how</code>
-of <span class="pkg">permute</span> package.
-</p>
-</li>
-<li> <p><code>cca</code>, <code>rda</code> and <code>capscale</code> do not return
-scores scaled by eigenvalues: use <code>scores</code> function to
-extract scaled results.
-</p>
-</li>
-<li> <p><code>commsimulator</code> is deprecated. Replace
-<code>commsimulator(x, method)</code> with
-<code>simulate(nullmodel(x, method))</code>.
-</p>
-</li>
-<li> <p><code>density</code> and <code>densityplot</code> for permutation
-results are deprecated: use <code>permustats</code> with its
-<code>density</code> and <code>densityplot</code> method.
-</p>
-</li></ul>
- 
- 
-
-
-<h3>Changes in version 2.0-10</h3>
-
-
-
-<h4>GENERAL</h4>
-
-
-<ul>
-<li><p> This version is adapted to the changes in <span class="pkg">permute</span>
-package version 0.8-0 and no more triggers NOTEs in package
-checks.  This release may be the last of the 2.0 series, and the
-next <span class="pkg">vegan</span> release is scheduled to be a major release with
-newly designed <code>oecosimu</code> and community pattern simulation,
-support for parallel processing, and full support of the
-<span class="pkg">permute</span> package. If you are interested in these
-developments, you may try the development versions of
-<span class="pkg">vegan</span> in
-<a href="http://r-forge.r-project.org/projects/vegan/">R-Forge</a> or
-<a href="https://github.com/jarioksa/vegan">GitHub</a> and report the
-problems and user experience to us.  </p>
-</li></ul>
-   
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li> <p><code>envfit</code> function assumed that all external variables
-were either numeric or factors, and failed if they were, say,
-character strings. Now only numeric variables are taken as
-continuous vectors, and all other variables (character strings,
-logical) are coerced to factors if possible. The function also
-should work with degenerate data, like only one level of a
-factor or a constant value of a continuous environmental
-variable. The ties were wrongly in assessing permutation
-<i>P</i>-values in <code>vectorfit</code>.
-</p>
-</li>
-<li> <p><code>nestednodf</code> with quantitative data was not
-consistent with binary models, and the fill was wrongly
-calculated with quantitative data.
-</p>
-</li>
-<li> <p><code>oecosimu</code> now correctly adapts displayed quantiles
-of simulated values to the <code>alternative</code> test direction.
-</p>
-</li>
-<li> <p><code>renyiaccum</code> plotting failed if only one level of
-diversity <code>scale</code> was used.
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES</h4>
-
- 
- 
-<ul>
-<li><p> The Kempton and Taylor algorithm was found unreliable in
-<code>fisherfit</code> and <code>fisher.alpha</code>, and now the estimation
-of Fisher <i>alpha</i> is only based on the number of
-species and the number of individuals.  The estimation of
-standard errors and profile confidence intervals also had to be
-scrapped.
-</p>
-</li>
-<li> <p><code>renyiaccum</code>, <code>specaccum</code> and
-<code>tsallisaccum</code> functions gained <code>subset</code> argument.
-</p>
-</li>
-<li> <p><code>renyiaccum</code> can now add a <code>collector</code> curve to
-to the analysis. The collector curve is the diversity
-accumulation in the order of the sampling units. With an
-interesting ordering or sampling units this allows comparing
-actual species accumulations with the expected randomized
-accumulation.
-</p>
-</li>
-<li> <p><code>specaccum</code> can now perform weighted accumulation
-using the sampling effort as weights.
-</p>
-</li></ul>
-
- 
-
-
-<h3>Changes in version 2.0-9</h3>
-
-
-<ul>
-<li><p> This version is released due to changes in programming
-interface and testing procedures in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 3.0.2. If you are using an
-older version of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>, there is no need to upgrade <span class="pkg">vegan</span>. There
-are no new features nor bug fixes. The only user-visible changes
-are in documentation and in output messages and formatting. Because
-of <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> changes, this version is dependent on <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> version 2.14.0
-or newer and on <span class="pkg">lattice</span> package.
-</p>
-</li></ul>
-
-
-
-<h3>Changes in version 2.0-8</h3>
-
-
-
-<h4>GENERAL</h4>
-
-
-<ul>
-<li><p> This is a maintenance release that fixes some issues
-raised by changed in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> toolset for processing vignettes.  In
-the same we also fix some typographic issues in the vignettes.
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES</h4>
-
-
-<ul>
-<li> <p><code>ordisurf</code> gained new arguments for more flexible
-definition of fitted models to better utilize the
-<span class="pkg">mgcv</span><code>::gam</code> function. 
-</p>
-<p>The linewidth of contours can
-now be set with the argument <code>lwd</code>.
-</p>
-</li>
-<li><p> Labels to arrows are positioned in a better way in
-<code>plot</code> functions for the results of <code>envfit</code>,
-<code>cca</code>, <code>rda</code> and <code>capscale</code>. The labels should no
-longer overlap the arrow tips.
-</p>
-</li>
-<li><p> The setting test direction is clearer in <code>oecosimu</code>.
-</p>
-</li>
-<li> <p><code>ordipointlabel</code> gained a <code>plot</code> method that can
-be used to replot the saved result.
-</p>
-</li></ul>
-
- 
-
-
-<h3>Changes in version 2.0-7</h3>
-
-
-
-<h4>NEW FUNCTIONS</h4>
-
-
-<ul>
-<li> <p><code>tabasco()</code> is a new function for graphical display
-of community data matrix.  Technically it is an interface to <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>
-<code>heatmap</code>, but its use is closer to <span class="pkg">vegan</span> function
-<code>vegemite</code>. The function can reorder the community data
-matrix similarly as <code>vegemite</code>, for instance, by ordination
-results. Unlike <code>heatmap</code>, it only displays dendrograms if
-supplied by the user, and it defaults to re-order the
-dendrograms by correspondence analysis.  Species are ordered to
-match site ordering or like determined by the user.
-</p>
-</li></ul>
-
- 
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li><p> Function <code>fitspecaccum(..., model = "asymp")</code> fitted
-logistic model instead of asymptotic model (or the same as 
-<code>model = "logis"</code>).
-</p>
-</li>
-<li> <p><code>nestedtemp()</code> failed with very sparse data (fill
-<i>< 0.38</i>%).
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES</h4>
-
-
-<ul>
-<li><p> The <code>plot</code> function for constrained ordination
-results (<code>cca</code>, <code>rda</code>, <code>capscale</code>) gained
-argument <code>axis.bp</code> (defaults <code>TRUE</code>) which can be used
-to suppress axis scale for biplot arrays.
-</p>
-</li>
-<li><p> Number of iterations in nonmetric multidimensional scaling
-(NMDS) can be set with keyword <code>maxit</code> (defaults
-<code>200</code>) in <code>metaMDS</code>.
-</p>
-</li></ul>
-
- 
-
-
-<h4>DEPRECATED</h4>
-
-
-<ul>
-<li><p> The result objects of <code>cca</code>, <code>rda</code> and
-<code>capscale</code> will no longer have scores <code>u.eig</code>,
-<code>v.eig</code> and <code>wa.eig</code> in the future versions of
-<span class="pkg">vegan</span>. This change does not influence normal usage,
-because <span class="pkg">vegan</span> functions do not need these items.  However,
-external scripts and packages may need changes in the future
-versions of <span class="pkg">vegan</span>.
-</p>
-</li></ul>
-   
- 
-
-
-<h3>Changes in version 2.0-6</h3>
-
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li><p> The species scores were scaled wrongly in
-<code>capscale()</code>. They were scaled correctly only when Euclidean
-distances were used, but usually <code>capscale()</code> is used with
-non-Euclidean distances.  Most graphics will change and should be
-redone.  The change of scaling mainly influences the spread of
-species scores with respect to the site scores.
-</p>
-</li>
-<li><p> Function <code>clamtest()</code> failed to set the minimum
-abundance threshold in some cases. In addition, the output was
-wrong when some of the possible species groups were missing. Both
-problems were reported by Richard Telford (Bergen, Norway).
-</p>
-</li>
-<li><p> Plotting an object fitted by <code>envfit()</code> would fail if
-<code>p.max</code> was used and there were unused levels for one or
-more factors. The unused levels could result from deletion of
-observations with missing values or simply as the result of
-supplying a subset of a larger data set to <code>envfit()</code>.
-</p>
-</li>
-<li> <p><code>multipart()</code> printed wrong information about the
-analysis type (but did the analysis correctly). Reported by
-Valerie Coudrain.
-</p>
-</li>
-<li> <p><code>oecosimu()</code> failed if its <code>nestedfun</code> returned a
-data frame. A more fundamental fix will be in <span class="pkg">vegan</span> 2.2-0,
-where the structure of the <code>oecosimu()</code> result will change.
-</p>
-</li>
-<li><p> The plot of two-dimensional <code>procrustes()</code> solutions
-often draw original axes in a wrong angle. The problem was
-reported by Elizabeth Ottesen (MIT).
-</p>
-</li>
-<li><p> Function <code>treedive()</code> for functional or phylogenetic
-diversity did not correctly match the species names between the
-community data and species tree when the tree contained species
-that did not occur in the data.  Related function
-<code>treedist()</code> for phylogenetic distances did not try to match
-the names at all.
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES</h4>
-
-
-<ul>
-<li><p> The output of <code>capscale()</code> displays the value of the
-additive constant when argument <code>add = TRUE</code> was used.
-</p>
-</li>
-<li> <p><code>fitted()</code> functions for <code>cca()</code>, <code>rda()</code> and
-<code>capscale()</code> can now return conditioned (partial) component
-of the response: Argument <code>model</code> gained a new alternative
-<code>model = "pCCA"</code>. 
-</p>
-</li>
-<li> <p><code>dispindmorisita()</code> output gained a new column for
-Chi-squared based probabilities that the null hypothesis (random
-distribution) is true.
-</p>
-</li>
-<li> <p><code>metaMDS()</code> and <code>monoMDS()</code> have new default
-convergence criteria. Most importantly, scale factor of the
-gradient (<code>sfgrmin</code>) is stricter. The former limit was too
-slack with large data sets and iterations stopped early without
-getting close to the solution. In addition, <code>scores()</code>
-ignore now requests to dimensions beyond those calculated
-instead of failing, and <code>scores()</code> for <code>metaMDS()</code>
-results do not drop dimensions.
-</p>
-</li>
-<li> <p><code>msoplot()</code> gained <code>legend</code> argument for
-positioning the legend.
-</p>
-</li>
-<li><p> Nestedness function <code>nestednodf()</code> gained a <code>plot</code>
-method.
-</p>
-</li>
-<li> <p><code>ordiR2step()</code> gained new argument <code>R2scope</code>
-(defaults <code>TRUE</code>) which can be used to turn off the criterion
-of stopping when the adjusted <i>R-squared</i> of the current
-model exceeds that of the scope.  This option allows model
-building when the <code>scope</code> would be overdetermined (number of
-predictors higher than number of observations).
-</p>
-<p><code>ordiR2step()</code> now handles partial redundancy analysis
-(pRDA).
-</p>
-</li>
-<li> <p><code>orditorp()</code> gained argument <code>select</code> to select
-the rows or columns of the results to display.
-</p>
-</li>
-<li> <p><code>protest()</code> prints the standardized residual statistic
-<i>squared m12</i> in addition to the squared Procrustes
-correlation <i>R-squared</i>.  Both were calculated, but only
-the latter was displayed.
-</p>
-<p>Permutation tests are much faster in <code>protest()</code>. Instead
-of calling repeatedly <code>procrustes()</code>, the goodness of fit
-statistic is evaluated within the function. 
-</p>
-</li>
-<li> <p><code>wcmdscale()</code> gained methods for <code>print</code>,
-<code>plot</code> etc. of the results. These methods are only used if
-the full <code>wcmdscale</code> result is returned with, e.g., argument
-<code>eig = TRUE</code>. The default is still to return only a matrix of
-scores similarly as the standard <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> function <code>cmdscale()</code>,
-and in that case the new methods are not used.
-</p>
-</li></ul>
-
- 
-
-
-<h3>Changes in version 2.0-5</h3>
-
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li> <p><code>anova(<cca_object>, ...)</code> failed with
-<code>by = "axis"</code> and <code>by = "term"</code>. The bug was reported by
-Dr Sven Neulinger (Christian Albrecht University, Kiel, Germany).
-</p>
-</li>
-<li> <p><code>radlattice</code> did not honour argument <code>BIC = TRUE</code>,
-but always displayed AIC.
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FUNCTIONS</h4>
-
-
-<ul>
-<li><p> Most <span class="pkg">vegan</span> functions with permutation tests have now a
-<code>density</code> method that can be used to find empirical
-probability distributions of permutations. There is a new
-<code>plot</code> method for these functions that displays both the
-density and the observed statistic. The <code>density</code> function is
-available for <code>adonis</code>, <code>anosim</code>, <code>mantel</code>,
-<code>mantel.partial</code>, <code>mrpp</code>, <code>permutest.cca</code> and
-<code>procrustes</code>.
-</p>
-<p>Function <code>adonis</code> can return several statistics, and it has
-now a <code>densityplot</code> method (based on <span class="pkg">lattice</span>).
-</p>
-<p>Function <code>oecosimu</code> already had <code>density</code> and
-<code>densityplot</code>, but they are now similar to other <span class="pkg">vegan</span>
-methods, and also work with <code>adipart</code>, <code>hiersimu</code> and
-<code>multipart</code>.
-</p>
-</li>
-<li> <p><code>radfit</code> functions got a <code>predict</code> method that
-also accepts arguments <code>newdata</code> and <code>total</code> for new
-ranks and site totals for prediction.  The functions can also
-interpolate to non-integer “ranks”, and in some models
-also extrapolate.
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES</h4>
-
-
-<ul>
-<li><p> Labels can now be set in the <code>plot</code> of <code>envfit</code>
-results. The labels must be given in the same order that the
-function uses internally, and new support function <code>labels</code>
-can be used to display the default labels in their correct order.
-</p>
-</li>
-<li><p> Mantel tests (functions <code>mantel</code> and
-<code>mantel.partial</code>) gained argument <code>na.rm</code> which can be
-used to remove missing values. This options should be used with
-care: Permutation tests can be biased if the missing values were
-originally in matching or fixed positions.
-</p>
-</li>
-<li> <p><code>radfit</code> results can be consistently accessed with
-the same methods whether they were a single model for a single
-site, all models for a single site or all models for all sites
-in the data.  All functions now have methods <code>AIC</code>,
-<code>coef</code>, <code>deviance</code>, <code>logLik</code>, <code>fitted</code>,
-<code>predict</code> and <code>residuals</code>.
-</p>
-</li></ul>
-
- 
-
-
-<h4>INSTALLATION AND BUILDING</h4>
-
-
-<ul>
-<li><p> Building of <span class="pkg">vegan</span> vignettes failed with the latest
-version of LaTeX (TeXLive 2012).
-</p>
-</li>
-<li> <p><span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> versions later than 2.15-1 (including development
-version) report warnings and errors when installing and checking
-<span class="pkg">vegan</span>, and you must upgrade <span class="pkg">vegan</span> to this version.
-The warnings concern functions <code>cIndexKM</code> and
-<code>betadisper</code>, and the error occurs in <code>betadisper</code>.
-These errors and warnings were triggered by internal changes in
-<span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>.
-</p>
-</li></ul>
-
- 
-
-
-<h3>Changes in version 2.0-4</h3>
-
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li> <p><code>adipart</code> assumed constant gamma diversity in
-simulations when assessing the <i>P</i>-value.  This could give
-biased results if the null model produces variable gamma
-diversities and option <code>weights = "prop"</code> is used.  The
-default null model (<code>"r2dtable"</code>) and the default option
-(<code>weights = "unif"</code>) were analysed correctly.
-</p>
-</li>
-<li> <p><code>anova(<prc-object>, by = "axis")</code> and other
-<code>by</code> cases failed due to ‘<span class="file">NAMESPACE</span>’ issues.
-</p>
-</li>
-<li> <p><code>clamtest</code> wrongly used frequencies instead of the
-counts when calculating sample coverage.  No detectable
-differences were produced when rerunning examples from Chazdon
-et al. 2011 and <span class="pkg">vegan</span> help page.
-</p>
-</li>
-<li> <p><code>envfit</code> failed with unused factor levels.
-</p>
-</li>
-<li> <p><code>predict</code> for <code>cca</code> results with
-<code>type = "response"</code> or <code>type = "working"</code> failed with
-<code>newdata</code> if the number of rows did not match with the
-original data.  Now the <code>newdata</code> is ignored if it has a
-wrong number of rows.  The number of rows must match because
-the results in <code>cca</code> must be weighted by original row
-totals.  The problem did not concern <code>rda</code> or
-<code>capscale</code> results which do not need row weights.
-Reported by Glenn De'ath.
-</p>
-</li></ul>
-
-
-
-
-<h4>NEW FEATURES</h4>
-
-
-<ul>
-<li><p> Functions for diversity partitioning (<code>adipart</code>,
-<code>hiersimu</code> and <code>multipart</code>) have now <code>formula</code>
-and <code>default</code> methods.  The <code>formula</code> method is
-identical to the previous functions, but the <code>default</code>
-method can take two matrices as input. 
-</p>
-<p>Functions <code>adipart</code> and <code>multipart</code> can be used for
-fast and easy overall partitioning to alpha, beta and gamma
-diversities by omitting the argument describing the hierarchy.
-</p>
-</li>
-<li><p> The method in <code>betadisper</code> is biased with small
-sample sizes.  The effects of the bias are strongest with
-unequal sample sizes. A bias adjusted version was developed by
-Adrian Stier and Ben Bolker, and can be invoked with argument
-<code>bias.adjust</code> (defaults to <code>FALSE</code>).
-</p>
-</li>
-<li> <p><code>bioenv</code> accepts dissimilarities (or square matrices
-that can be interpreted as dissimilarities) as an alternative to
-community data.  This allows using other dissimilarities than
-those available in <code>vegdist</code>.
-</p>
-</li>
-<li> <p><code>plot</code> function for <code>envfit</code> results gained new
-argument <code>bg</code> that can be used to set background colour for
-plotted labels.
-</p>
-</li>
-<li> <p><code>msoplot</code> is more configurable, and allows, for
-instance, setting y-axis limits.
-</p>
-</li>
-<li><p> Hulls and ellipses are now filled using semitransparent
-colours in <code>ordihull</code> and <code>ordiellipse</code>, and the
-user can set the degree of transparency with a new argument
-<code>alpha</code>.  The filled shapes are used when these functions
-are called with argument <code>draw = "polygon"</code>.  Function
-<code>ordihull</code> puts labels (with argument <code>label = TRUE</code>)
-now in the real polygon centre.
-</p>
-</li>
-<li> <p><code>ordiplot3d</code> returns function <code>envfit.convert</code>
-and the projected location of the <code>origin</code>.  Together
-these can be used to add <code>envfit</code> results to existing
-<code>ordiplot3d</code> plots.
-</p>
-<p>Equal aspect ratio cannot be set exactly in <code>ordiplot3d</code>
-because underlying core routines do not allow this. Now
-<code>ordiplot3d</code> sets equal axis ranges, and the documents
-urge users to verify that the aspect ratio is reasonably equal
-and the graph looks like a cube.  If the problems cannot be
-solved in the future, <code>ordiplot3d</code> may be removed from
-next releases of <span class="pkg">vegan</span>.
-</p>
-</li>
-<li><p> Function <code>ordipointlabel</code> gained argument to
-<code>select</code> only some of the items for plotting. The
-argument can be used only with one set of points.
-</p>
-</li></ul>
-
- 
-
-
-<h3>Changes in version 2.0-3</h3>
-
-
-
-<h4>NEW FUNCTIONS</h4>
-
-
-<ul>
-<li><p> Added new nestedness functions <code>nestedbetasor</code> and
-<code>nestedbetajac</code> that implement multiple-site dissimilarity
-indices and their decomposition into turnover and nestedness
-components following Baselga (<em>Global Ecology and
-Biogeography</em> 19, 134–143; 2010).
-</p>
-</li>
-<li><p> Added function <code>rarecurve</code> to draw rarefaction curves
-for each row (sampling unit) of the input data, optionally with
-lines showing rarefied species richness with given sample size
-for each curve.
-</p>
-</li>
-<li><p> Added function <code>simper</code> that implements
-“similarity percentages” of Clarke (<em>Australian
-Journal of Ecology</em> 18, 117–143; 1993).  The method compares
-two or more groups and decomposes the average between-group
-Bray-Curtis dissimilarity index to contributions by individual
-species.  The code was developed in 
-<a href="https://github.com/jarioksa/vegan">GitHub</a>
-by Eduard Szöcs (Uni Landau, Germany).
-</p>
-</li></ul>
-
- 
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li> <p><code>betadisper()</code> failed when the <code>groups</code> was a
-factor with empty levels.
-</p>
-</li>
-<li><p> Some constrained ordination methods and their support
-functions are more robust in border cases (completely aliased
-effects, saturated models, user requests for non-existng scores
-etc). Concerns <code>capscale</code>, <code>ordistep</code>, <code>varpart</code>,
-<code>plot</code> function for constrained ordination, and
-<code>anova(<cca.object>, by = "margin")</code>.
-</p>
-</li>
-<li><p> The <code>scores</code> function for <code>monoMDS</code> did not
-honour <code>choices</code> argument and hence dimensions could not be
-chosen in <code>plot</code>.
-</p>
-</li>
-<li><p> The default <code>scores</code> method failed if the number of
-requested axes was higher than the ordination object had.  This
-was reported as an error in <code>ordiplot</code> in
-<a href="https://stat.ethz.ch/pipermail/r-sig-ecology/2012-February/002768.html">R-sig-ecology</a> mailing list.
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES</h4>
-
-
-<ul>
-<li> <p><code>metaMDS</code> argument <code>noshare = 0</code> is now
-regarded as a numeric threshold that always triggers extended
-dissimilarities (<code>stepacross</code>), instead of being treated
-as synonymous with <code>noshare = FALSE</code> which always
-suppresses extended dissimilarities.
-</p>
-</li>
-<li><p> Nestedness discrepancy index <code>nesteddisc</code> gained a
-new argument that allows user to set the number of iterations
-in optimizing the index.
-</p>
-</li>
-<li> <p><code>oecosimu</code> displays the mean of simulations and
-describes alternative hypothesis more clearly in the printed
-output. 
-</p>
-</li>
-<li><p> Implemented adjusted <i>R-squared</i> for partial
-RDA. For partial model <code>rda(Y ~ X1 + Condition(X2))</code> this
-is the same as the component <code>[a] = X1|X2</code> in variance
-partition in <code>varpart</code> and describes the marginal (unique)
-effect of constraining term to adjusted <i>R-squared</i>.
-</p>
-</li>
-<li><p> Added Cao dissimilarity (CYd) as a new dissimilarity
-method in <code>vegdist</code> following Cao et al., <em>Water
-Envir Res</em> 69, 95–106 (1997). The index should be good for
-data with high beta diversity and variable sampling
-intensity. Thanks to consultation to Yong Cao (Univ Illinois,
-USA).
-</p>
-</li></ul>
-
- 
-
-
-<h3>Changes in version 2.0-2</h3>
-
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li><p> Function <code>capscale</code> failed if constrained component
-had zero rank. This happened most likely in partial models when
-the conditions aliased constraints. The problem was observed in
-<code>anova(..., by ="margin")</code> which uses partial models to
-analyses the marginal effects, and was reported in an email
-message to
-<a href="https://stat.ethz.ch/pipermail/r-help/2011-October/293077.html">R-News
-mailing list</a>.
-</p>
-</li>
-<li> <p><code>stressplot</code> and <code>goodness</code> sometimes failed when
-<code>metaMDS</code> was based on <code>isoMDS</code> (<span class="pkg">MASS</span> package)
-because <code>metaMDSdist</code> did not use the same defaults for
-step-across (extended) dissimilarities as
-<code>metaMDS(..., engine = "isoMDS")</code>. The change of defaults can
-also influence triggering of step-across in
-<code>capscale(..., metaMDSdist = TRUE)</code>.
-</p>
-</li>
-<li> <p><code>adonis</code> contained a minor bug resulting from
-incomplete implementation of a speed-up that did not affect the
-results. In fixing this bug, a further bug was identified in
-transposing the hat matrices. This second bug was only active
-following fixing of the first bug. In fixing both bugs, a
-speed-up in the internal f.test() function is fully
-realised. Reported by Nicholas Lewin-Koh.
-</p>
-</li></ul>
-
-  
-
-
-<h4>NEW FEATURES</h4>
-
-
-<ul>
-<li> <p><code>ordiarrows</code> and <code>ordisegments</code> gained argument
-<code>order.by</code> that gives a variable to sort points within
-<code>groups</code>. Earlier the points were assumed to be in order.
-</p>
-</li>
-<li><p> Function <code>ordispider</code> invisibly returns the
-coordinates to which the points were connected.  Typically these
-are class centroids of each point, but for constrained ordination
-with no <code>groups</code> they are the LC scores.
-</p>
-</li></ul>
-		 
-  
-
-
-<h3>Changes in version 2.0-1</h3>
-
-
-
-<h4>NEW FUNCTIONS</h4>
-
-
-<ul>
-<li> <p><code>clamtest</code>: new function to classify species as
-generalists and specialists in two distinct habitats (CLAM test of
-Chazdon et al., <em>Ecology</em> 92, 1332–1343; 2011).  The test is
-based on multinomial distribution of individuals in two habitat
-types or sampling units, and it is applicable only to count data
-with no over-dispersion.
-</p>
-</li>
-<li> <p><code>as.preston</code> gained <code>plot</code> and <code>lines</code>
-methods, and <code>as.fisher</code> gained <code>plot</code> method (which
-also can add items to existing plots). These are similar as
-<code>plot</code> and <code>lines</code> for <code>prestonfit</code> and
-<code>fisherfit</code>, but display only data without the fitted lines.
-</p>
-</li>
-<li> <p><code>raupcrick</code>: new function to implement Raup-Crick
-dissimilarity as a probability of number of co-occurring species
-with occurrence probabilities proportional to species
-frequencies.  <span class="pkg">Vegan</span> has Raup-Crick index as a choice in
-<code>vegdist</code>, but that uses equal sampling probabilities for
-species and analytic equations. The new <code>raupcrick</code>
-function uses simulation with <code>oecosimu</code>. The function
-follows Chase et al. (2011) <em>Ecosphere</em> 2:art24
-[<a href="http://www.esajournals.org/doi/abs/10.1890/ES10-00117.1">doi:10.1890/ES10-00117.1</a>],
-and was developed with the consultation of Brian Inouye.
-</p>
-</li></ul>
-
- 
-
-
-<h4>BUG FIXES</h4>
-
-
-<ul>
-<li><p> Function <code>meandist</code> could scramble items and give
-wrong results, especially when the <code>grouping</code> was
-numerical. The problem was reported by Dr Miguel Alvarez
-(Univ. Bonn).
-</p>
-</li>
-<li> <p><code>metaMDS</code> did not reset <code>tries</code> when a new model
-was started with a <code>previous.best</code> solution from a different
-model. 
-</p>
-</li>
-<li><p> Function <code>permatswap</code> for community null models using
-quantitative swap never swapped items in a <i>2 by 2</i>
-submatrix if all cells were filled.
-</p>
-</li>
-<li><p> The result from <code>permutest.cca</code> could not be
-<code>update</code>d because of a ‘<span class="file">NAMESPACE</span>’ issue.
-</p>
-</li>
-<li> <p><span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.14.0 changed so that it does not accept using
-<code>sd()</code> function for matrices (which was the behaviour at
-least since <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 1.0-0), and several <span class="pkg">vegan</span> functions were
-changed to adapt to this change (<code>rda</code>, <code>capscale</code>,
-<code>simulate</code> methods for <code>rda</code>, <code>cca</code> and
-<code>capscale</code>). The change in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> 2.14.0 does not influence the
-results but you probably wish to upgrade <span class="pkg">vegan</span> to avoid
-annoying warnings.
-</p>
-</li></ul>
-	
- 
-
-
-<h4>ANALYSES</h4>
-
-
-<ul>
-<li> <p><code>nesteddisc</code> is slacker and hence faster when trying
-to optimize the statistic for tied column frequencies. Tracing
-showed that in most cases an improved ordering was found rather
-early in tries, and the results are equally good in most cases.
-</p>
-</li></ul>
-
- 
-
-
-<h3>Changes in version 2.0-0</h3>
-
-
-
-<h4>GENERAL</h4>
-
-
-<ul>
-<li><p> Peter Minchin joins the <span class="pkg">vegan</span> team.
-</p>
-</li>
-<li> <p><span class="pkg">vegan</span> implements standard <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> ‘<span class="file">NAMESPACE</span>’. In
-general, <code>S3</code> methods are not exported which means that you
-cannot directly use or see contents of functions like
-<code>cca.default</code>, <code>plot.cca</code> or <code>anova.ccabyterm</code>. To
-use these functions you should rely on <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span> delegation and simply
-use <code>cca</code> and for its result objects use <code>plot</code> and
-<code>anova</code> without suffix <code>.cca</code>. To see the contents of
-the function you can use <code>:::</code>, such as
-<code>vegan:::cca.default</code>. This change may break packages,
-documents or scripts that rely on non-exported names.
-</p>
-</li>
-<li> <p><span class="pkg">vegan</span> depends on the <span class="pkg">permute</span> package. This
-package provides powerful tools for restricted permutation
-schemes. All <span class="pkg">vegan</span> permutation will gradually move to use
-<span class="pkg">permute</span>, but currently only <code>betadisper</code> uses the new
-feature. 
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FUNCTIONS</h4>
-
-
-<ul>
-<li> <p><code>monoMDS</code>: a new function for non-metric
-multidimensional scaling (NMDS). This function replaces
-<code>MASS::isoMDS</code> as the default method in
-<code>metaMDS</code>. Major advantages of <code>monoMDS</code> are that it
-has ‘weak’ (‘primary’) tie treatment which means
-that it can split tied observed dissimilarities.  ‘Weak’
-tie treatment improves ordination of heterogeneous data sets,
-because maximum dissimilarities of <i>1</i> can be split. In
-addition to global NMDS, <code>monoMDS</code> can perform local and
-hybrid NMDS and metric MDS.  It can also handle missing and zero
-dissimilarities.  Moreover, <code>monoMDS</code> is faster than
-previous alternatives. The function uses <code>Fortran</code> code
-written by Peter Minchin.
-</p>
-</li>
-<li> <p><code>MDSrotate</code> a new function to replace
-<code>metaMDSrotate</code>. This function can rotate both <code>metaMDS</code>
-and <code>monoMDS</code> results so that the first axis is parallel to
-an environmental vector.
-</p>
-</li>
-<li> <p><code>eventstar</code> finds the minimum of the evenness profile
-on the Tsallis entropy, and uses this to find the corresponding
-values of diversity, evenness and numbers equivalent following
-Mendes et al. (<em>Ecography</em> 31, 450-456; 2008). The code was
-contributed by Eduardo Ribeira Cunha and Heloisa Beatriz Antoniazi
-Evangelista and adapted to <span class="pkg">vegan</span> by Peter Solymos.
-</p>
-</li>
-<li> <p><code>fitspecaccum</code> fits non-linear regression models to
-the species accumulation results from <code>specaccum</code>. The
-function can use new self-starting species accumulation models
-in <span class="pkg">vegan</span> or other self-starting non-linear regression
-models in <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>. The function can fit Arrhenius, Gleason, Gitay,
-Lomolino (in <span class="pkg">vegan</span>), asymptotic, Gompertz,
-Michaelis-Menten, logistic and Weibull (in base <span style="font-family: Courier New, Courier; color: #666666;"><b>R</b></span>) models. The
-function has <code>plot</code> and <code>predict</code> methods.
-</p>
-</li>
-<li><p> Self-starting non-linear species accumulation models
-<code>SSarrhenius</code>, <code>SSgleason</code>, <code>SSgitay</code> and
-<code>SSlomolino</code>. These can be used with <code>fitspecaccum</code> or
-directly in non-linear regression with <code>nls</code>. These functions
-were implemented because they were found good for species-area
-models by Dengler (<em>J. Biogeogr.</em> 36, 728-744; 2009).
-</p>
-</li></ul>
-
- 
-
-
-<h4>NEW FEATURES</h4>
-
-
-<ul>
-<li> <p><code>adonis</code>, <code>anosim</code>, <code>meandist</code> and
-<code>mrpp</code> warn on negative dissimilarities, and
-<code>betadisper</code> refuses to analyse them. All these functions
-expect dissimilarities, and giving something else (like
-correlations) probably is a user error.
-</p>
-</li>
-<li> <p><code>betadisper</code> uses restricted permutation of the
-<span class="pkg">permute</span> package. 
-</p>
-</li>
-<li> <p><code>metaMDS</code> uses <code>monoMDS</code> as its default ordination
-engine. Function gains new argument <code>engine</code> that can be used
-to alternatively select <code>MASS::isoMDS</code>.  The default is not
-to use <code>stepacross</code> with <code>monoMDS</code> because its
-‘weak’ tie treatment can cope with tied maximum
-dissimilarities of one. However, <code>stepacross</code> is the default
-with <code>isoMDS</code> because it cannot handle adequately these tied
-maximum dissimilarities.
-</p>
-</li>
-<li> <p><code>specaccum</code> gained <code>predict</code> method which uses
-either linear or spline interpolation for data between observed
-points. Extrapolation is possible with spline interpolation, but
-may make little sense.
-</p>
-</li>
-<li> <p><code>specpool</code> can handle missing values or empty factor
-levels in the grouping factor <code>pool</code>.  Now also checks that
-the length of the <code>pool</code> matches the number of
-observations.
-</p>
-</li></ul>
-
- 
-
-
-<h4>DEPRECATED AND DEFUNCT</h4>
-
-
-<ul>
-<li> <p><code>metaMDSrotate</code> was replaced with <code>MDSrotate</code>
-that can also handle the results of <code>monoMDS</code>.
-</p>
-</li>
-<li> <p><code>permuted.index2</code> and other “new” permutation
-code was removed in favour of the <span class="pkg">permute</span> package. This code
-was not intended for normal use, but packages depending on that
-code in <span class="pkg">vegan</span> should instead depend on <span class="pkg">permute</span>.
-</p>
-</li></ul>
-  
- 
-
-
-<h4>ANALYSES</h4>
-
-
-<ul>
-<li> <p><code>treeheight</code> uses much snappier code. The results
-should be unchanged.
-</p>
-</li></ul>
-
- 
-
-
-</body></html>
diff --git a/vignettes/decision-vegan.Rnw b/vignettes/decision-vegan.Rnw
index 6e00ca8..5658dcb 100644
--- a/vignettes/decision-vegan.Rnw
+++ b/vignettes/decision-vegan.Rnw
@@ -251,7 +251,6 @@ cross <- function(x, a, p) f(x,p) - a + x
 r <- uniroot(cross, c(0,1), a = x+y, p = mod$p)$root
 arrows(x,y, r, f(r, mod$p), lwd=4)
 @
-\label{fig:nestedtemp}
 \caption{Matrix temperature for \emph{Falco subbuteo} on Sibbo
   Svartholmen (dot). The curve is the fill line, and in a cold
   matrix, all presences (red squares) should be in the upper left
@@ -260,6 +259,7 @@ arrows(x,y, r, f(r, mod$p), lwd=4)
   the fill line. The ``surprise'' for this point is $u = (d/D)^2$ and
   the matrix temperature is based on the sum of surprises: presences
   outside the fill line or absences within the fill line.}
+\label{fig:nestedtemp}
 \end{figure}
 The function can be implemented in many ways following the general
 principles.  \citet{RodGir06} have seen the original code and reveal
diff --git a/vignettes/decision-vegan.tex b/vignettes/decision-vegan.tex
deleted file mode 100644
index 54abf74..0000000
--- a/vignettes/decision-vegan.tex
+++ /dev/null
@@ -1,817 +0,0 @@
-% -*- mode: noweb; noweb-default-code-mode: R-mode; -*-
-%\VignetteIndexEntry{Design decisions and implementation}
-
-\documentclass[a4paper,10pt,twocolumn]{article}
-\usepackage{vegan} % package options and redefinitions
-
-\author{Jari Oksanen}
-\title{Design decisions and implementation details in vegan}
-
-\date{\footnotesize{
-  processed with vegan
-2.3-1
-in R Under development (unstable) (2015-09-24 r69424) on \today}}
-
-%% need no \usepackage{Sweave}
-\begin{document}
-\bibliographystyle{jss}
-
-
-
-\maketitle
-
-\begin{abstract}
-  This document describes design decisions, and discusses implementation
-and algorithmic details in some vegan functions. The proper FAQ is
-another document.
-\end{abstract}
-
-\tableofcontents
-
-\section{Parallel processing}
-
-Several \pkg{vegan} functions can perform parallel processing using
-the standard \R{} package \pkg{parallel}. 
-The \pkg{parallel} package in \R{} implements
-the functionality of earlier contributed packages \pkg{multicore} and
-\pkg{snow}.  The \pkg{multicore} functionality forks the analysis to
-multiple cores, and \pkg{snow} functionality sets up a socket cluster
-of workers.  The \pkg{multicore} functionality only works in unix-like
-systems (such as MacOS and Linux), but \pkg{snow} functionality works
-in all operating systems.  \pkg{Vegan} can use either method, but
-defaults to \pkg{multicore} functionality when this is available,
-because its forked clusters are usually faster.  This chapter
-describes both the user interface and internal implementation for the
-developers.
-
-\subsection{User interface}
-\label{sec:parallel:ui}
-
-The functions that are capable of parallel processing have argument
-\code{parallel}.  The normal default is \code{parallel = 1} which
-means that no parallel processing is performed.  It is possible to set
-parallel processing as the default in \pkg{vegan} (see
-\S\,\ref{sec:parallel:default}). 
-
-For parallel processing, the \code{parallel} argument can be either
-
-\begin{enumerate}
-\item An integer in which case the given number of parallel processes
-  will be launched (value $1$ launches non-parallel processing). In
-  unix-like systems (\emph{e.g.}, MacOS, Linux) these will be forked
-  \code{multicore} processes. In Windows socket clusters will be set up,
-  initialized and closed.
-\item A previously created socket cluster. This saves time as the
-  cluster is not set up and closed in the function.  If the argument is a
-  socket cluster, it will also be used in unix-like systems. Setting
-  up a socket cluster is discussed in \S\,\ref{sec:parallel:socket}.
-\end{enumerate}
-
-\subsubsection{Using parallel processing as default}
-\label{sec:parallel:default}
-
-If the user sets option \code{mc.cores}, its value will be used as the
-default value of the \code{parallel} argument in \pkg{vegan}
-functions.  The following command will set up parallel processing to
-all subsequent \pkg{vegan} commands:
-\begin{Schunk}
-\begin{Sinput}
-> options(mc.cores = 2)
-\end{Sinput}
-\end{Schunk}
-
-The \code{mc.cores} option is defined in the \pkg{parallel} package,
-but it is usually unset in which case \pkg{vegan} will default to
-non-parallel computation.  The \code{mc.cores} option can be set by
-the environmental variable \code{MC_CORES} when the \pkg{parallel}
-package is loaded.
-
-\R{} allows\footnote{Since \R{} version 2.15.0.}
-setting up a default socket cluster (\code{setDefaultCluster}), but
-this will not be used in \pkg{vegan}. 
-
-\subsubsection{Setting up socket clusters}
-\label{sec:parallel:socket}
-
-If socket clusters are used (and they are the only alternative in
-Windows), it is often wise to set up a cluster before calling
-parallelized code and give the pre-defined cluster as the value of
-the \code{parallel} argument in \pkg{vegan}.  If you want to use
-socket clusters in unix-like systems (MacOS, Linux), this can be only
-done with pre-defined clusters.
-
-If socket cluster is not set up in Windows, \pkg{vegan} will create and
-close the cluster within the function body. This involves following commands:
-\begin{Schunk}
-\begin{Soutput}
-clus <- makeCluster(4)
-## perform parallel processing
-stopCluster(clus)
-\end{Soutput}
-\end{Schunk}
-The first command sets up the cluster, in this case with four
-cores, and the second command stops the cluster.
-
-Most parallelized \pkg{vegan} functions work similarly in socket and
-fork clusters, but in \code{oecosimu} the parallel processing is used
-to evaluate user-defined functions, and their arguments and data must
-be made known to the socket cluster.  For example, if you want to run
-in parallel the \code{meandist} function of the \code{oecosimu}
-example with a pre-defined socket cluster, you must use:
-\begin{Schunk}
-\begin{Sinput}
-> ## start up and define meandist()
-> library(vegan)
-> data(sipoo)
-> meandist <- 
-      function(x) mean(vegdist(x, "bray"))
-> library(parallel)
-> clus <- makeCluster(4)
-> clusterEvalQ(clus, library(vegan))
-> mbc1 <- oecosimu(dune, meandist, "r2dtable", 
-                   parallel = clus)
-> stopCluster(clus)
-\end{Sinput}
-\end{Schunk}
-Socket clusters are used for parallel processing in Windows, but you
-do not need to pre-define the socket cluster in \code{oecosimu} if you
-only need \pkg{vegan} commands.  However, if you need some other
-contributed packages, you must pre-define the socket cluster also in
-Windows with appropriate \code{clusterEvalQ} calls.
-
-If you pre-set the cluster, you can also use \pkg{snow} style socket
-clusters in unix-like systems.
-
-\subsubsection{Random number generation}
-
-\pkg{Vegan} does not use parallel processing in random number
-generation, and you can set the seed for the standard random number
-generator. Setting the seed for the parallelized generator (L'Ecuyer)
-has no effect in \pkg{vegan}.
-
-\subsubsection{Does it pay off?}
-
-Parallelized processing has a considerable overhead, and the analysis
-is faster only if the non-parallel code is really slow (takes several
-seconds in wall clock time). The overhead is particularly large in
-socket clusters (in Windows). Creating a socket cluster and evaluating
-\code{library(vegan)} with \code{clusterEvalQ} can take two seconds or
-longer, and only pays off if the non-parallel analysis takes ten
-seconds or longer. Using pre-defined clusters will reduce the
-overhead. Fork clusters (in unix-likes operating systems) have a
-smaller overhead and can be faster, but they also have an overhead.
-
-Each parallel process needs memory, and for a large number of
-processes you need much memory.  If the memory is exhausted, the
-parallel processes can stall and  take much longer than
-non-parallel processes (minutes instead of seconds).
-
-If the analysis is fast, and function runs in, say, less than five
-seconds, parallel processing is rarely useful.  Parallel processing is
-useful only in slow analyses: large number of replications or
-simulations, slow evaluation of each simulation. The danger of memory
-exhaustion must always be remembered.
-
-The benefits and potential problems of parallel processing depend on
-your particular system: it is best to rely on your own experience. 
-
-\subsection{Internals for developers}
-
-The implementation of the parallel processing should accord with the
-description of the user interface above (\S\,\ref{sec:parallel:ui}).
-Function \code{oecosimu} can be used as a reference implementation,
-and similar interpretation and order of interpretation of arguments
-should be followed.  All future implementations should be consistent
-and all must be changed if the call heuristic changes.
-
-The value of the \code{parallel} argument can be \code{NULL}, a
-positive integer or a socket cluster.  Integer $1$ means that no
-parallel processing is performed.  The ``normal'' default is
-\code{NULL} which in  the ``normal'' case is interpreted as $1$.  Here
-``normal'' means that \R{} is run with default settings without
-setting \code{mc.cores} or environmental variable \code{MC_CORES}.  
-
-Function \code{oecosimu} interprets the \code{parallel} arguments in
-the following way:
-\begin{enumerate} 
-\item \code{NULL}: The function is called with argument \code{parallel
-    = getOption("mc.cores")}. The option \code{mc.cores} is normally
-  unset and then the default is \code{parallel = NULL}.  
-\item Integer: An integer value is taken as the number of created
-  parallel processes.  In unix-like systems this is the number of
-  forked multicore processes, and in Windows this is the number of
-  workers in socket clusters.  In Windows, the socket cluster is
-  created, and if needed \code{library(vegan)} is evaluated in the
-  cluster (this is not necessary if the function only uses internal
-  functions), and the cluster is stopped after parallel processing.
-\item Socket cluster: If a socket cluster is given, it will be used in
-  all operating systems, and  the cluster is not stopped
-  within the function.
-\end{enumerate}
-
-This gives the following precedence order for parallel processing
-(highest to lowest):
-\begin{enumerate}
-  \item Explicitly given argument value of \code{parallel} will always
-    be used.
-  \item If \code{mc.cores} is set, it will be used. In Windows this
-    means creating and stopping socket clusters. Please note
-    that the \code{mc.cores} is only set from the environmental
-    variable \code{MC_CORES} when you load the \pkg{parallel} package,
-    and it is always unset before first
-    \code{require(parallel)}.
- \item The fall back behaviour is no parallel processing. 
-\end{enumerate}
-
-\section{Nestedness and Null models}
-
-Some published indices of nestedness and null models of communities
-are only described in general terms, and they could be implemented in
-various ways. Here I discuss the implementation in \pkg{vegan}.
-
-\subsection{Matrix temperature}
-
-The matrix temperature is intuitively simple
-(Fig. \ref{fig:nestedtemp}), but the the exact calculations were not
-explained in the original publication \cite{AtmarPat93}.
-\begin{figure}
-\includegraphics{decision-vegan-004}
-\label{fig:nestedtemp}
-\caption{Matrix temperature for \emph{Falco subbuteo} on Sibbo
-  Svartholmen (dot). The curve is the fill line, and in a cold
-  matrix, all presences (red squares) should be in the upper left
-  corner behind the fill line. Dashed diagonal line of length $D$ goes
-  through the point, and an arrow of length $d$ connects the point to
-  the fill line. The ``surprise'' for this point is $u = (d/D)^2$ and
-  the matrix temperature is based on the sum of surprises: presences
-  outside the fill line or absences within the fill line.}
-\end{figure}
-The function can be implemented in many ways following the general
-principles.  \citet{RodGir06} have seen the original code and reveal
-more details of calculations, and their explanation is the basis of
-the implementation in \pkg{vegan}.  However, there are still some open
-issues, and probably \pkg{vegan} function \code{nestedtemp} will never
-exactly reproduce results from other programs, although it is based on
-the same general principles.\footnote{function \code{nestedness} in
-  the \pkg{bipartite} package is a direct port of the original
-  \proglang{BINMATNEST} program of \citet{RodGir06}.}  I try to give
-main computation details in this document --- all details can be seen
-in the source code of \code{nestedtemp}.
-
-\begin{itemize}
-\item Species and sites are put into unit square \citep{RodGir06}. The
-  row and column coordinates will be $(k-0.5)/n$ for $k=1 \ldots n$,
-  so that there are no points in the corners or the margins of the
-  unit square, and a diagonal line can be drawn through any point. I
-  do not know how the rows and columns are converted to the unit
-  square in other software, and this may be a considerable source of
-  differences among implementations.
-  \item Species and sites are ordered alternately using indices
-    \citep{RodGir06}:
-    \begin{equation}
-    \begin{split}
-      s_j &= \sum_{i|x_{ij} = 1} i^2 \\
-      t_j &= \sum_{i|x_{ij} = 0} (n-i+1)^2 
-    \end{split}
-    \end{equation}
-    Here $x$ is the data matrix, where $1$ is presence, and $0$ is
-    absence, $i$ and $j$ are row and column indices, and $n$ is the
-    number of rows. The equations give the indices for columns, but
-    the indices can be reversed for corresponding row indexing.
-    Ordering by $s$ packs presences to the top left corner, and
-    ordering by $t$ pack zeros away from the top left corner. The final
-    sorting should be ``a compromise'' \citep{RodGir06} between these
-    scores, and \pkg{vegan} uses $s+t$.  The result should be cool,
-    but the packing does not try to minimize the temperature
-    \citep{RodGir06}.  I do not know how the ``compromise'' is
-    defined, and this can cause some differences to other
-    implementations.
-  \item The following function is used to define the fill line:
-    \begin{equation}
-      y = (1-(1-x)^p)^{1/p}
-    \end{equation}
-    This is similar to the equation suggested by
-    \citet[eq. 4]{RodGir06}, but omits all terms dependent on the
-    numbers of species or sites, because I could not understand why
-    they were needed. The differences are visible only in small data
-    sets. The $y$ and $x$ are the coordinates in the unit square, and
-    the parameter $p$ is selected so that the curve covers the same
-    area as is the proportion of presences
-    (Fig. \ref{fig:nestedtemp}). The parameter $p$ is found
-    numerically using \proglang{R} functions \code{integrate} and
-    \code{uniroot}.  The fill line used in the original matrix
-    temperature software \citep{AtmarPat93} is supposed to be similar
-    \citep{RodGir06}. Small details in the fill line combined with
-    differences in scores used in the unit square (especially in the
-    corners) can cause large differences in the results.
-  \item A line with slope\,$= -1$ is drawn through the point and the $x$
-    coordinate of the intersection of this line and the fill line is
-    found using function \code{uniroot}. The difference of this
-    intersection and the row coordinate gives the argument $d$ of matrix
-    temperature (Fig. \ref{fig:nestedtemp}).
-  \item In other software, ``duplicated'' species occurring on every
-    site are removed, as well as empty sites and species after
-    reordering \cite{RodGir06}. This is not done in \pkg{vegan}.
-\end{itemize}
-
-\subsection{Backtracking}
-
-Gotelli's and Entsminger's seminal paper \cite{GotelliEnt01} on filling
-algorithms is somewhat confusing: it explicitly deals with ``knight's
-tour'' which is quite a different problem than the one we face with
-null models.  The chess piece ``knight''\footnote{``Knight'' is
-  ``Springer'' in German which is very appropriate as Springer was the
-  publisher of the paper on ``knight's tour''} has a history:
-a piece in a certain position could only have entered from some
-candidate squares. The filling of incidence matrix has no  history:
-if we know that the item last added was in certain row and column, we
-have no information to guess which of the filled items was entered
-previously. A consequence of dealing with a different problem is that
-\citet{GotelliEnt01} do not give many hints on implementing a fill
-algorithm as a community null model.
-
-The backtracking is implemented in two stages in \pkg{vegan}: filling and
-backtracking.
-\begin{enumerate}
-  \item The matrix is filled in the order given by the marginal
-    probabilities. In this way the matrix will look similar to the
-    final matrix at all stages of filling. Equal filling probabilities
-    are not used since that is ineffective and produces strange fill
-    patterns: the rows and columns with one or a couple of presences
-    are filled first, and the process is cornered to columns and
-    rows with many presences. As a consequence, the the process tries
-    harder to fill that corner, and the result is a more tightly
-    packed quadratic fill pattern than with other methods.
-  \item The filling stage stops when no new points can be added
-    without exceeding row or column totals. ``Backtracking'' means
-    removing random points and seeing if this allows adding new points
-    to the plot. No record of history is kept (and there is no reason
-    to keep a record of history), but random points are removed and
-    filled again. The number of removed points increases from one to
-    four points. New configuration is kept if it is at least as good
-    as the previous one, and the number of removed points is reduced
-    back to one if the new configuration is better than the old one.
-    Because there is no record of history, this does not sound like a
-    backtracking, but it still fits the general definition of
-    backtracking: ``try something, and if it fails, try something
-    else'' \citep{Sedgewick90}.
-\end{enumerate}
-
-
-\section{Scaling in redundancy analysis}
-
-This chapter discusses the scaling of scores (results) in redundancy
-analysis and principal component analysis performed by function
-\code{rda} in the \pkg{vegan} library.  
-
-Principal component analysis, and hence redundancy analysis, is a case
-of singular value decomposition (\textsc{svd}).  Functions
-\code{rda} and \code{prcomp} even use \textsc{svd} internally in
-their algorithm.
-
-In \textsc{svd} a centred data matrix $\mathbf{X} = \{x_{ij}\}$ is decomposed into orthogonal
-components so that $x_{ij} = \sum_k \sigma_k u_{ik} v_{jk}$, where
-$u_{ik}$ and $v_{jk}$ are orthonormal coefficient matrices and
-$\sigma_k$ are singular values.  Orthonormality means that sums of
-squared columns is one and their cross-product is zero, or $\sum_i
-u_{ik}^2 = \sum_j v_{jk}^2 = 1$, and $\sum_i u_{ik} u_{il} = \sum_j
-v_{jk} v_{jl} = 0$ for $k \neq l$. This is a decomposition, and the
-original matrix is found exactly from the singular vectors and
-corresponding singular values, and first two singular components give
-the rank $=2$ least squares estimate of the original matrix.
-
-Principal component analysis is often presented (and performed in
-legacy software) as an eigenanalysis of covariance matrices.  Instead
-of a data matrix, we analyse a matrix of covariances and variances
-$\mathbf{S}$.  The result are orthonormal coefficient matrix
-$\mathbf{U}$ and eigenvalues $\mathbf{\Lambda}$.  The coefficients
-$u_{ik}$ ares identical to \textsc{svd} (except for possible sign
-changes), and eigenvalues $\lambda_k$ are related to the corresponding
-singular values by $\lambda_k = \sigma_k^2 /(n-1)$.  With classical
-definitions, the sum of all eigenvalues equals the sum of variances of
-species, or $\sum_k \lambda_k = \sum_j s_j^2$, and it is often said
-that first axes explain a certain proportion of total variance in the
-data.  The orthonormal matrix $\mathbf{V}$ of \textsc{svd} can be
-found indirectly as well, so that we have the same components in both
-methods.
-
-The coefficients $u_{ik}$ and $v_{jk}$ are scaled to unit length for all
-axes $k$. Singular values $\sigma_k$ or eigenvalues $\lambda_k$ give
-the information of the importance of axes, or the `axis lengths.'
-Instead of the orthonormal coefficients, or equal length axes, it is
-customary to scale species (column) or site (row) scores or both by
-eigenvalues to display the importance of axes and to describe the true
-configuration of points.  Table \ref{tab:scales} shows some
-alternative scalings.  These alternatives apply to principal
-components analysis in all cases, and in redundancy analysis, they
-apply to species scores and constraints or linear combination scores;
-weighted averaging scores have somewhat wider dispersion.
-
-\begin{table*}[t]
-  \centering
-  \caption{\label{tab:scales} Alternative scalings for \textsc{rda} used
-    in the functions \code{prcomp} and \code{princomp}, and the
-    one used in the \pkg{vegan} function \code{rda} 
-    and the proprietary software \proglang{Canoco}
-    scores in terms of orthonormal species ($v_{ik}$) and site scores
-    ($u_{jk}$), eigenvalues ($\lambda_k$), number of sites  ($n$) and
-    species standard deviations ($s_j$). In \code{rda},
-    $\mathrm{const} = \sqrt[4]{(n-1) \sum \lambda_k}$.  Corresponding
-    negative scaling in \pkg{vegan}
-   % and corresponding positive scaling in \texttt{Canoco 3}  
-    is derived
-    dividing each  species by its standard deviation $s_j$ (possibly
-    with some additional constant multiplier).  }
- \begin{tabular}{lcc}
-  \\
-  \toprule
-& \textbf{Site scores} $u_{ik}^*$ &
-\textbf{Species scores} $v_{jk}^*$ \\
-\midrule
-\code{prcomp, princomp} &
-$u_{ik} \sqrt{n-1} \sqrt{\lambda_k}$ &
-$v_{jk}$ \\
-\code{rda, scaling=1} &
-$u_{ik} \sqrt{\lambda_k/ \sum \lambda_k} \times \mathrm{const}$ &
-$v_{jk} \times \mathrm{const}$
-\\
-\code{rda, scaling=2} &
-$u_{ik} \times \mathrm{const}$ &
-$v_{jk} \sqrt{\lambda_k/ \sum \lambda_k} \times \mathrm{const}$  \\
-\code{rda, scaling=3} &
-$u_{ik} \sqrt[4]{\lambda_k/ \sum \lambda_k} \times \mathrm{const}$ &
-$v_{jk} \sqrt[4]{\lambda_k/ \sum \lambda_k} \times \mathrm{const}$ \\
-\code{rda, scaling < 0} &
-$u_{ik}^*$ &
-$\sqrt{\sum \lambda_k /(n-1)} s_j^{-1} v_{jk}^*$
-\\
-% \code{Canoco 3, scaling=-1} &
-% $u_{ik} \sqrt{n-1} \sqrt{\lambda_k / \sum \lambda_k}$ &
-% $v_{jk} \sqrt{n}$ \\
-% \code{Canoco 3, scaling=-2} &
-% $u_{ik} \sqrt{n-1}$ &
-% $v_{jk} \sqrt{n} \sqrt{\lambda_k / \sum \lambda_k}$
-% \\
-% \code{Canoco 3, scaling=-3} &
-% $u_{ik} \sqrt{n-1} \sqrt[4]{\lambda_k / \sum \lambda_k}$ &
-% $v_{jk} \sqrt{n} \sqrt[4]{\lambda_k / \sum \lambda_k}$
-\bottomrule
-\end{tabular}
-\end{table*}
-
-
-
-In community ecology, it is common to plot both species and sites in
-the same graph.  If this graph is a graphical display of \textsc{svd},
-or a graphical, low-dimensional approximation of the data, the graph
-is called a biplot.  The graph is a biplot if the transformed scores
-satisfy $x_{ij} = c \sum_k u_{ij}^* v_{jk}^*$ where $c$ is a scaling
-constant.  In functions \code{princomp}, \code{prcomp} and
-\code{rda}, $c=1$ and the plotted scores are a biplot so that the
-singular values (or eigenvalues) are expressed for sites, and species
-are left unscaled.  
-% For \texttt{Canoco 3} $c = n^{-1} \sqrt{n-1}
-% \sqrt{\sum \lambda_k}$ with negative \proglang{Canoco} scaling
-% values. All these $c$ are constants for a matrix, so these are all
-% biplots with different internal scaling of species and site scores
-% with respect to each other.  For \proglang{Canoco} with positive scaling
-% values and \pkg{vegan} with negative scaling values, no constant
-% $c$ can be found, but the correction is dependent on species standard
-% deviations $s_j$, and these scores do not define a biplot.
-
-There is no natural way of scaling species and site scores to each
-other.  The eigenvalues in redundancy and principal components
-analysis are scale-dependent and change when the  data are
-multiplied by a constant.  If we have percent cover data, the
-eigenvalues are typically very high, and the scores scaled by
-eigenvalues will have much wider dispersion than the orthonormal set.
-If we express the percentages as proportions, and divide the matrix by
-$100$, the eigenvalues will be reduced by factor $100^2$, and the
-scores scaled by eigenvalues will have a narrower dispersion.  For
-graphical biplots we should be able to fix the relations of row and
-column scores to be invariant against scaling of data.  The solution
-in \proglang{R} standard function \code{biplot} is to scale site and species
-scores independently, and typically very differently, but plot each
-independently to fill the graph area.  The solution in \proglang{Canoco} and 
-\code{rda} is to use proportional eigenvalues $\lambda_k / \sum
-\lambda_k$ instead of original eigenvalues.  These proportions are
-invariant with scale changes, and typically they have a nice range for
-plotting two data sets in the same graph.
-
-The \textbf{vegan} package uses a scaling constant $c = \sqrt[4]{(n-1)
-  \sum \lambda_k}$ in order to be able to use scaling by proportional
-eigenvalues (like in \proglang{Canoco}) and still be able to have a
-biplot scaling. Because of this, the scaling of \code{rda} scores is
-non-standard. However, the \code{scores} function lets you to set
-the scaling constant to any desired values. It is also possible to
-have two separate scaling constants: the first for the species, and
-the second for sites and friends, and this allows getting scores of
-other software or \proglang{R} functions (Table \ref{tab:rdaconst}). 
-
-\begin{table*}[t]
-  \centering
-  \caption{\label{tab:rdaconst} Values of the \code{const} argument in
-    \textbf{vegan} to get the scores that are equal to those from
-    other functions and software. Number of sites (rows) is $n$, 
-    the number of species (columns) is $m$, and the sum of all
-    eigenvalues is $\sum_k \lambda_k$ (this is saved as the item
-    \code{tot.chi} in the \code{rda} result)}.
- \begin{tabular}{lccc}
-  \\
-  \toprule
-& \textbf{Scaling} &\textbf{Species constant} & \textbf{Site constant} \\
-\midrule
-\pkg{vegan} & any  & $\sqrt[4]{(n-1) \sum \lambda_k}$ & $\sqrt[4]{(n-1) \sum \lambda_k}$\\
-\code{prcomp}, \code{princomp} & \code{1} & $1$ & $\sqrt{(n-1) \sum_k \lambda_k}$\\
-\proglang{Canoco\,v3} & \code{-1, -2, -3} & $\sqrt{n-1}$ & $\sqrt{n}$\\
-\proglang{Canoco\,v4} & \code{-1, -2, -3} & $\sqrt{m}$ & $\sqrt{n}$\\
-\bottomrule
-\end{tabular}
-\end{table*}
-
-In this chapter, I used always centred data matrices.  In principle
-\textsc{svd} could be done with original, non-centred data, but
-there is no option for this in \code{rda}, because I think that
-non-centred analysis is dubious and I do not want to encourage its use
-(if you think you need it, you are certainly so good in programming
-that you can change that one line in \code{rda.default}).  I do
-think that the arguments for non-centred analysis are often twisted,
-and the method is not very good for its intended purpose, but there
-are better methods for finding fuzzy classes.  Normal, centred
-analysis moves the origin to the average of all species, and the
-dimensions describe differences from this average.  Non-centred
-analysis leaves the origin in the empty site with no species, and the
-first axis usually runs from the empty site to the average
-site. Second and third non-centred components are often very similar
-to first and second (etc.) centred components, and the best way to use
-non-centred analysis is to discard the first component and use only
-the rest. This is better done with directly centred analysis.
-
-
-\section{Weighted average and linear combination scores}
-
-Constrained ordination methods such as Constrained Correspondence
-Analysis (CCA) and Redundancy Analysis (RDA) produce two kind of site
-scores \cite{Braak86, Palmer93}:
-\begin{itemize}
-\item
-LC or Linear Combination Scores which are linear combinations of
-constraining variables.
-\item
-WA or Weighted Averages Scores which are such weighted averages of
-species scores that are as similar to LC scores as possible.
-\end{itemize}
-Many computer programs for constrained ordinations give only or
-primarily LC scores following recommendation of
-\citet{Palmer93}.  However, functions \code{cca} and \code{rda} in
-the \pkg{vegan} package use primarily WA scores. This chapter
-explains the reasons for this choice.
-
-Briefly, the main reasons are that
-\begin{itemize}
-\item LC scores \emph{are} linear combinations, so they give us only
-  the (scaled) environmental variables. This means that they are
-  independent of vegetation and cannot be found from the species
-  composition.  Moreover, identical combinations of environmental
-  variables give identical LC scores irrespective of vegetation.
-\item \citet{McCune97} has demonstrated that noisy environmental
-  variables result in deteriorated LC scores whereas WA scores
-  tolerate some errors in environmental variables.  All environmental
-  measurements contain some errors, and therefore it is safer to use
-  WA scores.
-\end{itemize}
-This article studies mainly the first point.  The users of
-\pkg{vegan} have a choice of either LC or WA (default) scores, but
-after reading this article, I believe that most of them do not want to
-use LC scores, because they are not what they were looking for in
-ordination.
-
-\subsection{LC Scores are Linear Combinations}
-
-Let us perform a simple CCA analysis using only two environmental
-variables so that we can see the constrained solution completely in
-two dimensions:
-\begin{Schunk}
-\begin{Sinput}
-> library(vegan)
-> data(varespec)
-> data(varechem)
-> orig <- cca(varespec ~ Al + K, varechem)
-\end{Sinput}
-\end{Schunk}
-Function \code{cca} in \pkg{vegan} uses WA scores as
-default. So we must specifically ask for LC scores
-(Fig. \ref{fig:ccalc}).
-\begin{Schunk}
-\begin{Sinput}
-> plot(orig, dis=c("lc","bp"))
-\end{Sinput}
-\end{Schunk}
-\begin{figure}
-\includegraphics{decision-vegan-007}
-\caption{LC scores in CCA of the original data.}
-\label{fig:ccalc}
-\end{figure}
-
-What would happen to linear combinations of LC scores if we shuffle
-the ordering of sites in species data?  Function \code{sample()} below
-shuffles the indices.
-\begin{Schunk}
-\begin{Sinput}
-> i <- sample(nrow(varespec))
-> shuff <- cca(varespec[i,] ~ Al + K, varechem)
-\end{Sinput}
-\end{Schunk}
-\begin{figure}
-\includegraphics{decision-vegan-009}
-\caption{LC scores of shuffled species data.}
-\label{fig:ccashuff}
-\end{figure}
-It seems that site scores are fairly similar, but oriented differently
-(Fig. \ref{fig:ccashuff}).  We can use Procrustes rotation to see how
-similar the site scores indeed are (Fig. \ref{fig:ccaproc}).
-\begin{Schunk}
-\begin{Sinput}
-> plot(procrustes(scores(orig, dis="lc"), 
-                  scores(shuff, dis="lc")))
-\end{Sinput}
-\end{Schunk}
-\begin{figure}
-\includegraphics{decision-vegan-011}
-\caption{Procrustes rotation of LC scores from CCA of original and shuffled data.}
-\label{fig:ccaproc}
-\end{figure}
-There is a small difference, but this will disappear if we use
-Redundancy Analysis (RDA) instead of CCA
-(Fig. \ref{fig:rdaproc}). Here we use a new shuffling as well.
-\begin{Schunk}
-\begin{Sinput}
-> tmp1 <- rda(varespec ~ Al + K, varechem)
-> i <- sample(nrow(varespec)) # Different shuffling
-> tmp2 <- rda(varespec[i,] ~ Al + K, varechem)
-\end{Sinput}
-\end{Schunk}
-\begin{figure}
-\includegraphics{decision-vegan-013}
-\caption{Procrustes rotation of LC scores in RDA of the original and shuffled data.}
-\label{fig:rdaproc}
-\end{figure}
-
-LC scores indeed are linear combinations of constraints (environmental
-variables) and \emph{independent of species data}: You can
-shuffle your species data, or change the data completely, but the LC
-scores will be unchanged in RDA.  In CCA the LC scores are
-\emph{weighted} linear combinations with site totals of species data
-as weights. Shuffling species data in CCA changes the weights, and
-this can cause changes in LC scores.  The magnitude of changes depends
-on the variability of site totals.
-
-The original data and shuffled data differ in their goodness of
-fit:
-\begin{Schunk}
-\begin{Sinput}
-> orig
-\end{Sinput}
-\begin{Soutput}
-Call: cca(formula = varespec ~ Al + K, data =
-varechem)
-
-              Inertia Proportion Rank
-Total          2.0832     1.0000     
-Constrained    0.4760     0.2285    2
-Unconstrained  1.6072     0.7715   21
-Inertia is mean squared contingency coefficient 
-
-Eigenvalues for constrained axes:
-  CCA1   CCA2 
-0.3608 0.1152 
-
-Eigenvalues for unconstrained axes:
-   CA1    CA2    CA3    CA4    CA5    CA6    CA7 
-0.3748 0.2404 0.1970 0.1782 0.1521 0.1184 0.0836 
-   CA8 
-0.0757 
-(Showed only 8 of all 21 unconstrained eigenvalues)
-\end{Soutput}
-\begin{Sinput}
-> shuff
-\end{Sinput}
-\begin{Soutput}
-Call: cca(formula = varespec[i, ] ~ Al + K, data
-= varechem)
-
-              Inertia Proportion Rank
-Total         2.08320    1.00000     
-Constrained   0.15850    0.07608    2
-Unconstrained 1.92470    0.92392   21
-Inertia is mean squared contingency coefficient 
-
-Eigenvalues for constrained axes:
-   CCA1    CCA2 
-0.12178 0.03672 
-
-Eigenvalues for unconstrained axes:
-   CA1    CA2    CA3    CA4    CA5    CA6    CA7 
-0.5038 0.3395 0.1960 0.1893 0.1573 0.1214 0.1069 
-   CA8 
-0.0792 
-(Showed only 8 of all 21 unconstrained eigenvalues)
-\end{Soutput}
-\end{Schunk}
-Similarly their WA scores will be (probably) very different
-(Fig. \ref{fig:ccawa}).
-\begin{figure}
-\includegraphics{decision-vegan-015}
-\caption{Procrustes rotation of WA scores of CCA with the original and
-  shuffled data.}
-\label{fig:ccawa}
-\end{figure}
-
-The example used only two environmental variables so that we can
-easily plot all constrained axes.  With a larger number of
-environmental variables the full configuration remains similarly
-unchanged, but its orientation may change, so that two-dimensional
-projections look different.  In the full space, the differences should
-remain within numerical accuracy:
-\begin{Schunk}
-\begin{Sinput}
-> tmp1 <- rda(varespec ~ ., varechem)
-> tmp2 <- rda(varespec[i,] ~ ., varechem)
-> proc <- procrustes(scores(tmp1, dis="lc", choi=1:14), 
-                     scores(tmp2, dis="lc", choi=1:14))
-> max(residuals(proc))
-\end{Sinput}
-\begin{Soutput}
-[1] 4.392963e-14
-\end{Soutput}
-\end{Schunk}
-In \code{cca} the difference would be somewhat larger than now
-observed 4.393e-14 because site
-weights used for environmental variables are shuffled with the species
-data.
-
-\subsection{Factor constraints}
-
-It seems that users often get confused when they perform constrained
-analysis using  only one factor (class variable) as constraint.  The
-following example uses the classical dune meadow data \cite{Jongman87}:
-\begin{Schunk}
-\begin{Sinput}
-> data(dune)
-> data(dune.env)
-> orig <- cca(dune ~ Moisture, dune.env)
-\end{Sinput}
-\end{Schunk}
-When the results are plotted using LC scores, sample plots fall only
-in four alternative positions (Fig. \ref{fig:factorlc}).
-\begin{figure}
-\includegraphics{decision-vegan-018}
-\caption{LC scores of the dune meadow data using only one factor as a
-  constraint.}
-\label{fig:factorlc}
-\end{figure}
-In the previous chapter we saw that this happens because LC scores
-\emph{are} the environmental variables, and they can be distinct only
-if the environmental variables are distinct.  However, normally the user
-would like to see how well the environmental variables separate the
-vegetation, or inversely, how we could use the vegetation to
-discriminate the environmental conditions.  For this purpose we should
-plot WA scores, or LC scores and WA scores together:  The LC scores
-show where the site \emph{should} be, the WA scores shows where the
-site \emph{is}.
-
-Function \code{ordispider} adds line segments to connect each WA
-score with the corresponding LC (Fig.  \ref{fig:walcspider}).
-\begin{Schunk}
-\begin{Sinput}
-> plot(orig, display="wa", type="points")
-> ordispider(orig, col="red")
-> text(orig, dis="cn", col="blue")
-\end{Sinput}
-\end{Schunk}
-\begin{figure}
-\includegraphics{decision-vegan-020}
-\caption{A ``spider plot'' connecting WA scores to corresponding LC
-  scores. The shorter the web segments, the better the ordination.}
-\label{fig:walcspider}
-\end{figure}
-This is the standard way of displaying results of discriminant
-analysis, too.  Moisture classes \code{1} and \code{2} seem to be
-overlapping, and cannot be completely separated by their
-vegetation. Other classes are more distinct, but there seems to be a
-clear arc effect or a ``horseshoe'' despite using CCA.
-
-\subsection{Conclusion}
-
-LC scores are only the (weighted and scaled) constraints and
-independent of vegetation. If you plot them, you plot only your
-environmental variables. WA scores are based on vegetation data but
-are constrained to be as similar to the LC scores as only
-possible. Therefore \pkg{vegan} calls LC scores as
-\code{constraints} and WA scores as \code{site scores}, and uses
-primarily WA scores in plotting.  However, the user makes the ultimate
-choice, since both scores are available.
-
-\bibliography{vegan}
-
-\end{document}
diff --git a/vignettes/diversity-vegan.tex b/vignettes/diversity-vegan.tex
deleted file mode 100644
index 0c8195f..0000000
--- a/vignettes/diversity-vegan.tex
+++ /dev/null
@@ -1,964 +0,0 @@
-% -*- mode: noweb; noweb-default-code-mode: R-mode; -*-
-%\VignetteIndexEntry{Diversity analysis in vegan}
-\documentclass[a4paper,10pt,twocolumn]{article}
-\usepackage{vegan} %% vegan setup
-
-%% TODO: SSarrhenius, adipart, beals update, betadisper
-%% expansion (+ permutest), contribdiv, eventstar, multipart, refer to
-%% FD, check Kindt reference to specaccum, check estimateR ref
-
-\title{Vegan: ecological diversity} \author{Jari Oksanen} 
-
-\date{\footnotesize{
-  processed with vegan 2.3-1
-  in R Under development (unstable) (2015-09-24 r69424) on \today}}
-
-%% need no \usepackage{Sweave}
-\begin{document}
-\bibliographystyle{jss}
-
-
-
-\maketitle
-\begin{abstract} 
-  This document explains diversity related methods in
-  \pkg{vegan}. The methods are briefly described, and the equations
-  used them are given often in more detail than in their help
-  pages. The methods discussed include common diversity indices and
-  rarefaction, families of diversity indices, species abundance
-  models, species accumulation models and beta diversity, extrapolated
-  richness and probability of being a member of the species pool. The
-  document is still incomplete and does not cover all diversity
-  methods in \pkg{vegan}.
-\end{abstract}
-\tableofcontents
-
-
-\noindent The \pkg{vegan} package has two major components:
-multivariate analysis (mainly ordination), and methods for diversity
-analysis of ecological communities.  This document gives an
-introduction to the latter.  Ordination methods are covered in other
-documents.  Many of the diversity functions were written by Roeland
-Kindt, Bob O'Hara and P{\'e}ter S{\'o}lymos.
-
-Most diversity methods assume that data are counts of individuals.
-The methods are used with other data types, and some people argue that
-biomass or cover are more adequate than counts of individuals of
-variable sizes.  However, this document mainly uses a data set with
-counts: stem counts of trees on $1$\,ha plots in the Barro Colorado
-Island.  The following steps make these data available for the
-document:
-\begin{Schunk}
-\begin{Sinput}
-> library(vegan)
-> data(BCI)
-\end{Sinput}
-\end{Schunk}
-
-\section{Diversity indices}
-
-Function \code{diversity} finds the most commonly used diversity
-indices \citep{Hill73number}:
-\begin{align}
-H &= - \sum_{i=1}^S p_i \log_b  p_i & \text{Shannon--Weaver}\\
-D_1 &= 1 - \sum_{i=1}^S p_i^2  &\text{Simpson}\\
-D_2 &= \frac{1}{\sum_{i=1}^S p_i^2}  &\text{inverse Simpson}\,,
-\end{align}
-where $p_i$ is the proportion of species $i$, and $S$ is the number of
-species so that $\sum_{i=1}^S p_i = 1$, and $b$ is the base of the
-logarithm.  It is most common to use natural logarithms (and then we
-mark index as $H'$), but $b=2$ has
-theoretical justification. The default is to use natural logarithms.
-Shannon index is calculated with:
-\begin{Schunk}
-\begin{Sinput}
-> H <- diversity(BCI)
-\end{Sinput}
-\end{Schunk}
-which finds diversity indices for all sites.
-
-\pkg{Vegan} does not have indices for evenness (equitability), but
-the most common of these, Pielou's evenness $J = H'/\log(S)$ is easily
-found as:
-\begin{Schunk}
-\begin{Sinput}
-> J <- H/log(specnumber(BCI))
-\end{Sinput}
-\end{Schunk}
-where \code{specnumber} is a simple \pkg{vegan} function to find
-the numbers of species.
-
-\pkg{vegan} also can estimate series of R\'{e}nyi and Tsallis
-diversities. R{\'e}nyi diversity of order $a$ is \citep{Hill73number}:
-\begin{equation}
-H_a = \frac{1}{1-a} \log \sum_{i=1}^S p_i^a \,,
-\end{equation}
-and the corresponding Hill number is $N_a = \exp(H_a)$.  Many common
-diversity indices are special cases of Hill numbers: $N_0 = S$, $N_1 =
-\exp(H')$, $N_2 = D_2$, and $N_\infty = 1/(\max p_i)$. The
-corresponding R\'{e}nyi diversities are $H_0 = \log(S)$, $H_1 = H'$, $H_2 =
-- \log(\sum p_i^2)$, and $H_\infty = - \log(\max p_i)$.  
-Tsallis diversity of order $q$ is \citep{Tothmeresz95}:
-\begin{equation}
-  H_q = \frac{1}{q-1} \left(1 - \sum_{i=1}^S p^q \right) \, .
-\end{equation}
-These correspond to common diversity indices: $H_0 = S-1$, $H_1 = H'$,
-and $H_2 = D_1$, and can be converted to Hill numbers:
-\begin{equation}
-  N_q = (1 - (q-1) H_q )^\frac{1}{1-q} \, .
-\end{equation}
-
-We select a random subset of five sites for R\'{e}nyi diversities:
-\begin{Schunk}
-\begin{Sinput}
-> k <- sample(nrow(BCI), 6)
-> R <- renyi(BCI[k,])
-\end{Sinput}
-\end{Schunk}
-We can really regard a site more diverse if all of its R\'{e}nyi
-diversities are higher than in another site.  We can inspect this
-graphically using the standard \code{plot} function for the
-\code{renyi} result (Fig.~\ref{fig:renyi}).
-\begin{figure}
-\includegraphics{diversity-vegan-006}
-\caption{R\'{e}nyi diversities in six randomly selected plots. The plot
-  uses Trellis graphics with a separate panel for each site. The dots
-  show the values for sites, and the lines the extremes and median in
-  the data set.}
-\label{fig:renyi}
-\end{figure}
-
-Finally, the $\alpha$ parameter of Fisher's log-series can be used as
-a diversity index \citep{FisherEtal43}:
-\begin{Schunk}
-\begin{Sinput}
-> alpha <- fisher.alpha(BCI)
-\end{Sinput}
-\end{Schunk}
-
-\section{Rarefaction}
-
-Species richness increases with sample size, and differences in
-richness actually may be caused by differences in sample size.  To
-solve this problem, we may try to rarefy species richness to the same
-number of individuals.  Expected number of species in a community
-rarefied from $N$ to $n$ individuals is \citep{Hurlbert71}:
-\begin{equation}
-\label{eq:rare}
-\hat S_n = \sum_{i=1}^S (1 - q_i)\,, \quad\text{where }  q_i =
-\frac{{N-x_i \choose n}}{{N \choose n}} \,.
-\end{equation}
-Here $x_i$ is the count of species $i$, and ${N \choose n}$ is the
-binomial coefficient, or the number of ways we can choose $n$ from
-$N$, and $q_i$ give the probabilities that species $i$ does \emph{not} occur in a
-sample of size $n$.  This is positive only when $N-x_i \ge n$, but for
-other cases $q_i = 0$ or the species is sure to occur in the sample.
-The variance of rarefied richness is \citep{HeckEtal75}:
-\begin{multline}
-\label{eq:rarevar}
-s^2 = q_i (1-q_i)  \\ + 2 \sum_{i=1}^S \sum_{j>i} \left[ \frac{{N- x_i - x_j
-    \choose n}}{ {N
-    \choose n}} - q_i q_j\right] \,.
-\end{multline}
-Equation~\ref{eq:rarevar} actually is of the same form as the variance
-of sum of correlated variables:
-\begin{equation}
-\VAR \left(\sum x_i \right) = \sum \VAR (x_i) + 2 \sum_{i=1}^S
-\sum_{j>i} \COV (x_i, x_j) \,.
-\end{equation}
-
-The number of stems per hectare varies in our
-data set:
-\begin{Schunk}
-\begin{Sinput}
-> quantile(rowSums(BCI))
-\end{Sinput}
-\begin{Soutput}
-   0%   25%   50%   75%  100% 
-340.0 409.0 428.0 443.5 601.0 
-\end{Soutput}
-\end{Schunk}
-To express richness for the same number of individuals, we can use:
-\begin{Schunk}
-\begin{Sinput}
-> Srar <- rarefy(BCI, min(rowSums(BCI)))
-\end{Sinput}
-\end{Schunk}
-Rarefaction curves often are seen as an objective solution for
-comparing species richness with different sample sizes.  However, rank
-orders typically differ among different rarefaction sample sizes,
-rarefaction curves can cross.
-
-As an extreme case we may rarefy sample size to two individuals:
-\begin{Schunk}
-\begin{Sinput}
-> S2 <- rarefy(BCI, 2)
-\end{Sinput}
-\end{Schunk}
-This will not give equal rank order with the previous rarefaction
-richness:
-\begin{Schunk}
-\begin{Sinput}
-> all(rank(Srar) == rank(S2))
-\end{Sinput}
-\begin{Soutput}
-[1] FALSE
-\end{Soutput}
-\end{Schunk}
-Moreover, the rarefied richness for two individuals is a finite
-sample variant of Simpson's diversity index \citep{Hurlbert71}\,--\,or
-more precisely of $D_1 + 1$, and these two are almost identical in
-BCI:
-\begin{Schunk}
-\begin{Sinput}
-> range(diversity(BCI, "simp") - (S2 -1))
-\end{Sinput}
-\begin{Soutput}
-[1] -0.002868298 -0.001330663
-\end{Soutput}
-\end{Schunk}
-Rarefaction is sometimes presented as an ecologically meaningful
-alternative to dubious diversity indices \citep{Hurlbert71}, but the
-differences really seem to be small.
-
-\section{Taxonomic and functional diversity}
-
-Simple diversity indices only consider species identity: all different
-species are equally different. In contrast, taxonomic and functional
-diversity indices judge the differences of species. Taxonomic and
-functional diversities are used in different fields of science, but
-they really have very similar reasoning, and either could be used
-either with taxonomic or functional traits of species.
-
-\subsection{Taxonomic diversity: average distance of traits}
-
-The two basic indices are called taxonomic diversity $\Delta$ and
-taxonomic distinctness $\Delta^*$ \citep{ClarkeWarwick98}:
-\begin{align}
-  \Delta &= \frac{\sum \sum_{i<j} \omega_{ij} x_i x_j}{n (n-1) / 2}\\
-\Delta^* &= \frac{\sum \sum_{i<j} \omega_{ij} x_i x_j}{\sum \sum_{i<j}
-  x_i x_j} \,.
-\end{align}
-These equations give the index values for a single site, and summation
-goes over species $i$ and $j$, and $\omega$ are the taxonomic
-distances among taxa, $x$ are species abundances, and $n$ is the total
-abundance for a site.  With presence--absence data, both indices
-reduce to the same index called $\Delta^+$, and for this it is
-possible to estimate standard deviation. There are two indices
-derived from $\Delta^+$: it can be multiplied with species
-richness\footnote{This text normally uses upper case letter $S$ for
-  species richness, but lower case $s$ is used here in accordance with
-  the original papers on taxonomic diversity}
-to give $s \Delta^+$, or it can be used to estimate an index of
-variation in taxonomic distinctness $\Lambda^+$ \citep{ClarkeWarwick01}:
-\begin{equation}
-  \Lambda^+ = \frac{\sum \sum_{i<j} \omega_{ij}^2}{n (n-1) / 2} -
-  (\Delta^+)^2 \,.
-\end{equation}
-
-We still need the taxonomic differences among species ($\omega$) to
-calculate the indices. These can be any distance structure among
-species, but usually it is found from established hierarchic
-taxonomy. Typical coding is that differences among species in the same
-genus is $1$, among the same family it is $2$ etc. However, the
-taxonomic differences are scaled to maximum $100$ for easier
-comparison between different data sets and taxonomies. Alternatively,
-it is possible to scale steps between taxonomic level proportional to
-the reduction in the number of categories \citep{ClarkeWarwick99}: if
-almost all genera have only one species, it does not make a great
-difference if two individuals belong to a different species or to a
-different genus.
-
-Function \code{taxondive} implements indices of taxonomic diversity,
-and \code{taxa2dist} can be used to convert classification tables to
-taxonomic distances either with constant or variable step lengths
-between successive categories. There is no taxonomic table for the BCI
-data in \pkg{vegan}\footnote{Actually I made such a classification,
-  but taxonomic differences proved to be of little use in the Barro
-  Colorado data: they only singled out sites with Monocots (palm
-  trees) in the data.}
-but there is such a table for the Dune meadow data (Fig.~\ref{fig:taxondive}):
-\begin{Schunk}
-\begin{Sinput}
-> data(dune)
-> data(dune.taxon)
-> taxdis <- taxa2dist(dune.taxon, varstep=TRUE)
-> mod <- taxondive(dune, taxdis)
-\end{Sinput}
-\end{Schunk}
-\begin{figure}
-\includegraphics{diversity-vegan-014}
-\caption{Taxonomic diversity $\Delta^+$ for the dune meadow data. The
-  points are diversity values of single sites, and the funnel is their
-  approximate confidence intervals ($2 \times$ standard error).}
-\label{fig:taxondive}
-\end{figure}
-
-\subsection{Functional diversity: the height of trait tree}
-
-In taxonomic diversity the primary data were taxonomic trees which
-were transformed to pairwise distances among species. In functional
-diversity the primary data are species traits which are translated to
-pairwise distances among species and then to clustering trees of
-species traits. The argument for using trees is that in this way a
-single deviant species will have a small influence, since its
-difference is evaluated only once instead of evaluating its distance
-to all other species \citep{PetcheyGaston06}.
-
-Function \code{treedive} implements functional diversity defined as
-the total branch length in a trait dendrogram connecting all species,
-but excluding the unnecessary root segments of the tree
-\citep{PetcheyGaston02, PetcheyGaston06}.  The example uses the
-taxonomic distances of the previous chapter. These are first converted
-to a hierarchic clustering (which actually were their original form
-before \code{taxa2dist} converted them into distances)
-\begin{Schunk}
-\begin{Sinput}
-> tr <- hclust(taxdis, "aver")
-> mod <- treedive(dune, tr)
-\end{Sinput}
-\end{Schunk}
-
-\section{Species abundance models}
-
-Diversity indices may be regarded as variance measures of species
-abundance distribution.  We may wish to inspect abundance
-distributions more directly.  \pkg{Vegan} has functions for
-Fisher's log-series and Preston's log-normal models, and in addition
-several models for species abundance distribution.
-
-\subsection{Fisher and Preston}
-
-In Fisher's log-series, the expected number of species $\hat f$ with $n$
-individuals is \citep{FisherEtal43}:
-\begin{equation}
-\hat f_n = \frac{\alpha x^n}{n} \,,
-\end{equation}
-where $\alpha$ is the diversity parameter, and $x$ is a nuisance
-parameter defined by $\alpha$ and total number
-of individuals $N$ in the site, $x = N/(N-\alpha)$.  Fisher's
-log-series for a randomly selected plot is (Fig.~\ref{fig:fisher}):
-\begin{Schunk}
-\begin{Sinput}
-> k <- sample(nrow(BCI), 1)
-> fish <- fisherfit(BCI[k,])
-> fish
-\end{Sinput}
-\begin{Soutput}
-Fisher log series model
-No. of species: 84 
-Fisher alpha:   31.41425 
-\end{Soutput}
-\end{Schunk}
-\begin{figure}
-\includegraphics{diversity-vegan-017}
-\caption{Fisher's log-series fitted to one randomly selected site
-  (39).}
-\label{fig:fisher}
-\end{figure}
-We already saw $\alpha$ as a diversity index.
-
-Preston's log-normal model is the main challenger to Fisher's
-log-series \citep{Preston48}.  Instead of plotting species by
-frequencies, it bins species into frequency classes of increasing
-sizes.  As a result, upper bins with high range of frequencies become
-more common, and sometimes the result looks similar to Gaussian
-distribution truncated at the left.
-
-There are two alternative functions for the log-normal model:
-\code{prestonfit} and \code{prestondistr}.  Function \code{prestonfit}
-uses traditionally binning approach, and is burdened with arbitrary
-choices of binning limits and treatment of ties. It seems that Preston
-split ties between adjacent octaves: only half of the species observed
-once were in the first octave, and half were transferred to the next
-octave, and the same for all species at the octave limits occurring 2,
-4, 8, 16\ldots times \citep{WilliamsonGaston05}. Function
-\code{prestonfit} can either split the ties or keep all limit cases in
-the lower octave.  Function \code{prestondistr} directly maximizes
-truncated log-normal likelihood without binning data, and it is the
-recommended alternative.  Log-normal models usually fit poorly to the
-BCI data, but here our random plot (number 39):
-\begin{Schunk}
-\begin{Sinput}
-> prestondistr(BCI[k,])
-\end{Sinput}
-\begin{Soutput}
-Preston lognormal model
-Method: maximized likelihood to log2 abundances 
-No. of species: 84 
-
-      mode      width         S0 
- 0.8368316  1.7642751 22.3175690 
-
-Frequencies by Octave
-                0        1        2        3        4
-Observed 15.50000 24.50000 22.00000 11.50000 5.500000
-Fitted   19.94312 22.22233 17.95813 10.52465 4.473314
-                5         6          7
-Observed 2.000000 2.0000000 1.00000000
-Fitted   1.378879 0.3082464 0.04997411
-\end{Soutput}
-\end{Schunk}
-
-\subsection{Ranked abundance distribution}
-
-An alternative approach to species abundance distribution is to plot
-logarithmic abundances in decreasing order, or against ranks of
-species \citep{Whittaker65}.  These are known as ranked abundance
-distribution curves, species abundance curves, dominance--diversity
-curves or Whittaker plots.  Function \code{radfit} fits some of the
-most popular models \citep{Bastow91} using maximum likelihood
-estimation:
-\begin{align}
-\hat a_r &= \frac{N}{S} \sum_{k=r}^S \frac{1}{k} &\text{brokenstick}\\
-\hat a_r &= N \alpha (1-\alpha)^{r-1} & \text{preemption} \\
-\hat a_r &= \exp \left[\log (\mu) + \log (\sigma) \Phi \right]
-&\text{log-normal}\\
-\hat a_r &= N \hat p_1 r^\gamma &\text{Zipf}\\
-\hat a_r &= N c (r + \beta)^\gamma &\text{Zipf--Mandelbrot}
-\end{align}
-In all these, $\hat a_r$ is the expected abundance of species at rank $r$, $S$
-is the number of species, $N$ is the number of individuals, $\Phi$ is
-a standard normal function, $\hat p_1$ is the estimated proportion of
-the most abundant species, and $\alpha$, $\mu$, $\sigma$, $\gamma$,
-$\beta$ and $c$ are the estimated parameters in each model.
-
-It is customary to define the models for proportions $p_r$ instead of
-abundances $a_r$, but there is no reason for this, and \code{radfit}
-is able to work with the original abundance data.  We have count data,
-and the default Poisson error looks appropriate, and our example data
-set gives (Fig.~\ref{fig:rad}):
-\begin{Schunk}
-\begin{Sinput}
-> rad <- radfit(BCI[k,])
-> rad
-\end{Sinput}
-\begin{Soutput}
-RAD models, family poisson 
-No. of species 84, total abundance 424
-
-           par1     par2    par3     Deviance AIC     
-Null                                 178.3939 417.2015
-Preemption  0.06056                  177.9586 418.7661
-Lognormal   0.70123  1.388            41.0778 283.8853
-Zipf        0.20332 -1.0099            8.6417 251.4493
-Mandelbrot  0.26538 -1.0885  0.36401   7.4086 252.2162
-           BIC     
-Null       417.2015
-Preemption 421.1970
-Lognormal  288.7470
-Zipf       256.3109
-Mandelbrot 259.5086
-\end{Soutput}
-\end{Schunk}
-\begin{figure}
-\includegraphics{diversity-vegan-020}
-\caption{Ranked abundance distribution models for a random plot
-  (no. 39).  The best model has the lowest \textsc{aic}.}
-\label{fig:rad}
-\end{figure}
-
-Function \code{radfit} compares the models using alternatively
-Akaike's or Schwartz's Bayesian information criteria.  These are based
-on log-likelihood, but penalized by the number of estimated
-parameters.  The penalty per parameter is $2$ in \textsc{aic}, and
-$\log S$ in \textsc{bic}.  Brokenstick is regarded as a null model and
-has no estimated parameters in \pkg{vegan}.  Preemption model has
-one estimated parameter ($\alpha$), log-normal and Zipf models two
-($\mu, \sigma$, or $\hat p_1, \gamma$, resp.), and Zipf--Mandelbrot
-model has three ($c, \beta, \gamma$).
-
-Function \code{radfit} also works with data frames, and fits models
-for each site. It is curious that log-normal model rarely is the
-choice, although it generally is regarded as the canonical model, in
-particular in data sets like Barro Colorado tropical forests.
-
-\section{Species accumulation and beta diversity}
-
-Species accumulation models and species pool models study collections
-of sites, and their species richness, or try to estimate the number of
-unseen species.
-
-\subsection{Species accumulation models}
-
-Species accumulation models are similar to rarefaction: they study the
-accumulation of species when the number of sites increases.  There are
-several alternative methods, including accumulating sites in the order
-they happen to be, and repeated accumulation in random order.  In
-addition, there are three analytic models.  Rarefaction pools
-individuals together, and applies rarefaction equation (\ref{eq:rare})
-to these individuals.  Kindt's exact accumulator resembles rarefaction
-\citep{UglandEtal03}:
-\begin{multline}
-\label{eq:kindt}
-\hat S_n = \sum_{i=1}^S (1 - p_i), \,\quad \text{where }
-p_i = \frac{{N- f_i \choose n}}{{N \choose n}} \,,
-\end{multline}
-and $f_i$ is the frequency of species $i$.  Approximate variance
-estimator is:
-\begin{multline}
-\label{eq:kindtvar}
-s^2 = p_i (1 - p_i)  \\ + 2 \sum_{i=1}^S \sum_{j>i} \left( r_{ij}
-  \sqrt{p_i(1-p_i)} \sqrt{p_j (1-p_j)}\right) \,,
-\end{multline}
-where $r_{ij}$ is the correlation coefficient between species $i$ and
-$j$.  Both of these are unpublished: eq.~\ref{eq:kindt} was developed
-by Roeland Kindt, and eq.~\ref{eq:kindtvar} by Jari Oksanen. The third
-analytic method was suggested by \citet{Coleman82}:
-\begin{equation}
-\label{eq:cole}
-S_n = \sum_{i=1}^S (1 - p_i), \quad \text{where }  p_i = \left(1 -
-  \frac{1}{n}\right)^{f_i} \,,
-\end{equation}
-and the suggested variance is $s^2 = p_i (1-p_i)$ which ignores the
-covariance component.  In addition, eq.~\ref{eq:cole} does not
-properly handle sampling without replacement and underestimates the
-species accumulation curve.
-
-The recommended is Kindt's exact method (Fig.~\ref{fig:sac}):
-\begin{Schunk}
-\begin{Sinput}
-> sac <- specaccum(BCI)
-> plot(sac, ci.type="polygon", ci.col="yellow")
-\end{Sinput}
-\end{Schunk}
-\begin{figure}
-\includegraphics{diversity-vegan-022}
-\caption{Species accumulation curve for the BCI data; exact method.}
-\label{fig:sac}
-\end{figure}
-
-\subsection{Beta diversity}
-
-\citet{Whittaker60} divided diversity into various components. The
-best known are diversity in one spot that he called alpha diversity,
-and the diversity along gradients that he called beta diversity. The
-basic diversity indices are indices of alpha diversity. Beta diversity
-should be studied with respect to gradients \citep{Whittaker60}, but
-almost everybody understand that as a measure of general heterogeneity
-\citep{Tuomisto10a, Tuomisto10b}: how many more species do you have in
-a collection of sites compared to an average site.
-
-The best known index of beta diversity is based on the ratio of total
-number of species in a collection of sites $S$ and the average
-richness per one site $\bar \alpha$ \citep{Tuomisto10a}:
-\begin{equation}
-  \label{eq:beta}
-  \beta = S/\bar \alpha - 1 \,.
-\end{equation}
-Subtraction of one means that $\beta = 0$ when there are no excess
-species or no heterogeneity between sites. For this index, no specific
-functions are needed, but this index can be easily found with the help
-of \pkg{vegan} function \code{specnumber}:
-\begin{Schunk}
-\begin{Sinput}
-> ncol(BCI)/mean(specnumber(BCI)) - 1
-\end{Sinput}
-\begin{Soutput}
-[1] 1.478519
-\end{Soutput}
-\end{Schunk}
-
-The index of eq.~\ref{eq:beta} is problematic because $S$ increases
-with the number of sites even when sites are all subsets of the same
-community.  \citet{Whittaker60} noticed this, and suggested the index
-to be found from pairwise comparison of sites. If the number of shared
-species in two sites is $a$, and the numbers of species unique to each
-site are $b$ and $c$, then $\bar \alpha = (2a + b + c)/2$ and $S =
-a+b+c$, and index~\ref{eq:beta} can be expressed as:
-\begin{equation}
-  \label{eq:betabray}
-  \beta = \frac{a+b+c}{(2a+b+c)/2} - 1 = \frac{b+c}{2a+b+c} \,.
-\end{equation}
-This is the S{\o}rensen index of dissimilarity, and it can be found
-for all sites using \pkg{vegan} function \code{vegdist} with
-binary data:
-\begin{Schunk}
-\begin{Sinput}
-> beta <- vegdist(BCI, binary=TRUE)
-> mean(beta)
-\end{Sinput}
-\begin{Soutput}
-[1] 0.3399075
-\end{Soutput}
-\end{Schunk}
-
-There are many other definitions of beta diversity in addition to
-eq.~\ref{eq:beta}.  All commonly used indices can be found using
-\code{betadiver} \citep{KoleffEtal03}. The indices in \code{betadiver}
-can be referred to by subscript name, or index number:
-\begin{Schunk}
-\begin{Sinput}
-> betadiver(help=TRUE)
-\end{Sinput}
-\begin{Soutput}
-1 "w" = (b+c)/(2*a+b+c)
-2 "-1" = (b+c)/(2*a+b+c)
-3 "c" = (b+c)/2
-4 "wb" = b+c
-5 "r" = 2*b*c/((a+b+c)^2-2*b*c)
-6 "I" = log(2*a+b+c) - 2*a*log(2)/(2*a+b+c) -
-((a+b)*log(a+b) + (a+c)*log(a+c)) / (2*a+b+c)
-7 "e" = exp(log(2*a+b+c) - 2*a*log(2)/(2*a+b+c)
-- ((a+b)*log(a+b) + (a+c)*log(a+c)) /
-(2*a+b+c))-1
-8 "t" = (b+c)/(2*a+b+c)
-9 "me" = (b+c)/(2*a+b+c)
-10 "j" = a/(a+b+c)
-11 "sor" = 2*a/(2*a+b+c)
-12 "m" = (2*a+b+c)*(b+c)/(a+b+c)
-13 "-2" = pmin(b,c)/(pmax(b,c)+a)
-14 "co" = (a*c+a*b+2*b*c)/(2*(a+b)*(a+c))
-15 "cc" = (b+c)/(a+b+c)
-16 "g" = (b+c)/(a+b+c)
-17 "-3" = pmin(b,c)/(a+b+c)
-18 "l" = (b+c)/2
-19 "19" = 2*(b*c+1)/((a+b+c)^2+(a+b+c))
-20 "hk" = (b+c)/(2*a+b+c)
-21 "rlb" = a/(a+c)
-22 "sim" = pmin(b,c)/(pmin(b,c)+a)
-23 "gl" = 2*abs(b-c)/(2*a+b+c)
-24 "z" = (log(2)-log(2*a+b+c)+log(a+b+c))/log(2)
-\end{Soutput}
-\end{Schunk}
-Some of these indices are duplicates, and many of them are well known
-dissimilarity indices.
-One of the more interesting indices is based
-on the Arrhenius species--area model
-\begin{equation}
-  \label{eq:arrhenius}
-  \hat S = c X^z\,,
-\end{equation}
-where $X$ is the area (size) of the patch or site, and $c$ and $z$ are
-parameters. Parameter $c$ is uninteresting, but $z$ gives the
-steepness of the species area curve and is a measure of beta
-diversity. In islands typically  $z \approx 0.3$. This kind of
-islands can be regarded as subsets of the same community, indicating
-that we really should talk about gradient differences if $z \gtrapprox 0.3$. We
-can find the value of $z$ for a pair of plots using function
-\code{betadiver}:
-\begin{Schunk}
-\begin{Sinput}
-> z <- betadiver(BCI, "z")
-> quantile(z)
-\end{Sinput}
-\begin{Soutput}
-       0%       25%       50%       75%      100% 
-0.2732845 0.3895024 0.4191536 0.4537180 0.5906091 
-\end{Soutput}
-\end{Schunk}
-The size $X$ and parameter $c$ cancel out, and the index gives the
-estimate $z$ for any pair of sites.
-
-Function \code{betadisper} can be used to analyse beta diversities
-with respect to classes or factors \citep{Anderson06, AndersonEtal06}.
-There is no such classification available for the Barro Colorado
-Island data, and the example studies beta diversities in the
-management classes of the dune meadows (Fig.~\ref{fig:betadisper}):
-\begin{Schunk}
-\begin{Sinput}
-> data(dune)
-> data(dune.env)
-> z <- betadiver(dune, "z")
-> mod <- with(dune.env, betadisper(z, Management))
-> mod
-\end{Sinput}
-\begin{Soutput}
-	Homogeneity of multivariate dispersions
-
-Call: betadisper(d = z, group = Management)
-
-No. of Positive Eigenvalues: 12
-No. of Negative Eigenvalues: 7
-
-Average distance to median:
-    BF     HF     NM     SF 
-0.3080 0.2512 0.4406 0.3635 
-
-Eigenvalues for PCoA axes:
- PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7 
-1.6547 0.8870 0.5334 0.3744 0.2873 0.2245 0.1613 
- PCoA8 
-0.0810 
-\end{Soutput}
-\end{Schunk}
-\begin{figure}
-\includegraphics{diversity-vegan-028}
-\caption{Box plots of beta diversity measured as the average steepness
-  ($z$) of the species area curve in the Arrhenius model $S = cX^z$ in
-  Management classes of dune meadows.}
-\label{fig:betadisper}
-\end{figure}
-
-\section{Species pool}
-\subsection{Number of unseen species}
-
-Species accumulation models indicate that not all species were seen in
-any site.  These unseen species also belong to the species pool.
-Functions \code{specpool} and \code{estimateR} implement some
-methods of estimating the number of unseen species.  Function
-\code{specpool} studies a collection of sites, and
-\code{estimateR} works with counts of individuals, and can be used
-with a single site.  Both functions assume that the number of unseen
-species is related to the number of rare species, or species seen only
-once or twice.
-
-The incidence-based functions group species by their number of
-occurrences $f_i = f_0, f_1, \ldots, f_N$, where $f$ is the number of
-species occuring in exactly $i$ sites in the data: $f_N$ is the number
-of species occurring on every $N$ site, $f_1$ the number of species
-occurring once, and $f_0$ the number of species in the species pool
-but not found in the sample. The total number of species in the pool
-$S_p$ is
-\begin{equation}
-S_p = \sum_{i=0}^N f_i = f_0+ S_o \,,
-\end{equation}
-where $S_o = \sum_{i>0} f_i$ is the observed number of species.  The
-sampling proportion $i/N$ is an estimate for the commonness of the
-species in the community. When species is present in the community but
-not in the sample, $i=0$ is an obvious under-estimate, and
-consequently, for values $i>0$ the species commonness is
-over-estimated \citep{Good53}. The models for the pool size estimate
-the number of species missing in the sample $f_0$.
-
-Function \code{specpool} implements the following models to estimate
-the number of missing species $f_0$. Chao estimator  is \citep{Chao87, ChiuEtal14}:
-\begin{equation}
-\label{eq:chao}
-\hat f_0 = \begin{cases} 
-    \frac{f_1^2}{2 f_2} \frac{N-1}{N} &\text{if } f_2 > 0 \\
-\frac{f_1 (f_1 -1)}{2}  \frac{N-1}{N} & \text{if } f_2 = 0 \,.
-\end{cases}
-\end{equation}
-The latter case for $f_2=0$ is known as the bias-corrected
-form. \citet{ChiuEtal14} introduced the small-sample correction term
-$\frac{N}{N-1}$, but it was not originally used \citep{Chao87}.
-
-The first and second order jackknife estimators are
-\citep{SmithVanBelle84}:
-\begin{align}
-\hat f_0 &=  f_1 \frac{N-1}{N}  \\ 
-\hat f_0 & =  f_1 \frac{2N-3}{N}  + f_2 \frac{(N-2)^2}{N(N-1)} \,.
-\end{align}
-The boostrap estimator is \citep{SmithVanBelle84}:
-\begin{equation}
-\hat f_0 =  \sum_{i=1}^{S_o} (1-p_i)^N \,.
-\end{equation}
-The idea in jackknife seems to be that we missed about as many species
-as we saw only once, and the idea in bootstrap that if we repeat
-sampling (with replacement) from the same data, we miss as many
-species as we missed originally.
-
-The variance estimaters only concern the estimated number of missing
-species $\hat f_0$, although they are often expressed as they would
-apply to the pool size $S_p$; this is only true if we assume that
-$\VAR(S_o) = 0$.  The variance of the Chao estimate is \citep{ChiuEtal14}:
-\begin{multline}
-\label{eq:var-chao-basic}
-\VAR(\hat f_0) = f_1 \left(A^2 \frac{G^3}{4} + A^2 G^2 + A \frac{G}{2} \right),\\
-\text{where } A = \frac{N-1}{N}\;\text{and } G = \frac{f_1}{f_2} \,.
-\end{multline}
-%% The variance of bias-corrected Chao estimate can be approximated by
-%% replacing the terms of eq.~\ref{eq:var-chao-basic} with the
-%% corresponding terms of the bias-correcter form of in eq.~\ref{eq:chao}:
-%% \begin{multline}
-%% \label{eq:var-chao-bc}
-%% s^2 = A \frac{f_1(f_1-1)}{2} + A^2 \frac{f_1(2 f_1+1)^2}{(f_2+1)^2}\\
-%%  + A^2 \frac{f_1^2 f_2 (f_1 -1)^2}{4 (f_2 + 1)^4}
-%% \end{multline}
-For the bias-corrected form of eq.~\ref{eq:chao}  (case $f_2 = 0$), the variance is
-\citep[who omit small-sample correction in some terms]{ChiuEtal14}:
-\begin{multline}
-\label{eq:var-chao-bc0}
-\VAR(\hat f_0) = \tfrac{1}{4} A^2 f_1 (2f_1 -1)^2 + \tfrac{1}{2} A f_1
-(f_1-1) \\- \tfrac{1}{4}A^2 \frac{f_1^4}{S_p} \,.
-\end{multline}
-
-The variance of the first-order jackknife is based on the number of
-``singletons'' $r$ (species occurring only once in the data) in sample
-plots \citep{SmithVanBelle84}:
-\begin{equation}
-\VAR(\hat f_0) = \left(\sum_{i=1}^N r_i^2 - \frac{f_1}{N}\right)
-\frac{N-1}{N} \,.
-\end{equation}
-Variance of the second-order jackknife is not evaluated in
-\code{specpool} (but contributions are welcome).
-
-The variance of bootstrap estimator is\citep{SmithVanBelle84}:
-\begin{multline}
-\VAR(\hat f_0) = \sum_{i=1}^{S_o} q_i (1-q_i)  \\ +2 \sum_{i \neq
-  j}^{S_o} \left[(Z_{ij}/N)^N - q_i q_j \right] \\
-\text{where } q_i = (1-p_i)^N \, ,
-\end{multline}
-and $Z_{ij}$ is the number of sites where both species are absent.
-
-The extrapolated richness values for the whole BCI data are:
-\begin{Schunk}
-\begin{Sinput}
-> specpool(BCI)
-\end{Sinput}
-\begin{Soutput}
-    Species     chao chao.se  jack1 jack1.se    jack2
-All     225 236.3732 6.54361 245.58 5.650522 247.8722
-        boot  boot.se  n
-All 235.6862 3.468888 50
-\end{Soutput}
-\end{Schunk}
-If the estimation of pool size really works, we should get the same
-values of estimated richness if we take a random subset of a half of
-the plots (but this is rarely true):
-\begin{Schunk}
-\begin{Sinput}
-> s <- sample(nrow(BCI), 25)
-> specpool(BCI[s,])
-\end{Sinput}
-\begin{Soutput}
-    Species     chao  chao.se  jack1 jack1.se    jack2
-All     209 237.9477 14.59852 235.88 7.518298 250.1783
-        boot  boot.se  n
-All 221.2935 4.213909 25
-\end{Soutput}
-\end{Schunk}
-
-\subsection{Pool size from a single site}
-
-The \code{specpool} function needs a collection of sites, but there
-are some methods that estimate the number of unseen species for each
-single site.  These functions need counts of individuals, and species
-seen only once or twice, or other rare species, take the place of
-species with low frequencies.  Function \code{estimateR} implements
-two of these methods:
-\begin{Schunk}
-\begin{Sinput}
-> estimateR(BCI[k,])
-\end{Sinput}
-\begin{Soutput}
-                 39
-S.obs     84.000000
-S.chao1  108.473684
-se.chao1  11.583650
-S.ACE    116.493294
-se.ACE     5.688117
-\end{Soutput}
-\end{Schunk}
-In abundance based models $a_i$ denotes the number of species with $i$
-individuals, and takes the place of $f_i$ of previous models.
-Chao's method is similar as the bias-corrected model
-eq.~\ref{eq:chao} \citep{Chao87, ChiuEtal14}:
-\begin{equation}
-  \label{eq:chao-bc}
-  S_p = S_o + \frac{a_1 (a_1 - 1)}{2 (a_2 + 1)}\,.
-\end{equation}
-When $f_2=0$, eq.~\ref{eq:chao-bc} reduces to the bias-corrected form
-of eq.~\ref{eq:chao}, but quantitative estimators are based on
-abundances and do not use small-sample correction. This is not usually
-needed because sample sizes are total numbers of individuals, and
-these are usually high, unlike in frequency based models, where the
-sample size is the number of sites \citep{ChiuEtal14}. 
-
-A commonly used approximate variance estimator of eq.~\ref{eq:chao-bc} is:
-\begin{multline}
-  \label{eq:var-chao-bc}
- s^2 = \frac{a_1(a_1-1)}{2} + \frac{a_1(2 a_1+1)^2}{(a_2+1)^2}\\
-  + \frac{a_1^2 a_2 (a_1 -1)^2}{4 (a_2 + 1)^4} \,.
-\end{multline}
-However, \pkg{vegan} does not use this, but instead the following more
-exact form which was directly derived from eq.~\ref{eq:chao-bc}
-following \citet[web appendix]{ChiuEtal14}:
-\begin{multline}
-  s^2 = \frac{1}{4} \frac{1}{(a_2+1)^4 S_p} [a_1 (S_p a_1^3
-      a_2 + 4 S_p a_1^2 a_2^2 \\+  2 S_p a_1 a_2^3 + 6 S_p a_1^2 a_2 + 2 S_p
-      a_1 a_2^2 -2 S_p a_2^3 \\+ 4 S_p a_1^2 + S_p a_1 a_2 -5 S_p a_2^2 - a_1^3 - 2
-      a_1^2 a_2\\ - a_1 a_2^2 - 2 S_p a_1 - 4 S_p a_2 - S_p ) ]\,.
-\end{multline}
-The variance estimators only concern the number of unseen species like previously.
-
-The \textsc{ace} is estimator is defined as \citep{OHara05}:
-\begin{equation}
-\begin{split}
-S_p &= S_\mathrm{abund} + \frac{S_\mathrm{rare}}{C_\mathrm{ACE}} +
-\frac{a_1}{C_\mathrm{ACE}} \gamma^2\, , \quad \text{where}\\
-C_\mathrm{ACE} &= 1 - \frac{a_1}{N_\mathrm{rare}}\\
-\gamma^2 &= \frac{S_\mathrm{rare}}{C_\mathrm{ACE}} \sum_{i=1}^{10} i
-(i-1) a_1 \frac{N_\mathrm{rare} - 1}{N_\mathrm{rare}}\,.
-\end{split}
-\end{equation}
-Now $a_1$ takes the place of $f_1$ above, and means the number of
-species with only one individual.
-Here $S_\mathrm{abund}$ and $S_\mathrm{rare}$ are the numbers of
-species of abundant and rare species, with an arbitrary upper limit of
-10 individuals for a rare species, and $N_\mathrm{rare}$ is the total
-number of individuals in rare species. The variance estimator uses
-iterative solution, and it is best interpreted from the source code or
-following \citet{OHara05}.
-
-The pool size
-is estimated separately for each site, but if input is a data frame,
-each site will be analysed.
-
-If log-normal abundance model is appropriate, it can be used to
-estimate the pool size.  Log-normal model has a finite number of
-species which can be found integrating the log-normal:
-\begin{equation}
-S_p = S_\mu \sigma \sqrt{2 \pi} \,,
-\end{equation}
-where $S_\mu$ is the modal height or the expected number of species at
-maximum (at $\mu$), and $\sigma$ is the width.  Function
-\code{veiledspec} estimates this integral from a model fitted either
-with \code{prestondistr} or \code{prestonfit}, and fits the latter
-if raw site data are given.  Log-normal model may fit poorly, but we
-can try:
-\begin{Schunk}
-\begin{Sinput}
-> veiledspec(prestondistr(BCI[k,]))
-\end{Sinput}
-\begin{Soutput}
-Extrapolated     Observed       Veiled 
-    98.69681     84.00000     14.69681 
-\end{Soutput}
-\begin{Sinput}
-> veiledspec(BCI[k,])
-\end{Sinput}
-\begin{Soutput}
-Extrapolated     Observed       Veiled 
-   109.13968     84.00000     25.13968 
-\end{Soutput}
-\end{Schunk}
-
-\subsection{Probability of pool membership}
-
-Beals smoothing was originally suggested as a tool of regularizing data
-for ordination.  It regularizes data too strongly,
-but it has been suggested as a method of estimating which of the
-missing species could occur in a site, or which sites are suitable for
-a species.  The probability for each species at each site is assessed
-from other species occurring on the site.
-
-Function \code{beals} implement Beals smoothing \citep{McCune87,
-  DeCaceresLegendre08}:
-\begin{Schunk}
-\begin{Sinput}
-> smo <- beals(BCI)
-\end{Sinput}
-\end{Schunk}
-We may see how the estimated probability of occurrence and observed
-numbers of stems relate in one of the more familiar species. We study
-only one species, and to avoid circular reasoning we do not include
-the target species in the smoothing (Fig.~\ref{fig:beals}):
-\begin{Schunk}
-\begin{Sinput}
-> j <- which(colnames(BCI) == "Ceiba.pentandra")
-> plot(beals(BCI, species=j, include=FALSE), BCI[,j], 
-       ylab="Occurrence", main="Ceiba pentandra", 
-       xlab="Probability of occurrence")
-\end{Sinput}
-\end{Schunk}
-\begin{figure}
-\includegraphics{diversity-vegan-035}
-\caption{Beals smoothing for \emph{Ceiba pentandra}.}
-\label{fig:beals}
-\end{figure}
-
-\bibliography{vegan}
-
-\end{document}
diff --git a/vignettes/intro-vegan.tex b/vignettes/intro-vegan.tex
deleted file mode 100644
index 3c45662..0000000
--- a/vignettes/intro-vegan.tex
+++ /dev/null
@@ -1,620 +0,0 @@
-% -*- mode: noweb; noweb-default-code-mode: R-mode; -*-
-%\VignetteIndexEntry{Introduction to ordination in vegan}
-\documentclass[a4paper,10pt]{article}
-\usepackage{vegan} % vegan settings
-
-\title{Vegan: an introduction to ordination} 
-\author{Jari Oksanen}
-
-\date{\footnotesize{
-  processed with vegan
-2.3-1
-in R Under development (unstable) (2015-09-24 r69424) on \today}}
-
-%% need no \usepackage{Sweave}
-\begin{document}
-
-
-
-\maketitle
-\begin{abstract}
-  The document describes typical, simple work pathways of
-  vegetation ordination. Unconstrained ordination uses as examples
-  detrended correspondence analysis and non-metric multidimensional
-  scaling, and shows how to interpret their results by fitting
-  environmental vectors and factors or smooth environmental surfaces
-  to the graph. The basic plotting command, and more advanced plotting
-  commands for congested plots are also discussed, as well as adding
-  items such as ellipses, convex hulls, and other items for
-  classes. The constrained ordination uses constrained (canonical)
-  correspondence analysis as an example. It is first shown how a model
-  is defined, then the document discusses model building and
-  signficance tests of the whole analysis, single constraints and
-  axes.
-\end{abstract}
-\tableofcontents
-
-\vspace{3ex}
-\noindent \pkg{Vegan} is a package for community ecologists.  This
-documents explains how the commonly used ordination methods can be
-performed in \pkg{vegan}.  The document only is a very basic
-introduction.  Another document (\emph{vegan tutorial})
-(\url{http://cc.oulu.fi/~jarioksa/opetus/method/vegantutor.pdf}) gives
-a longer and more detailed introduction to ordination.  The
-current document only describes a small part of all \pkg{vegan}
-functions.  For most functions, the canonical references are the
-\pkg{vegan} help pages, and some of the most important additional
-functions are listed at this document.
-
-\section{Ordination}
-
-The \pkg{vegan} package contains all common ordination methods:
-Principal component analysis (function \code{rda}, or \code{prcomp} in
-the base \proglang{R}), correspondence analysis (\code{cca}),
-detrended correspondence analysis (\code{decorana}) and a wrapper for
-non-metric multidimensional scaling (\code{metaMDS}).  Functions
-\code{rda} and \code{cca} mainly are designed for constrained
-ordination, and will be discussed later.  In this chapter I describe
-functions \code{decorana} and \code{metaMDS}.
-
-\subsection{Detrended correspondence analysis}
-
-
-Detrended correspondence analysis (\textsc{dca}) is done like this:
-\begin{Schunk}
-\begin{Sinput}
-> library(vegan)
-> data(dune)
-> ord <- decorana(dune)
-\end{Sinput}
-\end{Schunk}
-This saves ordination results in \code{ord}:
-\begin{Schunk}
-\begin{Sinput}
-> ord
-\end{Sinput}
-\begin{Soutput}
-Call:
-decorana(veg = dune) 
-
-Detrended correspondence analysis with 26 segments.
-Rescaling of axes with 4 iterations.
-
-                  DCA1   DCA2    DCA3    DCA4
-Eigenvalues     0.5117 0.3036 0.12125 0.14267
-Decorana values 0.5360 0.2869 0.08136 0.04814
-Axis lengths    3.7004 3.1166 1.30055 1.47888
-\end{Soutput}
-\end{Schunk}
-The display of results is very brief: only eigenvalues and used
-options are listed.  Actual ordination results are not shown, but you
-can see them with command \code{summary(ord)}, or extract the scores
-with command \code{scores}.  The \code{plot} function also
-automatically knows how to access the scores.
-
-\subsection{Non-metric multidimensional scaling}
-
-
-Function \code{metaMDS} is a bit special case.  The actual ordination
-is performed by function \pkg{vegan} function \code{monoMDS} (or
-alternatively using \code{isoMDS} of the \pkg{MASS} package).
-Function \code{metaMDS} is a wrapper to perform non-metric
-multidimensional scaling (\textsc{nmds}) like recommended in community
-ordination: it uses adequate dissimilarity measures (function
-\code{vegdist}), then it runs \textsc{nmds} several times with random
-starting configurations, compares results (function
-\code{procrustes}), and stops after finding twice a similar minimum
-stress solution.  Finally it scales and rotates the solution, and adds
-species scores to the configuration as weighted averages (function
-\code{wascores}):
-\begin{Schunk}
-\begin{Sinput}
-> ord <- metaMDS(dune)
-\end{Sinput}
-\begin{Soutput}
-Run 0 stress 0.1192678 
-Run 1 stress 0.1192678 
-... New best solution
-... procrustes: rmse 4.211892e-05  max resid 0.0001225318 
-*** Solution reached
-\end{Soutput}
-\begin{Sinput}
-> ord
-\end{Sinput}
-\begin{Soutput}
-Call:
-metaMDS(comm = dune) 
-
-global Multidimensional Scaling using monoMDS
-
-Data:     dune 
-Distance: bray 
-
-Dimensions: 2 
-Stress:     0.1192678 
-Stress type 1, weak ties
-Two convergent solutions found after 1 tries
-Scaling: centring, PC rotation, halfchange scaling 
-Species: expanded scores based on ‘dune’ 
-\end{Soutput}
-\end{Schunk}
-
-\section{Ordination graphics}
-
-Ordination is nothing but a way of drawing graphs, and it is best to
-inspect ordinations only graphically (which also implies that they
-should not be taken too seriously).
-
-All ordination results of \pkg{vegan} can be displayed with a
-\code{plot} command (Fig. \ref{fig:plot}):
-\begin{Schunk}
-\begin{Sinput}
-> plot(ord)
-\end{Sinput}
-\end{Schunk}
-\begin{figure}
-\includegraphics{intro-vegan-006}
-\caption{Default ordination plot.}
-\label{fig:plot}
-\end{figure}
-Default \code{plot} command uses either black circles for sites and
-red pluses for species, or black and red text for sites and species,
-resp.  The choices depend on the number of items in the plot and
-ordination method.  You can override the default choice by setting
-\code{type = "p"} for points, or \code{type = "t"} for text.  For
-a better control of ordination graphics you can first draw an empty
-plot (\code{type = "n"}) and then add species and sites separately
-using \code{points} or \code{text} functions.  In this way you can
-combine points and text, and you can select colours and character
-sizes freely (Fig. \ref{fig:plot.args}):
-\begin{Schunk}
-\begin{Sinput}
-> plot(ord, type = "n")
-> points(ord, display = "sites", cex = 0.8, pch=21, col="red", bg="yellow")
-> text(ord, display = "spec", cex=0.7, col="blue")
-\end{Sinput}
-\end{Schunk}
-\begin{figure}
-\includegraphics{intro-vegan-008}
-\caption{A more colourful ordination plot where sites are points, and
-  species are text.}
-\label{fig:plot.args}
-\end{figure}
-
-All \pkg{vegan} ordination methods have a specific \code{plot}
-function.  In addition, \pkg{vegan} has an alternative plotting
-function \code{ordiplot} that also knows many non-\pkg{vegan}
-ordination methods, such as \code{prcomp}, \code{cmdscale} and
-\code{isoMDS}.  All \pkg{vegan} plot functions return invisibly
-an \code{ordiplot} object, so that you can use \code{ordiplot}
-support functions with the results (\code{points}, \code{text},
-\code{identify}).
-
-Function \code{ordirgl} (requires \pkg{rgl} package) provides
-dynamic three-dimensional graphics that can be spun around or zoomed
-into with your mouse.  Function \pkg{ordiplot3d} (requires package
-\code{scatterplot3d}) displays simple three-dimensional
-scatterplots.
-
-\subsection{Cluttered plots}
-
-Ordination plots are often congested: there is a large number of sites
-and species, and it may be impossible to display all clearly.  In
-particular, two or more species may have identical scores and are
-plotted over each other.  \pkg{Vegan} does not have (yet?)
-automatic tools for clean plotting in these cases, but here some
-methods you can try:
-\begin{itemize}
-\item Zoom into graph setting axis limits \code{xlim} and
-  \code{ylim}.  You must typically set both, because \pkg{vegan}
-  will maintain equal aspect ratio of axes.
-\item Use points and add labell only some points with \code{identify}
-  command.
-\item Use \code{select} argument in ordination \code{text} and
-  \code{points} functions to only show the specified items.
-\item Use \code{ordilabel} function that uses opaque background to
-  the text: some text labels will be covered, but the uppermost are
-  readable.
-\item Use automatic \code{orditorp} function that uses text only if
-  this can be done without overwriting previous labels, but points in
-  other cases.
-\item Use automatic \code{ordipointlabel} function that uses both
-  points and text labels, and tries to optimize the location of the
-  text to avoid overwriting.
-\item Use interactive \code{orditkplot} function that draws both
-  points and labels for ordination scores, and allows you to drag
-  labels to better positions. You can export the results of the edited
-  graph to encapsulated \proglang{postscript}, \proglang{pdf},
-  \proglang{png} or \proglang{jpeg} files, or copy directly to
-  encapsulated \proglang{postscript}, or return the edited positions
-  to \proglang{R} for further processing.
-\end{itemize}
-
-\subsection{Adding items to ordination plots}
-
-\pkg{Vegan} has a group of functions for adding information about
-classification or grouping of points onto ordination diagrams.
-Function \code{ordihull} adds convex hulls, \code{ordiellipse}
-adds ellipses of standard deviation, standard error or confidence
-areas, and \code{ordispider} combines items to their centroid
-(Fig. \ref{fig:ordihull}):
-\begin{Schunk}
-\begin{Sinput}
-> data(dune.env)
-> attach(dune.env)
-\end{Sinput}
-\end{Schunk}
-\begin{Schunk}
-\begin{Sinput}
-> plot(ord, disp="sites", type="n")
-> ordihull(ord, Management, col="blue")
-> ordiellipse(ord, Management, col=3,lwd=2)
-> ordispider(ord, Management, col="red", label = TRUE)
-> points(ord, disp="sites", pch=21, col="red", bg="yellow", cex=1.3)
-\end{Sinput}
-\end{Schunk}
-\begin{figure}
-\includegraphics{intro-vegan-011}
-\caption{Convex hull, standard error ellipse and a spider web diagram
-  for Management levels in ordination.}
-\label{fig:ordihull}
-\end{figure}
-In addition, you can overlay a cluster dendrogram from \code{hclust}
-using \code{ordicluster} or a minimum spanning tree from
-\code{spantree} with its \code{lines} function.  Segmented arrows
-can be added with \code{ordiarrows}, lines with
-\code{ordisegments} and regular grids with \code{ordigrid}.
-
-\section{Fitting environmental variables}
-
-\pkg{Vegan} provides two functions for fitting environmental
-variables onto ordination:
-\begin{itemize}
-\item \code{envfit} fits vectors of continuous variables and centroids
-  of levels of class variables (defined as \code{factor} in
-  \proglang{R}).  The arrow shows the direction of the (increasing)
-  gradient, and the length of the arrow is proportional to the
-  correlation between the variable and the ordination.
-\item \code{ordisurf} (which requires package \pkg{mgcv}) fits
-  smooth surfaces for continuous variables onto ordination using
-  thinplate splines with cross-validatory selection of smoothness.
-\end{itemize}
-
-Function \code{envfit} can be called with a \code{formula}
-interface, and it optionally can assess the ``significance'' of the
-variables using permutation tests:
-\begin{Schunk}
-\begin{Sinput}
-> ord.fit <- envfit(ord ~ A1 + Management, data=dune.env, perm=999)
-> ord.fit
-\end{Sinput}
-\begin{Soutput}
-***VECTORS
-
-     NMDS1   NMDS2     r2 Pr(>r)  
-A1 0.99003 0.14087 0.3797  0.015 *
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-Permutation: free
-Number of permutations: 999
-
-***FACTORS:
-
-Centroids:
-               NMDS1   NMDS2
-ManagementBF -0.4474 -0.0194
-ManagementHF -0.2688 -0.1256
-ManagementNM  0.2975  0.5798
-ManagementSF  0.1503 -0.4654
-
-Goodness of fit:
-               r2 Pr(>r)   
-Management 0.4134  0.007 **
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-Permutation: free
-Number of permutations: 999
-\end{Soutput}
-\end{Schunk}
-The result can be drawn directly or added to an ordination diagram
-(Fig. \ref{fig:envfit}):
-\begin{Schunk}
-\begin{Sinput}
-> plot(ord, dis="site")
-> plot(ord.fit)
-\end{Sinput}
-\end{Schunk}
-
-Function \code{ordisurf} directly adds a fitted surface onto
-ordination, but it returns the result of the fitted thinplate spline
-\code{gam} (Fig. \ref{fig:envfit}):
-\begin{Schunk}
-\begin{Sinput}
-> ordisurf(ord, A1, add=TRUE)
-\end{Sinput}
-\begin{Soutput}
-Family: gaussian 
-Link function: identity 
-
-Formula:
-y ~ s(x1, x2, k = 10, bs = "tp", fx = FALSE)
-
-Estimated degrees of freedom:
-1.62  total = 2.62 
-
-REML score: 41.42675     
-\end{Soutput}
-\end{Schunk}
-\begin{figure}
-\includegraphics{intro-vegan-015}
-\caption{Fitted vector and smooth surface for the thickness of A1
-  horizon (\code{A1}, in cm), and centroids of Management levels.}
-\label{fig:envfit}
-\end{figure}
-
-\section{Constrained ordination}
-
-\pkg{Vegan} has three methods of constrained ordination:
-constrained or ``canonical'' correspondence analysis (function
-\code{cca}), redundancy analysis (function \code{rda}) and
-distance-based redundancy analysis (function \code{capscale}).  All
-these functions can have a conditioning term that is ``partialled
-out''.  I only demonstrate \code{cca}, but all functions accept
-similar commands and can be used in the same way.
-
-The preferred way is to use \code{formula} interface, where the left
-hand side gives the community data frame and the right hand side lists
-the constraining variables:
-\begin{Schunk}
-\begin{Sinput}
-> ord <- cca(dune ~ A1 + Management, data=dune.env)
-> ord
-\end{Sinput}
-\begin{Soutput}
-Call: cca(formula = dune ~ A1 + Management, data = dune.env)
-
-              Inertia Proportion Rank
-Total          2.1153     1.0000     
-Constrained    0.7798     0.3686    4
-Unconstrained  1.3355     0.6314   15
-Inertia is mean squared contingency coefficient 
-
-Eigenvalues for constrained axes:
-  CCA1   CCA2   CCA3   CCA4 
-0.3187 0.2372 0.1322 0.0917 
-
-Eigenvalues for unconstrained axes:
-   CA1    CA2    CA3    CA4    CA5    CA6    CA7    CA8    CA9   CA10 
-0.3620 0.2029 0.1527 0.1345 0.1110 0.0800 0.0767 0.0553 0.0444 0.0415 
-  CA11   CA12   CA13   CA14   CA15 
-0.0317 0.0178 0.0116 0.0087 0.0047 
-\end{Soutput}
-\end{Schunk}
-The results can be plotted with (Fig. \ref{fig:cca}):
-\begin{Schunk}
-\begin{Sinput}
-> plot(ord)
-\end{Sinput}
-\end{Schunk}
-\begin{figure}
-\includegraphics{intro-vegan-018}
-\caption{Default plot from constrained correspondence analysis.}
-\label{fig:cca}
-\end{figure}
-There are three groups of items: sites, species and centroids (and
-biplot arrows) of environmental variables.  All these can be added
-individually to an empty plot, and all previously explained tricks of
-controlling graphics still apply.
-
-It is not recommended to perform constrained ordination with all
-environmental variables you happen to have: adding the number of
-constraints means slacker constraint, and you finally end up with
-solution similar to unconstrained ordination. In that case it is
-better to use unconstrained ordination with environmental fitting.
-However, if you really want to do so, it is possible with the
-following shortcut in \code{formula}:
-\begin{Schunk}
-\begin{Sinput}
-> cca(dune ~ ., data=dune.env)
-\end{Sinput}
-\begin{Soutput}
-Call: cca(formula = dune ~ A1 + Moisture + Management + Use +
-Manure, data = dune.env)
-
-              Inertia Proportion Rank
-Total          2.1153     1.0000     
-Constrained    1.5032     0.7106   12
-Unconstrained  0.6121     0.2894    7
-Inertia is mean squared contingency coefficient 
-Some constraints were aliased because they were collinear (redundant)
-
-Eigenvalues for constrained axes:
-  CCA1   CCA2   CCA3   CCA4   CCA5   CCA6   CCA7   CCA8   CCA9  CCA10 
-0.4671 0.3410 0.1761 0.1532 0.0953 0.0703 0.0589 0.0499 0.0318 0.0260 
- CCA11  CCA12 
-0.0228 0.0108 
-
-Eigenvalues for unconstrained axes:
-    CA1     CA2     CA3     CA4     CA5     CA6     CA7 
-0.27237 0.10876 0.08975 0.06305 0.03489 0.02529 0.01798 
-\end{Soutput}
-\end{Schunk}
-
-\subsection{Significance tests}
-
-\pkg{vegan} provides permutation tests for the significance of
-constraints.  The test mimics standard analysis of variance function
-(\code{anova}), and the default test analyses all constraints
-simultaneously:
-\begin{Schunk}
-\begin{Sinput}
-> anova(ord)
-\end{Sinput}
-\begin{Soutput}
-Permutation test for cca under reduced model
-Permutation: free
-Number of permutations: 999
-
-Model: cca(formula = dune ~ A1 + Management, data = dune.env)
-         Df ChiSquare      F Pr(>F)    
-Model     4   0.77978 2.1896  0.001 ***
-Residual 15   1.33549                  
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-\end{Soutput}
-\end{Schunk}
-The function actually used was \code{anova.cca}, but you do not need
-to give its name in full, because \proglang{R} automatically chooses the
-correct \code{anova} variant for the result of constrained
-ordination.
-
-It is also possible to analyse terms separately:
-\begin{Schunk}
-\begin{Sinput}
-> anova(ord, by="term", permutations=199)
-\end{Sinput}
-\begin{Soutput}
-Permutation test for cca under reduced model
-Terms added sequentially (first to last)
-Permutation: free
-Number of permutations: 199
-
-Model: cca(formula = dune ~ A1 + Management, data = dune.env)
-           Df ChiSquare      F Pr(>F)   
-A1          1   0.22476 2.5245  0.015 * 
-Management  3   0.55502 2.0780  0.010 **
-Residual   15   1.33549                 
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-\end{Soutput}
-\end{Schunk}
-This test is sequential: the terms are analysed
-in the order they happen to be in the model. You can also analyse
-significances of marginal effects (``Type III effects''):
-\begin{Schunk}
-\begin{Sinput}
-> anova(ord, by="mar", permutations=199)
-\end{Sinput}
-\begin{Soutput}
-Permutation test for cca under reduced model
-Marginal effects of terms
-Permutation: free
-Number of permutations: 199
-
-Model: cca(formula = dune ~ A1 + Management, data = dune.env)
-           Df ChiSquare      F Pr(>F)   
-A1          1   0.17594 1.9761  0.035 * 
-Management  3   0.55502 2.0780  0.005 **
-Residual   15   1.33549                 
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-\end{Soutput}
-\end{Schunk}
-
-Moreover, it is possible to analyse significance of each axis:
-\begin{Schunk}
-\begin{Sinput}
-> anova(ord, by="axis", permutations=499)
-\end{Sinput}
-\begin{Soutput}
-Permutation test for cca under reduced model
-Marginal tests for axes
-Permutation: free
-Number of permutations: 499
-
-Model: cca(formula = dune ~ A1 + Management, data = dune.env)
-         Df ChiSquare      F Pr(>F)   
-CCA1      1   0.31875 3.5801  0.002 **
-CCA2      1   0.23718 2.6640  0.006 **
-CCA3      1   0.13217 1.4845  0.102   
-CCA4      1   0.09168 1.0297  0.374   
-Residual 15   1.33549                 
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-\end{Soutput}
-\end{Schunk}
-
-\subsection{Conditioned or partial ordination}
-
-All constrained ordination methods can have terms that are partialled
-out from the analysis before constraints:
-\begin{Schunk}
-\begin{Sinput}
-> ord <- cca(dune ~ A1 + Management + Condition(Moisture), data=dune.env)
-> ord
-\end{Sinput}
-\begin{Soutput}
-Call: cca(formula = dune ~ A1 + Management +
-Condition(Moisture), data = dune.env)
-
-              Inertia Proportion Rank
-Total          2.1153     1.0000     
-Conditional    0.6283     0.2970    3
-Constrained    0.5109     0.2415    4
-Unconstrained  0.9761     0.4615   12
-Inertia is mean squared contingency coefficient 
-
-Eigenvalues for constrained axes:
-   CCA1    CCA2    CCA3    CCA4 
-0.24932 0.12090 0.08160 0.05904 
-
-Eigenvalues for unconstrained axes:
-    CA1     CA2     CA3     CA4     CA5     CA6     CA7     CA8     CA9 
-0.30637 0.13191 0.11516 0.10947 0.07724 0.07575 0.04871 0.03758 0.03106 
-   CA10    CA11    CA12 
-0.02102 0.01254 0.00928 
-\end{Soutput}
-\end{Schunk}
-This partials out the effect of \code{Moisture} before analysing the
-effects of \code{A1} and \code{Management}.  This also influences
-the significances of the terms:
-\begin{Schunk}
-\begin{Sinput}
-> anova(ord, by="term", permutations=499)
-\end{Sinput}
-\begin{Soutput}
-Permutation test for cca under reduced model
-Terms added sequentially (first to last)
-Permutation: free
-Number of permutations: 499
-
-Model: cca(formula = dune ~ A1 + Management + Condition(Moisture), data = dune.env)
-           Df ChiSquare      F Pr(>F)   
-A1          1   0.11543 1.4190   0.13   
-Management  3   0.39543 1.6205   0.01 **
-Residual   12   0.97610                 
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-\end{Soutput}
-\end{Schunk}
-If we had a designed experiment, we may wish to restrict the
-permutations so that the observations only are permuted within levels
-of \code{Moisture}. Restricted permutation is based on the powerful
-\pkg{permute} package. Function \code{how()} can be used to define
-permutation schemes. In the following, we set the levels with
-\code{plots} argument:
-\begin{Schunk}
-\begin{Sinput}
-> how <- how(nperm=499, plots = Plots(strata=dune.env$Moisture))
-> anova(ord, by="term", permutations = how)
-\end{Sinput}
-\begin{Soutput}
-Permutation test for cca under reduced model
-Terms added sequentially (first to last)
-Plots: dune.env$Moisture, plot permutation: none
-Permutation: free
-Number of permutations: 499
-
-Model: cca(formula = dune ~ A1 + Management + Condition(Moisture), data = dune.env)
-           Df ChiSquare      F Pr(>F)   
-A1          1   0.11543 1.4190  0.262   
-Management  3   0.39543 1.6205  0.004 **
-Residual   12   0.97610                 
----
-Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
-\end{Soutput}
-\end{Schunk}
-
-%%%%%%%%%%%%%%%%%%%
-
-\end{document}
diff --git a/vignettes/partitioning.Rnw b/vignettes/partitioning.Rnw
new file mode 100644
index 0000000..14dda7c
--- /dev/null
+++ b/vignettes/partitioning.Rnw
@@ -0,0 +1,80 @@
+%\VignetteIndexEntry{Partition of Variation}
+%% This file rewrites Pierre Legendre's introduction and takes pages
+%% of Pierre Legendre's pdf documents and puts them together.
+
+\documentclass[10pt]{article}
+\usepackage{vegan} %% vegan setup
+\usepackage{pdfpages}
+\setkeys{Gin}{width=0.6\linewidth}
+
+
+\title{Diagrams and Procedures for Partition of Variation}
+\author{Pierre Legendre}
+\date{\footnotesize{
+  processed with vegan \Sexpr{packageDescription("vegan", field="Version")}
+  in \Sexpr{R.version.string} on \today}}
+
+\begin{document}
+%% Sweave document
+\SweaveOpts{strip.white=true}
+<<echo=false>>=
+par(mfrow=c(1,1))
+figset <- function() par(mar=c(4,4,1,1)+.1)
+options(SweaveHooks = list(fig = figset))
+library(vegan)
+labs <- paste("Table", 1:4)
+cls <- c("hotpink", "skyblue", "orange", "limegreen")
+@
+
+\maketitle
+
+\noindent Diagrams describing the partitions of variation of a
+response data table by two (Fig.~\ref{fig:part2}), three
+(Fig.~\ref{fig:part3}) and four tables (Fig.~\ref{fig:part4}) of
+explanatory variables. The fraction names [a] to [p] in the output of
+\code{varpart} function follow the notation in these Venn diagrams,
+and the diagrams were produced using the \code{showvarparts} function.
+%%%%%%%%%%%%%%%
+\begin{figure}[!ht]
+<<echo=FALSE,fig=TRUE>>=
+showvarparts(2, bg = cls, Xnames=labs)
+@ 
+\caption{3 regression/ canonical analyses and 3 subtraction equations
+  are needed to estimate the $4\;(=2^2)$ fractions. 
+  
+  [a] and [c] can be tested for significance (3 canonical analyses per
+  permutation). Fraction [b] cannot be tested singly.}
+\label{fig:part2}
+\end{figure}
+%%%%%%%%%%%
+\begin{figure}[!ht]
+<<echo=FALSE,fig=TRUE>>=
+showvarparts(3, bg = cls, Xnames=labs)
+@ 
+\caption{7 regression/ canonical analyses and 10 subtraction equations
+  are needed to estimate the $8\;(=2^3)$ fractions. 
+  
+  [a] to [c] and subsets containing [a] to [c] can be tested for
+  significance (4 canonical analyses per permutation to test [a] to
+  [c]). Fractions [d] to [g] cannot be tested singly.}
+\label{fig:part3}
+\end{figure}
+%%%%%%%%%%%
+\begin{figure}[!ht]
+<<echo=FALSE,fig=TRUE>>=
+showvarparts(4, bg = cls, Xnames=labs)
+@ 
+\caption{15 regression/ canonical analyses and 27 subtraction equations
+  are needed to estimate the $16\;(=2^4)$ fractions. 
+  
+  [a] to [d] and subsets containing [a] to [d] can be tested for
+  significance (5 canonical analyses per permutation to test [a] to
+  [d]). Fractions [e] to [o] cannot be tested singly.}
+\label{fig:part4}
+\end{figure}
+\clearpage
+\setkeys{Gin}{width=\paperwidth}
+%% Add partitioning models 2-3 and 4.
+\includepdf[fitpaper=true,pages=-]{varpart23.pdf}
+\includepdf[fitpaper=true, pages=-]{varpart4.pdf}
+\end{document}
diff --git a/vignettes/varpart23.pdf b/vignettes/varpart23.pdf
new file mode 100644
index 0000000..358841a
Binary files /dev/null and b/vignettes/varpart23.pdf differ
diff --git a/vignettes/varpart4.pdf b/vignettes/varpart4.pdf
new file mode 100644
index 0000000..2cd7232
Binary files /dev/null and b/vignettes/varpart4.pdf differ

-- 
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/debian-med/r-cran-vegan.git



More information about the debian-med-commit mailing list