[med-svn] [r-cran-vegan] 01/08: Imported Upstream version 2.4-1

Andreas Tille tille at debian.org
Fri Oct 28 10:55:24 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 398f56ef52f930d7d2aeb2fc8f46f9ec8aafcfaa
Author: Andreas Tille <tille at debian.org>
Date:   Fri Oct 28 12:08:36 2016 +0200

    Imported Upstream version 2.4-1
---
 DESCRIPTION                  |   8 +-
 MD5                          |  74 +++++++++---------
 R/adipart.default.R          |   2 +-
 R/as.mcmc.oecosimu.R         |   7 +-
 R/betadisper.R               |  10 +--
 R/centroids.cca.R            |   8 +-
 R/diversity.R                |   7 +-
 R/envfit.default.R           |  11 +--
 R/factorfit.R                |   2 +-
 R/fitted.capscale.R          |   6 +-
 R/goodness.cca.R             |  19 ++++-
 R/hiersimu.default.R         |   2 +-
 R/inertcomp.R                |   6 +-
 R/linestack.R                |   7 +-
 R/meandist.R                 |   4 +-
 R/multipart.default.R        |   2 +-
 R/nestedbetasor.R            |   4 +-
 R/ordisplom.R                |   2 +-
 R/rarefy.R                   |   4 +-
 R/stressplot.wcmdscale.R     |  16 +++-
 build/partial.rdb            | Bin 21794 -> 21872 bytes
 inst/NEWS.Rd                 |  76 +++++++++++++++++++
 inst/doc/FAQ-vegan.Rmd       |   8 +-
 inst/doc/FAQ-vegan.html      |   8 +-
 inst/doc/decision-vegan.pdf  | Bin 340954 -> 340389 bytes
 inst/doc/diversity-vegan.pdf | Bin 365970 -> 365471 bytes
 inst/doc/intro-vegan.pdf     | Bin 238817 -> 238294 bytes
 inst/doc/partitioning.pdf    | Bin 137524 -> 137193 bytes
 man/betadisper.Rd            |   2 +-
 man/linestack.Rd             |   2 +-
 man/nestedtemp.Rd            |  37 ++++-----
 man/nullmodel.Rd             |  11 ++-
 man/oecosimu.Rd              |  16 ++++
 src/cepin.f                  |  10 +--
 src/decorana.f               | 175 ++++++++++++++++++++++++++++---------------
 src/monoMDS.f                |   4 +-
 src/ordering.f               |  48 +++++++-----
 vignettes/FAQ-vegan.Rmd      |   8 +-
 38 files changed, 401 insertions(+), 205 deletions(-)

diff --git a/DESCRIPTION b/DESCRIPTION
index b13c131..21b4961 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,7 +1,7 @@
 Package: vegan
 Title: Community Ecology Package
-Version: 2.4-0
-Date: 2016-06-15
+Version: 2.4-1
+Date: 2016-09-07
 Author: Jari Oksanen, F. Guillaume Blanchet, Michael Friendly, Roeland Kindt,
    Pierre Legendre, Dan McGlinn, Peter R. Minchin, R. B. O'Hara,
    Gavin L. Simpson, Peter Solymos, M. Henry H. Stevens, Eduard Szoecs,
@@ -17,6 +17,6 @@ License: GPL-2
 BugReports: https://github.com/vegandevs/vegan/issues
 URL: https://cran.r-project.org, https://github.com/vegandevs/vegan
 NeedsCompilation: yes
-Packaged: 2016-06-15 08:01:21 UTC; jarioksa
+Packaged: 2016-09-07 10:35:24 UTC; jarioksa
 Repository: CRAN
-Date/Publication: 2016-06-15 15:38:31
+Date/Publication: 2016-09-07 14:41:37
diff --git a/MD5 b/MD5
index 6a8690f..7726c99 100644
--- a/MD5
+++ b/MD5
@@ -1,4 +1,4 @@
-913b4eb81e502abb0b231510783fb52c *DESCRIPTION
+f06a29325e1e14877dd37db3e8ad55a5 *DESCRIPTION
 ad7596a4d60e6ab02877ab7a75271d33 *NAMESPACE
 4b8531b446af54510e5fb31f841aed2f *R/AIC.radfit.R
 e9814d051bdf49db5606399ac3a4704e *R/CCorA.R
@@ -14,7 +14,7 @@ d80688d78aba3cd9367ffaaaec6ec252 *R/TukeyHSD.betadisper.R
 7119c3a30046011fc164ebde2dd624bc *R/add1.cca.R
 0f953ea124a0d579b79d32974961ec87 *R/ade2vegancca.R
 3fea698281bc0b4c3a5ad26f4d44d0e2 *R/adipart.R
-03fbe03df3167289ed34307a258359cc *R/adipart.default.R
+6d8b8084eb99357cf7a6e95894514520 *R/adipart.default.R
 6e0cc43b676b69a43ca460c886da2f28 *R/adipart.formula.R
 23af28a7ddb2957549409a1e80481b82 *R/adonis.R
 3da02c8549ac302efdccf84f99de44c7 *R/adonis2.R
@@ -28,7 +28,7 @@ cd89ea579a34db076f699d05645a7b8e *R/anova.ccalist.R
 7fab08bcc596df60a22c4b04c8507121 *R/anova.prc.R
 eded8dec556ee875d56887859b0abee8 *R/as.fisher.R
 66c29064fff4854203ab2cd50e661558 *R/as.hclust.spantree.R
-d128010944f6a304a1255f04355df2f6 *R/as.mcmc.oecosimu.R
+96dbacc8c238120ee7853fc399a956c9 *R/as.mcmc.oecosimu.R
 cfaa7dc7d3f45c29e59e83326f1371d4 *R/as.mcmc.permat.R
 71fe13d6613d600ccb8b5894a55b87a3 *R/as.mlm.R
 340f6a922578c8965803c63e08c5abbf *R/as.mlm.cca.R
@@ -38,7 +38,7 @@ a7f01bd69394d5554cf10279a2690080 *R/as.preston.R
 a9297920fdeeb053cfe57930118ca20c *R/as.ts.oecosimu.R
 704239604b0ed8420cb22a31b28a01d3 *R/as.ts.permat.R
 fbec6d133dea10372ce082c7035a8ab2 *R/beals.R
-4a231d3e36f8eb21bc6ef032bbb8ce3a *R/betadisper.R
+0fd386d101a4f4d6823cbf510e0ea14d *R/betadisper.R
 2943ef31dcda3c6189e1ffda42641aba *R/betadiver.R
 46ae3f75a0b483fecab589637d72a307 *R/bgdispersal.R
 4603ea944d470a9e284cb6cab6d75529 *R/bioenv.R
@@ -63,7 +63,7 @@ a56b4c5eafc2fb9f7c27b4f577dac731 *R/capscale.R
 2e09a82ec52e211afc2ac6e8d4b40898 *R/cca.R
 fe3b7320b434d46d2308d880ef26787a *R/cca.default.R
 e01e3acecdb9ac8d9195937e9879d126 *R/cca.formula.R
-cb28d9e98ceba372f8eca9b1e5fc69a4 *R/centroids.cca.R
+efd5146e35f97186b97ca1bb6e618c79 *R/centroids.cca.R
 c66d8fbe69ccca94f2ee8f777ff16ae2 *R/checkSelect.R
 6faf5d12f3e1abb40c0f8d2cfeabc4b4 *R/clamtest.R
 6ee5070eb4ec1a82e1dd59db5328fa41 *R/coef.cca.R
@@ -83,13 +83,13 @@ c8b0d7a7a0ab293b4b215d9e1967351e *R/deviance.rda.R
 1898b0d7b1ee3f860ab52aeb525839b8 *R/dispindmorisita.R
 50948e10cb607ffc89adc46d9335d640 *R/dispweight.R
 cafeabc2133997b3381c9edf6a971abf *R/distconnected.R
-51c2b04636ee7131d379d5aa2b3c7877 *R/diversity.R
+9341b1179d0b6f452e12e491cb7b6823 *R/diversity.R
 00136d6f9d6dd5ca16db7633eceb4e92 *R/downweight.R
 54fbab991f938a0c3e9353121cc34fec *R/drop1.cca.R
 79c66a10794aacaf08f1d28192228bea *R/eigengrad.R
 3481fc55ba439f64100b3954f2e775a3 *R/eigenvals.R
 17a62527ee103c09bfba0c851ab12560 *R/envfit.R
-abdc99957cd34d0c5f79ca1d9dd68c68 *R/envfit.default.R
+8b55b666951751cfd6cb9720c886677e *R/envfit.default.R
 1ef64854841e194d35484feffe7914e5 *R/envfit.formula.R
 0b5f742d4f302ab12c17fe3fc3e3deee *R/estaccumR.R
 81098475867f802dea0565fe426c9fc5 *R/estimateR.R
@@ -98,12 +98,12 @@ cf0a0bf7116ef7a21e090d0c1a76f8d0 *R/estimateR.data.frame.R
 1df3194c88598964282c114cb8db5513 *R/estimateR.matrix.R
 c50bc8ea278de3acaf5a4f097a6db58e *R/eventstar.R
 a184abc0cc159b4c71f7e62cf6c7034c *R/extractAIC.cca.R
-abb000be405120e4e8d0f562d74af473 *R/factorfit.R
+4fc4a8c1e770cfe313e47aec4cc34986 *R/factorfit.R
 7e304b1c384c4d8588e5dbedd9459c73 *R/fieller.MOStest.R
 ee8330855e6a7bc2350047d76b2209a4 *R/fisher.alpha.R
 2776f68ef40e177303c3b73163036969 *R/fisherfit.R
 15075c7f443896f54b5e0befd21c17bf *R/fitspecaccum.R
-e21af71caed12a2e9ac2c84fb1e35a0d *R/fitted.capscale.R
+2c0ddc46e242a1a015ba5b9ae1715c97 *R/fitted.capscale.R
 ee2e3daa463fb46ffce01206f8b44fa5 *R/fitted.cca.R
 000a71e4b3ec565a541325caac6efb11 *R/fitted.dbrda.R
 0080b65cfd48bac5e53961b8e12682e5 *R/fitted.procrustes.R
@@ -112,18 +112,18 @@ ee2e3daa463fb46ffce01206f8b44fa5 *R/fitted.cca.R
 9af5bead3fcebce9c225681044652ac1 *R/gdispweight.R
 76b1ffb784bab6671ebaa51c3b4bdb0b *R/getPermuteMatrix.R
 57c9a7ccff6a9c066b2aba3475f2330b *R/goodness.R
-896f837466216f664562c3d956ca0cb2 *R/goodness.cca.R
+aa6cac97fcd00c1a6d8a39cc6fdd3d1d *R/goodness.cca.R
 5364f16346047d3b8719ddef653a70bb *R/goodness.metaMDS.R
 8a767726c40223a58d4055759bf41efe *R/head.summary.cca.R
 d17f4f6be45b52e01cd605b09b56a80a *R/hierParseFormula.R
 3d19236ee5dd2f1c678061773895e86f *R/hiersimu.R
-cf72f3b9b00b81e863abd542893e6e01 *R/hiersimu.default.R
+786179cf06d7a24c21fca7cb3a907ae4 *R/hiersimu.default.R
 848772d209bbabe3515a9b4c7fcd15be *R/hiersimu.formula.R
 d10f4168f5119180dfd4a7bf57f444d6 *R/howHead.R
 d02fc9c672a9b2c4a31065702a3381be *R/humpfit.R
 1637bd10b39801c14b65656f29dafcf1 *R/identify.ordiplot.R
 9e731fa2cfb821bbe7ed62336d5fa3b3 *R/indpower.R
-7ac7eeb57f0f514cf4d05f757bd48a70 *R/inertcomp.R
+56b994a6310b74f9891e7af4cd461c6d *R/inertcomp.R
 bf423cb7cf07abc3a4c64229bcc8fc14 *R/initMDS.R
 5d5904a8fe3090744de68cc871241b38 *R/intersetcor.R
 c63972a171f76f92652feeb2daf30e82 *R/isomap.R
@@ -137,13 +137,13 @@ eb4e11e71eeefa6ec64e4a2580b8af75 *R/lines.prestonfit.R
 27a5c4e66e0c7d54f458904b596cc7e1 *R/lines.procrustes.R
 39604c069428cda7c9d2ed199ac4e28a *R/lines.radline.R
 66d749d120812f26c7bb7a50e014e0b6 *R/lines.spantree.R
-34d6aa49317a7ed2dcf2a598252efa3b *R/linestack.R
+4163375ba5178f6e98a0b50f63b91ead *R/linestack.R
 1dcc7e0504b5468a3bb2253924901e50 *R/make.cepnames.R
 68f06098a78ccef4c962d97a5e433b9f *R/make.commsim.R
 f25f916c75667aa6eb64136817e79256 *R/mantel.R
 fdb2f4786b31866197c80d827584edaf *R/mantel.correlog.R
 3e005ec1cc5a4231ee7c470cb30df01b *R/mantel.partial.R
-e054f13ad65a7f2616561c73557b412b *R/meandist.R
+8f1b55478a7416a431dca4e73b09f334 *R/meandist.R
 f7df1eb786cb44781111ce82fb67308b *R/metaMDS.R
 77c522a4c1174e0045c6b0e7a4dfb1d1 *R/metaMDSdist.R
 22829153822a85b138e67e6657122d48 *R/metaMDSiter.R
@@ -155,9 +155,9 @@ f8393616833643a1e45ef000b6ab878d *R/monoMDS.R
 16130eb8f8dd845b2e3cd4c5609a53fa *R/mso.R
 7e428f1adfdae287a1d64a79c6f2c3bc *R/msoplot.R
 7c219818ce5841e957db47f16986080b *R/multipart.R
-53ecea3bc1493624156b0fa4cf15f61f *R/multipart.default.R
+64baece57d0980cba59423bc27a2584f *R/multipart.default.R
 29b7db2c1d5a97651bacf96ee4f8baaf *R/multipart.formula.R
-f5e79cb1c2dc1fcabb6e6b5cb4dc0828 *R/nestedbetasor.R
+d735d387f687378b275a7017ed592fd3 *R/nestedbetasor.R
 6100179a10b511a93105c40ac194b088 *R/nestedchecker.R
 8710b8b289de29493cf03f917015713a *R/nesteddisc.R
 20cd3b812b25a8012ea80be97b12520a *R/nestedn0.R
@@ -193,7 +193,7 @@ c805e6801ef30758b9f7718269cabdfc *R/ordimedian.R
 e57a2b904e572829a5fd97f5b6576644 *R/ordiresids.R
 247ea2a9441bf23573e6ee169bad16b3 *R/ordisegments.R
 a36e6b384a4e198d0466fb0a883102aa *R/ordispider.R
-1de439b5ffaf18640e08fadcaf7193ee *R/ordisplom.R
+96516a08af37e2e3066799d466826889 *R/ordisplom.R
 c8316cf02745d66e730cdd6b9d62375e *R/ordistep.R
 a6108f550b749db7139b143cc9e36c9c *R/ordisurf.R
 da612e647de9c2a0dd853bec899ea620 *R/orditkplot.R
@@ -340,7 +340,7 @@ b129148e6efbbe1c45482c93d66f959b *R/rad.null.R
 36cfb246e391a7434c714fbb2269cdb6 *R/radlattice.R
 7608e7f23ebe04e3a7ea6e5fe384c431 *R/rankindex.R
 f62b0ebf24922d65ae1ce7bbcab2473f *R/rarecurve.R
-05a28bb5983bafed95bd827dc6fdd2b0 *R/rarefy.R
+810d1027b712acb471e90e7cdb334e7b *R/rarefy.R
 9c65025c61d4c25ce25234533e7b14c6 *R/rareslope.R
 d9a219ae6f3e6155ae76bc59d3e14d30 *R/raupcrick.R
 8116cefb40383fb571abb9fb82091087 *R/rda.R
@@ -388,7 +388,7 @@ d24743b3fb58c8a195608e814eeed02c *R/specslope.R
 33d884aae53dcc5fa80d9e9ffae4515e *R/stepacross.R
 bd2d1d998f18e7a9c65d5072932cbef2 *R/str.nullmodel.R
 301ba29a09201611845f7adb2b2d7d81 *R/stressplot.R
-3b089e8b36e218bb16023eefc4f5f162 *R/stressplot.wcmdscale.R
+b4829a105205ba44280e56808ceaf700 *R/stressplot.wcmdscale.R
 55b28298153f00b4c1f8574b0784eb0c *R/summary.anosim.R
 19ce7c501fff2cacc8ad322fd0500a48 *R/summary.bioenv.R
 7fea8ad8bbbfb61348faaa76ea44725b *R/summary.cca.R
@@ -445,7 +445,7 @@ ecfd48e2f4df6bcd683a87203dd80e12 *R/weights.cca.R
 9ed0ac2ab6e01950db0cc181a42e523f *R/weights.rda.R
 4138f57726620d493f218e5e3da0013c *R/wisconsin.R
 678368022e0d66a4fd7722ab6bcc8beb *R/zzz.R
-4d8569d7f6e105c0ec2bf1b1ba443226 *build/partial.rdb
+1a3d51bbeb652633dddc174617cb7c35 *build/partial.rdb
 bf482d265609ebdc74921368caf131a8 *build/vignette.rds
 72cc26156e4b9ce7e2655c228ab87107 *data/BCI.env.rda
 0a5c36b1ebd892c80a84d0d6417e1d6f *data/BCI.rda
@@ -462,23 +462,23 @@ ee3c343418d7cf2e435028adf93205f1 *data/sipoo.rda
 f87df84297865b5faf31e232e97a0f94 *data/varechem.rda
 7136b8666250a538d60c88869390a085 *data/varespec.rda
 1fb35aec7042529e18e4673818fecf7f *inst/ChangeLog
-04be21bf86569f2b3a6b1ef2dea9b9a2 *inst/NEWS.Rd
+c0c60e5e1f1147547308b6fcbe609e76 *inst/NEWS.Rd
 9abfab8b05c34dd283379a7d87500ffb *inst/ONEWS
 b21accfb0a73075d80634960e461ac7e *inst/doc/FAQ-vegan.R
-f986cedbb0f80cd1bdc50b53a87154a2 *inst/doc/FAQ-vegan.Rmd
-9ddaa4c26242a0722273755cb80ec754 *inst/doc/FAQ-vegan.html
+5a63786318301497a2ff53b27afd94e9 *inst/doc/FAQ-vegan.Rmd
+da32fa53640082fe265ae96e87445079 *inst/doc/FAQ-vegan.html
 92fd39278aa2666ce4fec88c032b33ed *inst/doc/decision-vegan.R
 c910da720c0da49de1808c688a450206 *inst/doc/decision-vegan.Rnw
-c23ea6c3a6db32a51807a6201d4035ad *inst/doc/decision-vegan.pdf
+3d2c3875806c04033b687357505ae477 *inst/doc/decision-vegan.pdf
 41fae44349a8a602825bddba8750102d *inst/doc/diversity-vegan.R
 06cfa11a83ca0330979d500549f2415a *inst/doc/diversity-vegan.Rnw
-52b38e91fa8bd7a2f232a9614552afa0 *inst/doc/diversity-vegan.pdf
+a2beada25992475d5dede853c59c77cb *inst/doc/diversity-vegan.pdf
 eff5665df3e4437135528b753d664a7f *inst/doc/intro-vegan.R
 6b35943a07c04a6afc77222b0e17b7f8 *inst/doc/intro-vegan.Rnw
-76a9e2ebf7276210b58ff429ed97010f *inst/doc/intro-vegan.pdf
+e162d90081bd39fdf06d12a604679da1 *inst/doc/intro-vegan.pdf
 d56c6fb7eaff59b945aad2459b96bce7 *inst/doc/partitioning.R
 5b17ce6c86e3334b796a658328d426f9 *inst/doc/partitioning.Rnw
-783e37c2b7cd7d42f49a0d93c759cb36 *inst/doc/partitioning.pdf
+36a5256cd81fe21d0f7bd04355b1593b *inst/doc/partitioning.pdf
 1f5ef97a44dee865f33b8eadb2e206c1 *man/BCI.Rd
 d4d97e3b71561f61bd9f1f0686a57434 *man/CCorA.Rd
 2b36702bf2b1931f955fb7dd9d044c99 *man/MDSrotate.Rd
@@ -492,7 +492,7 @@ fd218be03aa2591e5123d11780ccba1a *man/MOStest.Rd
 5b83e39817e231c0a01c8496fcde00dc *man/anova.cca.Rd
 c57af27fa11dadcd48981fcf42b2d221 *man/as.mlm.Rd
 8e3718248ff8d48e724654ab17caa2e2 *man/beals.Rd
-4901cdd1859b2f49cf62819031d0e64d *man/betadisper.Rd
+9e07f61d9bd0d75a548953907dde9148 *man/betadisper.Rd
 653c0566697c40d57405e1b6a06cd7c8 *man/betadiver.Rd
 b04c2fae35dba2d97cb248814d5e2fe9 *man/bgdispersal.Rd
 860b9c7f2325f500c27f3c903831efae *man/bioenv.Rd
@@ -524,7 +524,7 @@ afc00cd6ac8f9b56bffbbb77e369057d *man/goodness.metaMDS.Rd
 c8fea575af3da292987d4f8c4aa831b0 *man/indpower.Rd
 f7b596bf1541f22609fabbdd9be82791 *man/isomap.Rd
 1455f24df0b577f7f65a28c5826081d2 *man/kendall.global.Rd
-554ee3df1eca35eadde995d14e20780c *man/linestack.Rd
+00742b239a570c4c2d7cf0c82fbf159c *man/linestack.Rd
 59ce2773a5d92535708137747a52f358 *man/make.cepnames.Rd
 f8d6f3bd27a07dc00c6779405652ec07 *man/mantel.Rd
 85d798177d90587416f9ca88e2f445c9 *man/mantel.correlog.Rd
@@ -535,10 +535,10 @@ c50bd45c9e8c6e892d2dd8f7fe5f0bd9 *man/model.matrix.cca.Rd
 735dd0c405cedd8f6eeedddae86d86b4 *man/mrpp.Rd
 dedc3d36bc5430ef525ee1998206ed3b *man/mso.Rd
 7ed0b0f6beff14cc292c361550f562e8 *man/multipart.Rd
-9bc57e3bd36786573133cbddd63ba0a9 *man/nestedtemp.Rd
+53bf1a9a10f3b6febebffaaedf13f79d *man/nestedtemp.Rd
 c7f768b6f36aec4bc9d5b4c8f72c1141 *man/nobs.adonis.Rd
-9785ec12d621524ef2a081de68812a3d *man/nullmodel.Rd
-ab73188440cdbffe2f3e3889fc7d5959 *man/oecosimu.Rd
+e9de6d6e919df1849ccfa508904adf9b *man/nullmodel.Rd
+8bb0e002f5aed88241c0196e78d55716 *man/oecosimu.Rd
 990fc366c31c3695bd6ed0b1d82bb7fb *man/ordiArrowTextXY.Rd
 294b58bdae6b5439f25bf08c5eb7c483 *man/ordiarrows.Rd
 409cb3e47ce4d87875a43668b27cc04a *man/ordihull.Rd
@@ -593,17 +593,17 @@ ad48b24429d673e1af3120d0cf6c3eb3 *man/vegdist.Rd
 a2cc1d837017b4de0b4bec617e29533d *man/vegemite.Rd
 c3209a8eff0fe638d3a43b25ea5bec16 *man/wascores.Rd
 e8085b39e46823189e312a5776835adc *man/wcmdscale.Rd
-dd4512521b5b7a678f87c7f27d6b986c *src/cepin.f
+d706ad17bf9aaeab00cead307aeb2d3a *src/cepin.f
 dd22a1632081402e62320a4c0d6b2aa9 *src/data2hill.c
-7703ffdb64c5f31de56bfd8253877ad6 *src/decorana.f
+6f93283e7eba742ef97d0eb323db28eb *src/decorana.f
 87b05dd087e591f1f8e92ecbf1983207 *src/goffactor.c
-ee2c80e02663dc727c33c7fb76cc70b1 *src/monoMDS.f
+6edc5b9813b7a8545ff411295b2020d2 *src/monoMDS.f
 f64ced55260d166a69e691d592457228 *src/nestedness.c
-0299086afe16bd7a4b57835d1b11f6d8 *src/ordering.f
+77acc57d3a8492c99c324a4c4e585378 *src/ordering.f
 31bdbe9b08340e1662a62cf6e61ade6a *src/pnpoly.c
 b9b647fcf8a3e59e10b9351fae60ec06 *src/stepacross.c
 36ea09c9a6553010e786f0e787185d60 *src/vegdist.c
-f986cedbb0f80cd1bdc50b53a87154a2 *vignettes/FAQ-vegan.Rmd
+5a63786318301497a2ff53b27afd94e9 *vignettes/FAQ-vegan.Rmd
 c910da720c0da49de1808c688a450206 *vignettes/decision-vegan.Rnw
 06cfa11a83ca0330979d500549f2415a *vignettes/diversity-vegan.Rnw
 6b35943a07c04a6afc77222b0e17b7f8 *vignettes/intro-vegan.Rnw
diff --git a/R/adipart.default.R b/R/adipart.default.R
index da5a90d..03c9f36 100644
--- a/R/adipart.default.R
+++ b/R/adipart.default.R
@@ -10,7 +10,7 @@ function(y, x, index=c("richness", "shannon", "simpson"),
             leve_2=rep(1, nrow(lhs)))
     rhs <- data.frame(x)
     rhs[] <- lapply(rhs, as.factor)
-    rhs[] <- lapply(rhs, droplevels)
+    rhs[] <- lapply(rhs, droplevels, exclude = NA)
     nlevs <- ncol(rhs)
     if (nlevs < 2)
         stop("provide at least two level hierarchy")
diff --git a/R/as.mcmc.oecosimu.R b/R/as.mcmc.oecosimu.R
index fbb9518..36b5dfa 100644
--- a/R/as.mcmc.oecosimu.R
+++ b/R/as.mcmc.oecosimu.R
@@ -5,13 +5,12 @@
     if (!x$oecosimu$isSeq)
         stop("as.mcmc available only for sequential null models")
     ## named variables
-    varnames <- names(x$oecosimu$z)
-    x <- x$oecosimu$simulated
-    rownames(x) <- varnames
-    chains <- attr(x, "chains")
+    rownames(x$oecosimu$simulated) <- names(x$oecosimu$z)
+    chains <- attr(x$oecosimu$simulated, "chains")
     ## chains: will make each chain as an mcmc object and combine
     ## these to an mcmc.list
     if (!is.null(chains) && chains > 1) {
+        x <- x$oecosimu$simulated
         nsim <- dim(x)[2]
         niter <- nsim / chains
         ## iterate over chains
diff --git a/R/betadisper.R b/R/betadisper.R
index c29a0ba..a11f3c8 100644
--- a/R/betadisper.R
+++ b/R/betadisper.R
@@ -67,10 +67,10 @@
         type <- "median"
     type <- match.arg(type)
     ## checks for groups - need to be a factor for later
-    if(!is.factor(group)) {
-        group <- as.factor(group)
+    group <- if(!is.factor(group)) {
+        as.factor(group)
     } else { ## if already a factor, drop empty levels
-        group <- droplevels(group)
+        droplevels(group, exclude = NA) # need exclude = NA under Rdevel r71113
     }
     n <- attr(d, "Size")
     x <- matrix(0, ncol = n, nrow = n)
@@ -85,7 +85,7 @@
         n <- n - sum(gr.na)
         ## update labels
         labs <- labs[!gr.na]
-        warning("missing observations due to 'group' removed")
+        message("Missing observations due to 'group' removed")
     }
     ## remove NA's in d
     if(any(x.na <- apply(x, 1, function(x) any(is.na(x))))) {
@@ -95,7 +95,7 @@
         n <- n - sum(x.na)
         ## update labels
         labs <- labs[!x.na]
-        warning("missing observations due to 'd' removed")
+        message("Missing observations due to 'd' removed")
     }
     x <- x + t(x)
     x <- dblcen(x)
diff --git a/R/centroids.cca.R b/R/centroids.cca.R
index 3bd857a..26f863a 100644
--- a/R/centroids.cca.R
+++ b/R/centroids.cca.R
@@ -5,12 +5,14 @@
     if (!any(facts))
         return(NULL)
     mf <- mf[, facts, drop = FALSE]
-    mf <- droplevels(mf)
-    if (missing(wt)) 
+    ## Explicitly exclude NA as a level
+    mf <- droplevels(mf, exclude = NA)
+    if (missing(wt))
         wt <- rep(1, nrow(mf))
     ind <- seq_len(nrow(mf))
     workhorse <- function(x, wt)
         colSums(x * wt) / sum(wt)
+    ## As NA not a level, centroids only for non-NA levels of each factor
     tmp <- lapply(mf, function(fct)
                   tapply(ind, fct, function(i) workhorse(x[i,, drop=FALSE], wt[i])))
     tmp <- lapply(tmp, function(z) sapply(z, rbind))
@@ -23,7 +25,7 @@
         out <- matrix(unlist(tmp), nrow=1, dimnames = list(NULL, nm))
     } else {
         for (i in seq_along(tmp)) {
-            colnames(tmp[[i]]) <- paste(pnam[i], colnames(tmp[[i]]), 
+            colnames(tmp[[i]]) <- paste(pnam[i], colnames(tmp[[i]]),
                                         sep = "")
             out <- cbind(out, tmp[[i]])
         }
diff --git a/R/diversity.R b/R/diversity.R
index 43a049a..434909b 100644
--- a/R/diversity.R
+++ b/R/diversity.R
@@ -2,13 +2,15 @@
   function (x, index = "shannon", MARGIN = 1, base = exp(1)) 
 {
     x <- drop(as.matrix(x))
+    if (any(x < 0, na.rm = TRUE))
+        stop("input data must be non-negative")
     INDICES <- c("shannon", "simpson", "invsimpson")
     index <- match.arg(index, INDICES)
     if (length(dim(x)) > 1) {
         total <- apply(x, MARGIN, sum)
         x <- sweep(x, MARGIN, total, "/")
     } else {
-        x <- x/sum(x)
+        x <- x/(total <- sum(x))
     }
     if (index == "shannon")
         x <- -x * log(x, base)
@@ -22,5 +24,8 @@
         H <- 1 - H
     else if (index == "invsimpson") 
         H <- 1/H
+    ## check NA in data
+    if (any(is.na(total)))
+        is.na(H) <- is.na(total)
     H
 }
diff --git a/R/envfit.default.R b/R/envfit.default.R
index c1d2527..d6cf815 100644
--- a/R/envfit.default.R
+++ b/R/envfit.default.R
@@ -1,6 +1,6 @@
 `envfit.default` <-
-    function (ord, env, permutations = 999, strata = NULL, choices = c(1, 2), 
-             display = "sites", w = weights(ord), na.rm = FALSE, ...) 
+    function (ord, env, permutations = 999, strata = NULL, choices = c(1, 2),
+             display = "sites", w = weights(ord), na.rm = FALSE, ...)
 {
     weights.default <- function(object, ...) NULL
     w < eval(w)
@@ -13,7 +13,8 @@
         if (!na.rm)
             stop("missing values in data: consider na.rm = TRUE")
         X <- X[keep,, drop=FALSE]
-        env <- droplevels(env[keep,, drop=FALSE]) ## drop any lost levels
+        ## drop any lost levels, explicitly don't include NA as a level
+        env <- droplevels(env[keep,, drop=FALSE], exclude = NA)
         na.action <- structure(seq_along(keep)[!keep], class="omit")
     }
     ## make permutation matrix for all variables handled in the next loop
@@ -29,14 +30,14 @@
             Pfac <- env[, !vects, drop = FALSE]
             P <- env[, vects, drop = FALSE]
             if (length(P)) { # also have vectors
-                vectors <- vectorfit(X, P, permutations, strata, 
+                vectors <- vectorfit(X, P, permutations, strata,
                                      choices, w = w, ...)
             }
             factors <- factorfit(X, Pfac, permutations, strata,
                                          choices, w = w, ...)
             sol <- list(vector = vectors, factors = factors)
             }
-        else vectors <- vectorfit(X, env, permutations, strata, 
+        else vectors <- vectorfit(X, env, permutations, strata,
                                   choices, w = w, ...)
     }
     else vectors <- vectorfit(X, env, permutations, strata,
diff --git a/R/factorfit.R b/R/factorfit.R
index a392157..499e107 100644
--- a/R/factorfit.R
+++ b/R/factorfit.R
@@ -7,7 +7,7 @@
     if(any(!sapply(P, is.factor)))
         P <- data.frame(lapply(P, function(x)
                         if (is.factor(x)) x else factor(x)))
-    P <- droplevels(P) ## make sure only the used levels are present
+    P <- droplevels(P, exclude = NA) ## make sure only the used levels are present
     if (any(!sapply(P, is.factor)))
         stop("All non-numeric variables must be factors")
     NR <- nrow(X)
diff --git a/R/fitted.capscale.R b/R/fitted.capscale.R
index 89c6f09..c2d56f5 100644
--- a/R/fitted.capscale.R
+++ b/R/fitted.capscale.R
@@ -8,8 +8,10 @@
     type <- match.arg(type)
     ## Return scaled eigenvalues
     U <- switch(model,
-                CCA = object$CCA$u %*% diag(sqrt(object$CCA$eig)),
-                CA = object$CA$u %*% diag(sqrt(object$CA$eig)),
+                CCA = object$CCA$u %*% diag(sqrt(object$CCA$eig),
+                                            nrow = length(object$CCA$eig)),
+                CA = object$CA$u %*% diag(sqrt(object$CA$eig),
+                                          nrow = length(object$CA$eig)),
                 Imaginary = object$CA$imaginary.u.eig,
                 pCCA = object$pCCA$Fit/object$adjust)
     if (is.null(U))
diff --git a/R/goodness.cca.R b/R/goodness.cca.R
index cf96847..6187fb9 100644
--- a/R/goodness.cca.R
+++ b/R/goodness.cca.R
@@ -15,11 +15,20 @@
     w <- weights(object, display = display)
     pCCA <- object$pCCA$Fit
     CA <- object[[model]][[what]]
+    if (is.null(CA))
+        stop(gettextf("model = '%s' does not exist", model))
     eig <- object[[model]]$eig
-    eig <- eig[eig > 0]
+    if (!inherits(object, "dbrda"))
+        eig <- eig[eig > 0]
     ## imaginary dimensions for dbrda
     if (inherits(object, "dbrda"))
         CA <- cbind(CA, object[[model]][["imaginary.u"]])
+    ## take only chosen axes within the component
+    if (!missing(choices)) {
+        choices <- choices[choices <= ncol(CA)]
+        CA <- CA[, choices, drop = FALSE]
+        eig <- eig[choices]
+    }
     att <- attributes(CA)
     if (inherits(object, "rda"))
         nr <- nobs(object) - 1
@@ -33,8 +42,12 @@
         else
             pCCA <- diag(crossprod(pCCA))/nr
     }
-    CA <- t(apply(diag(w) %*% CA^2 %*% diag(eig), 1,
-                  cumsum))
+    CA <- t(apply(
+        diag(w, length(w)) %*% CA^2 %*% diag(eig, length(eig)),
+        1, cumsum))
+    ## rank=1 solutions comes out transposed: back transpose
+    if (length(eig) == 1)
+        CA <- t(CA)
     totals <- inertcomp(object, display = display)
     comps <- colnames(totals)
     if (statistic == "explained") {
diff --git a/R/hiersimu.default.R b/R/hiersimu.default.R
index 5d0da8c..cf1d38b 100644
--- a/R/hiersimu.default.R
+++ b/R/hiersimu.default.R
@@ -10,7 +10,7 @@ function(y, x, FUN, location = c("mean", "median"),
             leve_2=rep(1, nrow(lhs)))
     rhs <- data.frame(x)
     rhs[] <- lapply(rhs, as.factor)
-    rhs[] <- lapply(rhs, droplevels)
+    rhs[] <- lapply(rhs, droplevels, exclude = NA)
     nlevs <- ncol(rhs)
     if (is.null(colnames(rhs)))
         colnames(rhs) <- paste("level", 1:nlevs, sep="_")
diff --git a/R/inertcomp.R b/R/inertcomp.R
index e6591d3..c3acc1d 100644
--- a/R/inertcomp.R
+++ b/R/inertcomp.R
@@ -40,9 +40,11 @@
             pCCA <- diag(crossprod(pCCA))/nr
     }
     if (!is.null(CCA))
-        CCA <- rowSums(diag(w) %*% CCA^2 %*% diag(object$CCA$eig))
+        CCA <- rowSums(diag(w, length(w)) %*% CCA^2 %*%
+                           diag(object$CCA$eig, length(object$CCA$eig)))
     if (!is.null(CA))
-        CA <- rowSums(diag(w) %*% CA^2 %*% diag(object$CA$eig))
+        CA <- rowSums(diag(w, length(w)) %*% CA^2 %*%
+                          diag(object$CA$eig, length(object$CA$eig)))
     out <- cbind(pCCA, CCA, CA)
     if (statistic == "distance" && !proportional) {
         w <- weights(object, display = display)
diff --git a/R/linestack.R b/R/linestack.R
index 7c221f7..466d668 100644
--- a/R/linestack.R
+++ b/R/linestack.R
@@ -10,11 +10,12 @@
     if (misslab) {
         labels <- names(x)
     }
-    if (!is.character(labels))
-        labels <- as.character(labels)
+    if (!is.expression(labels) && !is.character(labels)) {
+        labels <- as.character(labels)  # coerce to character only if not expressions
+    }
     nlab <- length(labels)
     if (!misslab && nlab == 1L && pmatch(labels, c("right", "left"),
-                    nomatch = FALSE)) {
+                                         nomatch = FALSE)) {
         side <- labels
         labels <- NULL
         warning("argument 'label' is deprecated: use 'side'")
diff --git a/R/meandist.R b/R/meandist.R
index 8d0392a..c6692ae 100644
--- a/R/meandist.R
+++ b/R/meandist.R
@@ -20,8 +20,10 @@
     take <- matrix(TRUE, nlevels(grouping), nlevels(grouping))
     diag(take) <- n > 1
     take[upper.tri(take)] <- FALSE
+    out <- matrix(NA, nlevels(grouping), nlevels(grouping))
     ## Get output matrix
-    out <- tapply(dist, list(cl1, cl2), mean)
+    tmp <- tapply(dist, list(cl1, cl2), mean)
+    out[take] <- tmp[!is.na(tmp)]
     out[upper.tri(out)] <- t(out)[upper.tri(out)]
     rownames(out) <- colnames(out) <- levels(grouping)
     class(out) <- c("meandist", "matrix")
diff --git a/R/multipart.default.R b/R/multipart.default.R
index 2ece325..66eba2d 100644
--- a/R/multipart.default.R
+++ b/R/multipart.default.R
@@ -12,7 +12,7 @@
             leve_2=rep(1, nrow(lhs)))
     rhs <- data.frame(x)
     rhs[] <- lapply(rhs, as.factor)
-    rhs[] <- lapply(rhs, droplevels)
+    rhs[] <- lapply(rhs, droplevels, exclude = NA)
     nlevs <- ncol(rhs)
     if (nlevs < 2)
         stop("provide at least two level hierarchy")
diff --git a/R/nestedbetasor.R b/R/nestedbetasor.R
index b4e2406..bba6ee9 100644
--- a/R/nestedbetasor.R
+++ b/R/nestedbetasor.R
@@ -12,7 +12,7 @@
     diffbc <- sum(abs(b-c))
     sumbc <- sum(b+c)
     bmin <- sum(pmin(b, c))
-    a <- sum(comm) - sum(colSums(comm) > 0)
+    a <- sum(comm > 0) - sum(colSums(comm) > 0)
     simpson <- bmin/(bmin + a)
     nest <- a/(bmin + a) * diffbc/(2*a + sumbc)
     sorensen <- sumbc/(2*a + sumbc)
@@ -28,7 +28,7 @@
     diffbc <- sum(abs(b-c))
     sumbc <- sum(b+c)
     bmin <- sum(pmin(b, c))
-    a <- sum(comm) - sum(colSums(comm) > 0)
+    a <- sum(comm > 0) - sum(colSums(comm) > 0)
     simpson <- 2*bmin/(2*bmin + a)
     nest <- a/(2*bmin + a) * diffbc/(a + sumbc)
     jaccard <- sumbc/(a + sumbc)
diff --git a/R/ordisplom.R b/R/ordisplom.R
index 6f52a99..7d6582c 100644
--- a/R/ordisplom.R
+++ b/R/ordisplom.R
@@ -15,7 +15,7 @@
   else {
     formula <- as.formula(gsub("\\.", "x", deparse(formula)))
     pl <- localSplom(x = formula, data = data,  panel = panel, type = type,
-                     bitplot = env, ...)
+                     biplot = env, ...)
   }
   pl
 }
diff --git a/R/rarefy.R b/R/rarefy.R
index 13dad3a..53cf857 100644
--- a/R/rarefy.R
+++ b/R/rarefy.R
@@ -33,7 +33,9 @@
             Jxx <- Jxx[ind]
             V <- V + 2 * sum(ifelse(Jxx < sample, 0, exp(lchoose(Jxx, 
                                                                  sample) - ldiv)) - outer(p1, p1)[ind])
-            out <- cbind(out, sqrt(V))
+            ## V is >= 0, but numerical zero can be negative (e.g,
+            ## -1e-16), and we avoid taking its square root
+            out <- cbind(out, sqrt(max(V, 0)))
         }
         out
     }
diff --git a/R/stressplot.wcmdscale.R b/R/stressplot.wcmdscale.R
index ca622ed..02304ec 100644
--- a/R/stressplot.wcmdscale.R
+++ b/R/stressplot.wcmdscale.R
@@ -50,10 +50,15 @@
     u <- cbind(object$CCA$u, object$CA$u)
     v <- cbind(object$CCA$v, object$CA$v)
     ev <- c(object$CCA$eig, object$CA$eig)
+    ## check that k does not exceed rank
+    if (k > length(ev)) {
+        warning(gettextf("max allowed rank is k = %d", length(ev)))
+        k <- min(k, length(ev))
+    }
     ## normalizing constant
     nr <- NROW(u)
     const <- sqrt(ev * (nr-1))
-    u <- u %*% diag(const)
+    u <- u %*% diag(const, length(const))
     ## Distances
     Xbar <- u %*% t(v)
     Xbark <- u[, seq_len(k), drop = FALSE] %*% t(v[, seq_len(k), drop = FALSE])
@@ -83,9 +88,14 @@
     u <- cbind(object$CCA$u, object$CA$u)
     sev <- sqrt(c(object$CCA$eig, object$CA$eig))
     w <- sqrt(object$rowsum)
-    u <- diag(w) %*% u %*% diag(sev)
+    u <- diag(w) %*% u %*% diag(sev, length(sev))
     v <- cbind(object$CCA$v, object$CA$v)
     v <- diag(sqrt(object$colsum)) %*% v
+    ## check that k <= rank
+    if (k > length(sev)) {
+        warning(gettextf("max allowed rank is k = %d", length(sev)))
+        k <- min(k, length(sev))
+    }
     ## Distances
     Xbar <- u %*% t(v)
     Xbark <- u[,seq_len(k), drop = FALSE] %*% t(v[,seq_len(k), drop = FALSE])
@@ -121,7 +131,7 @@
         const <- sqrt(NROW(u) - 1)
     else
         const <- 1
-    u <- u %*% diag(sqrt(ev) * const)
+    u <- u %*% diag(sqrt(ev) * const, length(ev))
     ## Constrained ordination needs also scores 'v' to reconstruct
     ## 'data', but these are not returned by capscale() which replaces
     ## original 'v' with weighted sums of 'comm' data.
diff --git a/build/partial.rdb b/build/partial.rdb
index 8e3af07..5aabe92 100644
Binary files a/build/partial.rdb and b/build/partial.rdb differ
diff --git a/inst/NEWS.Rd b/inst/NEWS.Rd
index 745eea8..7b7114a 100644
--- a/inst/NEWS.Rd
+++ b/inst/NEWS.Rd
@@ -2,6 +2,82 @@
 \title{vegan News}
 \encoding{UTF-8}
 
+\section{Changes in version 2.4-1}{
+  \subsection{INSTALLATION}{
+    \itemize{
+
+      \item Fortran code was modernized to avoid warnings in latest
+      \R. The modernization should have no visible effect in
+      functions. Please report all suspect cases as
+      \href{https://github.com/vegandevs/vegan/issues/}{vegan issues}.
+
+    } %itemize
+  } % installation
+
+  
+  \subsection{BUG FIXES}{
+    \itemize{
+
+      \item Several support functions for ordination methods failed if
+      the solution had only one ordination axis, for instance, if
+      there was only one constraining variable in CCA, RDA and
+      friends. This concerned \code{goodness} for constrained
+      ordination, \code{inertcomp}, \code{fitted} for
+      \code{capscale}, \code{stressplot} for RDA, CCA (GitHub issue
+      \href{https://github.com/vegandevs/vegan/issues/189}{#189}).
+
+      \item \code{goodness} for CCA & friends ignored \code{choices}
+      argument (GitHub issue
+      \href{https://github.com/vegandevs/vegan/issues/190}{#190}).
+
+      \item \code{goodness} function did not consider negative
+      eigenvalues of db-RDA (function \code{dbrda}).
+
+      \item Function \code{meandist} failed in some cases when one of
+      the groups had only one observation.
+
+      \item \code{linestack} could not handle expressions in
+      \code{labels}. This regression is discussed in GitHub issue
+      \href{https://github.com/vegandevs/vegan/issues/195}{#195}.
+
+      \item Nestedness measures \code{nestedbetajac} and
+      \code{nestedbetasor} expecting binary data did not cope with
+      quantitative input in evaluating Baselga's matrix-wide Jaccard
+      or Sørensen dissimilarity indices.
+
+      \item Function \code{as.mcmc} to cast \code{oecosimu} result to an
+      MCMC object (\pkg{coda} package) failed if there was only one
+      chain.
+
+    } % itemize
+  } % bug fixes
+
+  \subsection{NEW FEATURES}{
+    \itemize{
+
+      \item \code{diversity} function returns now \code{NA} if the
+      observation had \code{NA} values instead of returning
+      \code{0}. The function also checks the input and refuses to
+      handle data with negative values.  GitHub issue
+      \href{https://github.com/vegandevs/vegan/issues/187}{#187}.
+
+      \item \code{rarefy} function will work more robustly in marginal
+      case when the user asks for only one individual which can only
+      be one species with zero variance.
+
+      \item Several functions are more robust if their factor arguments
+      contain missing values (\code{NA}): \code{betadisper},
+      \code{adipart}, \code{multipart}, \code{hiersimu}, \code{envfit}
+      and constrained ordination methods \code{cca}, \code{rda},
+      \code{capscale} and \code{dbrda}. GitHub issues
+      \href{https://github.com/vegandevs/vegan/issues/192}{#192} and
+      \href{https://github.com/vegandevs/vegan/issues/193}{#193}.
+
+    } % itemize
+  } % new features
+
+} % 2.4-1
+
 \section{Changes in version 2.4-0}{
   \subsection{DISTANCE-BASED ANALYSIS}{
      \itemize{
diff --git a/inst/doc/FAQ-vegan.Rmd b/inst/doc/FAQ-vegan.Rmd
index 1e07b2d..3c58581 100644
--- a/inst/doc/FAQ-vegan.Rmd
+++ b/inst/doc/FAQ-vegan.Rmd
@@ -45,7 +45,7 @@ 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
+R has a home page at <https://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”).
@@ -55,7 +55,7 @@ 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
+[CRAN](https://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/),
@@ -86,7 +86,7 @@ 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
+CRAN [Task Views](https://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
@@ -145,7 +145,7 @@ be used in publications.
 
 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
+[CRAN](https://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
diff --git a/inst/doc/FAQ-vegan.html b/inst/doc/FAQ-vegan.html
index 7470ad1..7c68fd0 100644
--- a/inst/doc/FAQ-vegan.html
+++ b/inst/doc/FAQ-vegan.html
@@ -248,7 +248,7 @@ 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
+<p>R has a home page at <a href="https://www.R-project.org/">https://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>
@@ -258,7 +258,7 @@ an official part of the <a href="http://www.gnu.org/">GNU</a> project (“GNU S
 <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
+<a href="https://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>,
@@ -289,7 +289,7 @@ non-standard packages <strong>rgl</strong> and <strong>scatterplot3d</strong>.</
 
 <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
+<p>CRAN <a href="https://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
@@ -352,7 +352,7 @@ be used in publications.</p>
 
 <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
+<a href="https://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
diff --git a/inst/doc/decision-vegan.pdf b/inst/doc/decision-vegan.pdf
index e341094..b6331e5 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 26a1bee..35d1ae4 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 55cdb23..3d20ab1 100644
Binary files a/inst/doc/intro-vegan.pdf and b/inst/doc/intro-vegan.pdf differ
diff --git a/inst/doc/partitioning.pdf b/inst/doc/partitioning.pdf
index aa1ab43..68b648e 100644
Binary files a/inst/doc/partitioning.pdf and b/inst/doc/partitioning.pdf differ
diff --git a/man/betadisper.Rd b/man/betadisper.Rd
index 27476c6..97ba3d5 100644
--- a/man/betadisper.Rd
+++ b/man/betadisper.Rd
@@ -313,7 +313,7 @@ group <- factor(rep("grazed", NROW(varespec)))
 ## using spatial medians
 groups[c(2,20)] <- NA
 dis[c(2, 20)] <- NA
-mod2 <- betadisper(dis, groups) ## warnings
+mod2 <- betadisper(dis, groups) ## messages
 mod2
 permutest(mod2, permutations = 99)
 anova(mod2)
diff --git a/man/linestack.Rd b/man/linestack.Rd
index fdfeaf1..6c797d0 100644
--- a/man/linestack.Rd
+++ b/man/linestack.Rd
@@ -54,7 +54,7 @@ ord <- rda(df, scale = TRUE)
 ### vector of expressions for labels
 labs <- expression(Ca^{2+phantom()},
                    NO[3]^{-phantom()},
-                   SO[4]^{-2},
+                   SO[4]^{2-phantom()},
                    K^{+phantom()})
 scl <- "sites"
 linestack(scores(ord, choices = 1, display = "species", scaling = scl),
diff --git a/man/nestedtemp.Rd b/man/nestedtemp.Rd
index cb10295..d5cbf53 100644
--- a/man/nestedtemp.Rd
+++ b/man/nestedtemp.Rd
@@ -125,21 +125,22 @@ nestedbetajac(comm)
 
   Functions \code{nestedbetasor} and \code{nestedbetajac} find
   multiple-site dissimilarities and decompose these into components of
-  turnover and nestedness following Baselga (2010). This can be seen
-  as a decomposition of beta diversity (see \code{\link{betadiver}}).
-  Function \code{nestedbetasor} uses \enc{Sørensen}{Sorensen}
-  dissimilarity and the turnover component is Simpson dissimilarity
-  (Baselga 2010), and \code{nestedbetajac} uses analogous methods with
-  the Jaccard index. The functions return a vector of three items:
-  turnover, nestedness and their sum which is the multiple
-  \enc{Sørensen}{Sorensen} or Jaccard dissimilarity. The last one is
-  the total beta diversity (Baselga 2010). The functions will treat
-  data as presence/absence (binary) and they can be used with binary
-  \code{\link{nullmodel}}). The overall dissimilarity is constant in
-  all \code{\link{nullmodel}}s that fix species (column) frequencies
-  (\code{"c0"}), and all components are constant if row columns are
-  also fixed (e.g., model \code{"quasiswap"}), and the functions are
-  not meaningful with these null models.
+  turnover and nestedness following Baselga (2012); the pairwise
+  dissimilarities can be found with \code{\link{designdist}}. This can
+  be seen as a decomposition of beta diversity (see
+  \code{\link{betadiver}}).  Function \code{nestedbetasor} uses
+  \enc{Sørensen}{Sorensen} dissimilarity and the turnover component is
+  Simpson dissimilarity (Baselga 2012), and \code{nestedbetajac} uses
+  analogous methods with the Jaccard index. The functions return a
+  vector of three items: turnover, nestedness and their sum which is
+  the multiple \enc{Sørensen}{Sorensen} or Jaccard dissimilarity. The
+  last one is the total beta diversity (Baselga 2012). The functions
+  will treat data as presence/absence (binary) and they can be used
+  with binary \code{\link{nullmodel}}). The overall dissimilarity is
+  constant in all \code{\link{nullmodel}}s that fix species (column)
+  frequencies (\code{"c0"}), and all components are constant if row
+  columns are also fixed (e.g., model \code{"quasiswap"}), and the
+  functions are not meaningful with these null models.
 
 }
 
@@ -165,9 +166,9 @@ nestedbetajac(comm)
   disorder in the distribution of species in fragmented
   habitat. \emph{Oecologia} 96, 373--382.
 
-  Baselga, A. (2010). Partitioning the turnover and nestedness
-  components of beta diversity. \emph{Global Ecol. Biogeog.} 19,
-  134--143.
+  Baselga, A. (2012). The relationship between species replacement,
+  dissimilarity derived from nestedness, and nestedness. \emph{Global
+  Ecol. Biogeog.} 21, 1223--1232.
 
   Brualdi, R.A. & Sanderson, J.G. (1999). Nested species subsets, gaps,
   and discrepancy. \emph{Oecologia} 119, 256--264.
diff --git a/man/nullmodel.Rd b/man/nullmodel.Rd
index e8fa444..14e8e80 100644
--- a/man/nullmodel.Rd
+++ b/man/nullmodel.Rd
@@ -21,10 +21,9 @@ object without sampling (effective for sequential algorithms).
 \usage{
 nullmodel(x, method)
 \method{print}{nullmodel}(x, ...)
-\method{simulate}{nullmodel}(object, nsim = 1,
-seed = NULL, burnin = 0, thin = 1, ...)
-\method{update}{nullmodel}(object, nsim = 1,
-seed = NULL, ...)
+\method{simulate}{nullmodel}(object, nsim = 1, seed = NULL,
+    burnin = 0, thin = 1, ...)
+\method{update}{nullmodel}(object, nsim = 1, seed = NULL, ...)
 \method{print}{simmat}(x, ...)
 smbind(object, ..., MARGIN, strict = TRUE)
 }
@@ -76,8 +75,8 @@ Active only for sequential null model algorithms.
 Ignored for non-sequential null model algorithms.
 }
   \item{MARGIN}{
-Integer, indicating the dimansion over which multiple
-\code{simmat} objects are to be boud together by \code{smbind}.
+Integer, indicating the dimension over which multiple
+\code{simmat} objects are to be bound together by \code{smbind}.
 1: matrices are stacked (row bound), 2: matrices are column bound,
 3: iterations are combined. Needs to be of length 1.
 The other dimensions are expected to match across the objects.
diff --git a/man/oecosimu.Rd b/man/oecosimu.Rd
index 12974b6..f7efea5 100644
--- a/man/oecosimu.Rd
+++ b/man/oecosimu.Rd
@@ -266,6 +266,22 @@ foo <- function(x, n, nr, nc, ...) {
 cf <- commsim("myshuffle", foo, isSeq = FALSE, binary = FALSE, 
    mode = "double")
 oecosimu(dune, meandist, cf)
+
+## Use pre-built null model
+nm <- simulate(nullmodel(sipoo, "curveball"), 99)
+oecosimu(nm, nestedchecker)
+## Several chains of a sequential model -- this can be generalized
+## for parallel processing (see ?smbind)
+nm <- replicate(5, simulate(nullmodel(sipoo, "swap"), 99,
+   thin=10, burnin=100), simplify = FALSE)
+## nm is now a list of nullmodels: use smbind to combine these into one
+## nullmodel with several chains
+nm <- smbind(nm, MARGIN = 3)
+nm
+oecosimu(nm, nestedchecker)
+## After this you can use as.mcmc() and tools in the coda package to
+## analyse the chains (these will show that thin, burnin and nsimul are
+## all too low for real analysis).
 }
 \keyword{ multivariate }
 \keyword{ datagen }
diff --git a/src/cepin.f b/src/cepin.f
index d359b35..65ac412 100644
--- a/src/cepin.f
+++ b/src/cepin.f
@@ -25,10 +25,10 @@ C
 
       subroutine cephead(cepfile, kind, nitem, nst, fmt)
 
-      character*255 cepfile, fmt
+      character (len=255) cepfile, fmt
       integer kind, nitem, nst
 
-      character*80 title
+      character (len=80) title
       integer ni, nbrac
 
       ni=0
@@ -74,7 +74,7 @@ c
       subroutine cepopen(fmt, nitem, maxdat, nsp, nst, idplot, idspec, 
      X abund, work, ier)
 
-      character*255 fmt
+      character (len=255) fmt
       integer nitem, nsp, nst
       integer idplot(maxdat), idspec(maxdat)
       double precision abund(maxdat)
@@ -119,7 +119,7 @@ C
       subroutine cepcond(fmt, nitem, maxdat, nsp, nst, idplot, idspec, 
      X abund, work, item, ier)
 
-      character*255 fmt
+      character (len=255) fmt
       integer nitem, nsp, nst
       integer idplot(maxdat), idspec(maxdat)
       double precision abund(maxdat)
@@ -208,7 +208,7 @@ c     handled line by line.
 c
 
       subroutine cepnames(entname)
-      character*255 entname
+      character (len=255) entname
       read (1,1100, end=666) entname  
  1100 format (a80)
  666  continue
diff --git a/src/decorana.f b/src/decorana.f
index a7125ad..609ae64 100644
--- a/src/decorana.f
+++ b/src/decorana.f
@@ -49,7 +49,8 @@ C---      iax=ifix((x(i)-axmin)/axbit)+3
       iax=int((x(i)-axmin)/axbit)+3
       if(iax.lt.3) iax=3
       if(iax.gt.maxk) iax=maxk
-   10 ix(i)=iax
+      ix(i)=iax
+ 10   continue
       return
       end
 c
@@ -73,7 +74,8 @@ c them (in the case of reciprocal averaging).
       integer ix1(mi),ix2(mi),ix3(mi),idat(nid),ibegin(mi),iend(mi)
       call yxmult(y,x,mi,n,nid,ibegin,iend,idat,qidat)
       do 10 i=1,mi
-   10 x(i)=x(i)/aidot(i)
+      x(i)=x(i)/aidot(i)
+ 10   continue
       if(neig.eq.0) goto 200
       if(ira.eq.1) goto 100
       call detrnd(x,aidot,ix1,mi,mk)
@@ -86,21 +88,27 @@ c them (in the case of reciprocal averaging).
       goto 200
   100 a1=0.0
       do 110 i=1,mi
-  110 a1=a1+aidot(i)*x(i)*xeig1(i)
+      a1=a1+aidot(i)*x(i)*xeig1(i)
+ 110  continue
       do 120 i=1,mi
-  120 x(i)=x(i)-a1*xeig1(i)
+      x(i)=x(i)-a1*xeig1(i)
+ 120  continue
       if(neig.eq.1) goto 200
       a2=0.0
       do 130 i=1,mi
-  130 a2=a2+aidot(i)*x(i)*xeig2(i)
+      a2=a2+aidot(i)*x(i)*xeig2(i)
+ 130  continue
       do 140 i=1,mi
-  140 x(i)=x(i)-a2*xeig2(i)
+      x(i)=x(i)-a2*xeig2(i)
+ 140  continue
       if(neig.eq.2) goto 200
       a3=0.0
       do 150 i=1,mi
-  150 a3=a3+aidot(i)*x(i)*xeig3(i)
+      a3=a3+aidot(i)*x(i)*xeig3(i)
+ 150  continue
       do 160 i=1,mi
-  160 x(i)=x(i)-a3*xeig3(i)
+      x(i)=x(i)-a3*xeig3(i)
+ 160  continue
   200 call xymult(x,yy,mi,n,nid,ibegin,iend,idat,qidat)
       return
       end
@@ -116,20 +124,25 @@ c can be obtained, corresponding to 3 possible starting positions
 c for the blocks of 3.
       do 10 k=1,mk
       z(k)=0.0
-   10 zn(k)=0.0
+      zn(k)=0.0
+ 10   continue
       do 20 i=1,mi
       k=ix(i)
       z(k)=z(k)+x(i)*aidot(i)
-   20 zn(k)=zn(k)+aidot(i)
+      zn(k)=zn(k)+aidot(i)
+ 20   continue
       mmk=mk-1
       do 30 k=2,mmk
-   30 zbar(k)=(z(k-1)+z(k)+z(k+1))/(zn(k-1)+zn(k)+zn(k+1)+1.0e-12)
+      zbar(k)=(z(k-1)+z(k)+z(k+1))/(zn(k-1)+zn(k)+zn(k+1)+1.0e-12)
+ 30   continue
       mmk=mmk-1
       do 35 k=3,mmk
-   35 z(k)=(zbar(k-1)+zbar(k)+zbar(k+1))/3.0
+      z(k)=(zbar(k-1)+zbar(k)+zbar(k+1))/3.0
+ 35   continue
       do 40 i=1,mi
       k=ix(i)
- 40   x(i)=x(i)-z(k)
+      x(i)=x(i)-z(k)
+ 40   continue
       return
       end
 
@@ -143,21 +156,26 @@ c J. Oksanen 1 Oct, 2010.
       integer ix(mi)
       do 10 k=1,mk
       z(k)=0.0
-   10 zn(k)=0.0
+      zn(k)=0.0
+ 10   continue
       do 20 i=1,mi
       k=ix(i)
       z(k)=z(k)+x(i)*aidot(i)
-   20 zn(k)=zn(k)+aidot(i)
+      zn(k)=zn(k)+aidot(i)
+ 20   continue
       mmk=mk-1
       do 30 k=2,mmk
-   30 zbar(k)=(z(k-1)+z(k)+z(k+1))/(zn(k-1)+zn(k)+zn(k+1)+1.0e-12)
+      zbar(k)=(z(k-1)+z(k)+z(k+1))/(zn(k-1)+zn(k)+zn(k+1)+1.0e-12)
+ 30   continue
       mmk=mmk-1
       do 35 k=3,mmk
-   35 z(k)=(zbar(k-1)+zbar(k)+zbar(k+1))/3.0
+      z(k)=(zbar(k-1)+zbar(k)+zbar(k+1))/3.0
+ 35   continue
       do 40 i=1,mi
       k=ix(i)
       fit(i) = z(k)
-   40 x(i)=x(i)-z(k)
+      x(i)=x(i)-z(k)
+ 40   continue
       return
       end
 c
@@ -178,12 +196,13 @@ c (subroutine strtch).
       double precision qidat(nid)
       integer ibegin(mi),iend(mi),idat(nid),ix1(mi),ix2(mi),ix3(mi)
 c strings to print R warnings
-      character*64 warning
-      character*2 axnam
+      character (len=64) warning
+      character (len=2) axnam
       tot=0.0
       do 10 j=1,n
       tot=tot+adotj(j)
-   10 y(j)=float(j)
+      y(j)=float(j)
+ 10   continue
       y(1)=1.1
 c---tolerance reduced by p.minchin jan 1997
 c      tol=0.0001
@@ -194,16 +213,19 @@ c      tol=0.0001
       icount=0
    20 a=0.0
       do 30 j=1,n
-   30 a=a+y(j)*adotj(j)
+      a=a+y(j)*adotj(j)
+ 30   continue
       a=a/tot
       ex=0.0
       do 40 j=1,n
       ay=y(j)-a
       ex=ex+ay*ay*adotj(j)
-   40 y(j)=ay
+      y(j)=ay
+ 40   continue
       ex=sqrt(ex)
       do 50 j=1,n
-   50 y(j)=y(j)/ex
+       y(j)=y(j)/ex
+ 50   continue
       call trans(y,y2,
      1x,neig,ira,aidot,xeig1,xeig2,xeig3,ix1,ix2,ix3,
      2mi,mk,n,nid,ibegin,iend,idat,qidat)
@@ -219,15 +241,18 @@ c      tol=0.0001
       ay=y2(j)
       y2(j)=ay/adotj(j)
       a=a+ay
-   60 a11=a11+ay*y(j)
+      a11=a11+ay*y(j)
+ 60   continue
       a=a/tot
       do 70 j=1,n
       ay=y2(j)-(a+a11*y(j))
       a12=a12+ay*ay*adotj(j)
-   70 y2(j)=ay
+      y2(j)=ay
+ 70   continue
       a12=sqrt(a12)
       do 80 j=1,n
-   80 y2(j)=y2(j)/a12
+      y2(j)=y2(j)/a12
+ 80   continue
 c---------removed write statements--------------------------
 c      if(icount.eq.0) write(*,1000)
 c 1000 format(/1x)
@@ -248,19 +273,22 @@ c      if(icount.gt.9) goto 200
       y3(j)=ay/adotj(j)
       a=a+ay
       a22=a22+ay*y2(j)
-   90 b13=b13+ay*y(j)
+      b13=b13+ay*y(j)
+ 90   continue
       a=a/tot
       do 100 j=1,n
       ay=y3(j)-(a+a22*y2(j)+b13*y(j))
       a23=a23+ay*ay*adotj(j)
-  100 y3(j)=ay
+      y3(j)=ay
+ 100  continue
       a23=sqrt(a23)
       if(a23.gt.tol) goto 105
       a23=0.0
       goto 160
   105 continue
       do 110 j=1,n
-  110 y3(j)=y3(j)/a23
+      y3(j)=y3(j)/a23
+ 110  continue
       call trans(y3,y4,
      1x,neig,ira,aidot,xeig1,xeig2,xeig3,ix1,ix2,ix3,
      2mi,mk,n,nid,ibegin,iend,idat,qidat)
@@ -273,24 +301,28 @@ c      if(icount.gt.9) goto 200
       a=a+ay
       a33=a33+ay*y3(j)
       b14=b14+ay*y(j)
-  120 b24=b24+ay*y2(j)
+      b24=b24+ay*y2(j)
+ 120  continue
       a=a/tot
       do 130 j=1,n
       ay=y4(j)-(a+a33*y3(j)+b14*y(j)+b24*y2(j))
       a34=a34+ay*ay*adotj(j)
-  130 y4(j)=ay
+      y4(j)=ay
+ 130  continue
       a34=sqrt(a34)
       if(a34.gt.tol) goto 135
       a34=0.0
       goto 160
   135 continue
       do 140 j=1,n
-  140 y4(j)=y4(j)/a34
+      y4(j)=y4(j)/a34
+ 140  continue
       call trans(y4,y5,
      1x,neig,ira,aidot,xeig1,xeig2,xeig3,ix1,ix2,ix3,
      2mi,mk,n,nid,ibegin,iend,idat,qidat)
       do 150 j=1,n
-  150 a44=a44+y4(j)*y5(j)
+      a44=a44+y4(j)*y5(j)
+ 150  continue
 c we now have the tridiagonal representation of trans.  solve
 c eigenproblem for tridiagonal matrix.
   160 ax1=1.0
@@ -319,7 +351,8 @@ c eigenproblem for tridiagonal matrix.
   170 continue
   180 continue
       do 190 j=1,n
-  190 y(j)=ax1*y(j)+ax2*y2(j)+ax3*y3(j)+ax4*y4(j)
+      y(j)=ax1*y(j)+ax2*y2(j)+ax3*y3(j)+ax4*y4(j)
+ 190  continue
       goto 20
 c-----------Removed write statements, added 200 continue--------
  200  continue
@@ -344,10 +377,12 @@ c averaging option is in force (ira=1)
       sign=1.0
       if(-aymin.gt.aymax) sign=-1.0
       do 210 j=1,n
-  210 y(j)=y(j)*sign
+      y(j)=y(j)*sign
+ 210  continue
       call yxmult(y,x,mi,n,nid,ibegin,iend,idat,qidat)
       do 220 i=1,mi
-  220 x(i)=x(i)/aidot(i)
+      x(i)=x(i)/aidot(i)
+ 220  continue
       if(iresc.eq.0) goto 225
       if(a11.gt.0.999) goto 225
       do 223 i=1,iresc
@@ -360,12 +395,15 @@ c averaging option is in force (ira=1)
       return
   225 axlong=0.0
       do 230 i=1,mi
-  230 axlong=axlong+aidot(i)*x(i)**2
+      axlong=axlong+aidot(i)*x(i)**2
+ 230  continue
       axlong=sqrt(axlong)
       do 240 i=1,mi
-  240 x(i)=x(i)/axlong
+      x(i)=x(i)/axlong
+ 240  continue
       do 250 j=1,n
-  250 y(j)=y(j)/axlong
+      y(j)=y(j)/axlong
+ 250  continue
 c it remains to scale y to unit within-sample standard deviation
       sumsq=0.0
       do 260 i=1,mi
@@ -374,7 +412,8 @@ c it remains to scale y to unit within-sample standard deviation
       ax=x(i)
       do 255 id=id1,id2
       j=idat(id)
-  255 sumsq=sumsq+qidat(id)*(ax-y(j))**2
+      sumsq=sumsq+qidat(id)*(ax-y(j))**2
+ 255  continue
   260 continue
       sd=sqrt(sumsq/tot)
       if(a11.le.0.999) goto 265
@@ -383,7 +422,8 @@ c it remains to scale y to unit within-sample standard deviation
       if(sd1.gt.sd) sd=sd1
   265 continue
       do 270 j=1,n
-  270 y(j)=y(j)/sd
+      y(j)=y(j)/sd
+ 270  continue
       eig=a11
       return
       end
@@ -394,14 +434,16 @@ c starts with vector x and forms matrix product y=ax
       double precision x(mi),y(n),qidat(nid)
       integer ibegin(mi),iend(mi),idat(nid)
       do 10 j=1,n
-   10 y(j)=0.0
+      y(j)=0.0
+ 10   continue
       do 30 i=1,mi
       id1=ibegin(i)
       id2=iend(i)
       ax=x(i)
       do 20 id=id1,id2
       j=idat(id)
-   20 y(j)=y(j)+ax*qidat(id)
+      y(j)=y(j)+ax*qidat(id)
+ 20   continue
    30 continue
       return
       end
@@ -417,8 +459,10 @@ c starts with vector y and forms matrix product x=ay
       ax=0.0
       do 10 id=id1,id2
       j=idat(id)
-   10 ax=ax+y(j)*qidat(id)
-   20 x(i)=ax
+      ax=ax+y(j)*qidat(id)
+ 10   continue
+      x(i)=ax
+ 20   continue
       return
       end
 c
@@ -459,7 +503,8 @@ c      common /lunits/ iuinp1,iuinp2,iuout1,iuout2,iuout3
       call smooth(zn,mk)
       zvsum=0.0
       do 50 k=1,mk
-   50 zvsum=zvsum+zv(k)/zn(k)
+      zvsum=zvsum+zv(k)/zn(k)
+ 50   continue
       sd=sqrt(zvsum/float(mk))
 c we want mean within-sample square deviation to be 1.0, so we divide
 c everything by sd
@@ -467,14 +512,16 @@ c everything by sd
       do 60 i=1,mi
       ax=x(i)/sd
       x(i)=ax
-   60 if(along.lt.ax) along=ax
+      if(along.lt.ax) along=ax
+ 60   continue
 c--------Removed write statements----------------------------
 c      if(icount.eq.1.and.monit.eq.1) write(*,1000)
 c 1000 format(/1x)
 c      if(monit.eq.1) write(*,1001) along
 c 1001 format(1x,'length of gradient',f10.3)
       do 70 j=1,n
-   70 y(j)=y(j)/sd
+      y(j)=y(j)/sd
+ 70   continue
       if(along.lt.short) return
       if(icount.eq.2) return
 c      mk=ifix(along*5.0)+1
@@ -488,9 +535,11 @@ c      mk=ifix(along*5.0)+1
       do 100 k=1,mk
       azv=1.0/sqrt(0.2/along+zv(k)/zn(k))
       zvsum=zvsum+azv
-  100 zv(k)=azv
+      zv(k)=azv
+ 100  continue
       do 110 k=1,mk
-  110 zv(k)=zv(k)*along/zvsum
+      zv(k)=zv(k)*along/zvsum
+ 110  continue
 c----------Removed write statements-------------------------
 c      if(monit.eq.1) write(*,1002) (zv(k),k=1,mk)
 c 1002 format(1x,'length of segments',10f6.2)
@@ -498,17 +547,20 @@ c 1002 format(1x,'length of segments',10f6.2)
       zn(1)=0.0
       do 120 k=1,mk
       az=az+zv(k)
-  120 zn(k+1)=az
+      zn(k+1)=az
+ 120  continue
       axbit=along/float(mk)
       do 130 j=1,n
 C      iay=ifix(y(j)/axbit)+1
       iay=int(y(j)/axbit)+1
       if(iay.lt.1) iay=1
       if(iay.gt.mk) iay=mk
-  130 y(j)=zn(iay)+zv(iay)*(y(j)/axbit-float(iay-1))
+      y(j)=zn(iay)+zv(iay)*(y(j)/axbit-float(iay-1))
+ 130  continue
       call yxmult(y,x,mi,n,nid,ibegin,iend,idat,qidat)
       do 140 i=1,mi
-  140 x(i)=x(i)/aidot(i)
+      x(i)=x(i)/aidot(i)
+ 140  continue
   200 continue
       return
       end
@@ -533,7 +585,8 @@ c 15,6,1)-smoothing.
 c---bug in next line fixed by p.minchin jan 1997
 c      if(az3.lt.0.0) istop=0
       if(az3.le.0.0) istop=0
-   10 z(k3-1)=0.5*(az2+0.5*(az1+az3))
+      z(k3-1)=0.5*(az2+0.5*(az1+az3))
+ 10   continue
       z(mk)=0.25*az2+0.75*az3
       istop=istop+1
       if(istop.eq.4) goto 30
@@ -552,13 +605,16 @@ c zn as nearly equal as possible.)
       integer ibegin(mi),iend(mi),idat(nid)
       do 10 k=1,mk
       zn(k)=-1.0e-20
-   10 zv(k)=-1.0e-20
+      zv(k)=-1.0e-20
+ 10   continue
       call xmaxmi(x,axmax,axmin,mi)
       axbit=(axmax-axmin)/float(mk)
       do 20 i=1,mi
-   20 x(i)=x(i)-axmin
+      x(i)=x(i)-axmin
+ 20   continue
       do 30 j=1,n
-   30 y(j)=y(j)-axmin
+      y(j)=y(j)-axmin
+ 30   continue
       do 50 i=1,mi
       sqcorr=0.0
       sumsq=2.0e-20
@@ -569,7 +625,8 @@ c zn as nearly equal as possible.)
       j=idat(id)
       aij=qidat(id)
       sqcorr=sqcorr+aij**2
-   40 sumsq=sumsq+aij*(ax-y(j))**2
+      sumsq=sumsq+aij*(ax-y(j))**2
+ 40   continue
       sqcorr=sqcorr/aidot(i)**2
       if(sqcorr.gt.0.9999) sqcorr=0.9999
       sumsq=sumsq/aidot(i)
diff --git a/src/monoMDS.f b/src/monoMDS.f
index 03fd2a1..76c5af9 100644
--- a/src/monoMDS.f
+++ b/src/monoMDS.f
@@ -600,9 +600,9 @@ C OTHERWISE, UPDATE STEP SIZE.
 C
       ELSE
         FACTR1=4.0**COSAV
-        FACTR2=1.6/( (1.0+(MIN(1.0,SRATAV))**5) *
+        FACTR2=1.6/( (1.0+(MIN(1D0,SRATAV))**5) *
      .    (1.0+ACOSAV-ABS(COSAV)) )
-        FACTR3=SQRT(MIN(1.0,SRATIO))
+        FACTR3=SQRT(MIN(1D0,SRATIO))
         STEP=STEP*FACTR1*FACTR2*FACTR3
       ENDIF
       RETURN
diff --git a/src/ordering.f b/src/ordering.f
index 18d5266..961614e 100644
--- a/src/ordering.f
+++ b/src/ordering.f
@@ -74,22 +74,26 @@ C
      +       oldrowsc(n)
       niter=1000
 C      Step 2: Take the column order as arbitrary initial site scores
-      do 4 i=1,n
-    4 rowscore(i)=dfloat(i)
+      do i=1,n
+         rowscore(i)=dble(i)
+      end do
       oldS=0.
-C      Iterations starting
+C      Iterations starting: this is a LONG loop
       do 20 it=1,niter
 C      Step 3: Calculate new variable scores (equation 5.8, p. 119)
-      do 6 i=1,n
-    6 colscore(i)=rowscore(i)  
+      do i=1,n
+       colscore(i)=rowscore(i)
+      end do
 C      Step 4: Calculate new site scores (equation 5.9, p. 122)
-      do 8 i=1,n
-      rowscore(i)=0.
-      do 8 j=1,n
-         call SM(mat, n, k, i, j, d)
-         d = -0.5*d**2
-         d = d-sumrow(i)-sumrow(j)+sumtot
-    8    rowscore(i)=rowscore(i)+d*colscore(j)
+      do i=1,n
+         rowscore(i)=0.
+         do j=1,n
+            call SM(mat, n, k, i, j, d)
+            d = -0.5*d**2
+            d = d-sumrow(i)-sumrow(j)+sumtot
+            rowscore(i)=rowscore(i)+d*colscore(j)
+         end do
+      end do
 C      Step 6: Normalize the site scores
       call NormTWWS(rowscore,n,newS)
       if(newS.lt.epsilon) then
@@ -104,8 +108,9 @@ C      write(*,*) 'oldS-newS', oldS-newS
 C        write(*,105) toler, it 
         goto 22
         endif
-      do 18 i=1,n
-   18 oldrowsc(i)=rowscore(i)
+      do i=1,n
+         oldrowsc(i)=rowscore(i)
+      end do
       oldS=newS
    20 continue
 C      End of iterations for estimating eigenvalues and eigenvectors
@@ -117,8 +122,9 @@ C      End of main loop on axes
    52 continue
 C
 C      Normalize the principal coordinates to variance = eigenvalue
-      do 60 i=1,n
-   60 rowscore(i)=rowscore(i)*dsqrt(newS)
+      do i=1,n
+         rowscore(i)=rowscore(i)*dsqrt(newS)
+      end do
 C      write(*,*) rowscore   
 C  101 format(' Convergence not reached for axis:',i3/
 C     +       ' Increase NITER or lower TOLER')
@@ -142,10 +148,12 @@ C      S = eigenvalue*(p-1) = contraction of vector rowscore in final
 C      iteration
 C
       s2=0.0
-      do 10 i=1,n
-   10 s2=s2+rowscore(i)**2
+      do i=1,n
+         s2=s2+rowscore(i)**2
+      end do
       newS=dsqrt(s2)
-      do 20 i=1,n
-   20 rowscore(i)=rowscore(i)/newS
+      do i=1,n
+         rowscore(i)=rowscore(i)/newS
+      end do
       return
       end
diff --git a/vignettes/FAQ-vegan.Rmd b/vignettes/FAQ-vegan.Rmd
index 1e07b2d..3c58581 100644
--- a/vignettes/FAQ-vegan.Rmd
+++ b/vignettes/FAQ-vegan.Rmd
@@ -45,7 +45,7 @@ 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
+R has a home page at <https://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”).
@@ -55,7 +55,7 @@ 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
+[CRAN](https://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/),
@@ -86,7 +86,7 @@ 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
+CRAN [Task Views](https://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
@@ -145,7 +145,7 @@ be used in publications.
 
 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
+[CRAN](https://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

-- 
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