[med-svn] [r-cran-vegan] 01/06: New upstream version 2.4-2
Andreas Tille
tille at debian.org
Fri Jan 20 09:57:15 UTC 2017
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 6a0cd6764a28065ce0c44f29cd0e15bfcc6549bf
Author: Andreas Tille <tille at debian.org>
Date: Fri Jan 20 10:41:23 2017 +0100
New upstream version 2.4-2
---
DESCRIPTION | 8 ++--
MD5 | 83 ++++++++++++++++++------------------
R/adonis2.R | 5 ++-
R/betadisper.R | 2 +-
R/bioenv.formula.R | 8 ++--
R/capscale.R | 19 +++++----
R/cca.formula.R | 5 ++-
R/dbrda.R | 17 ++++----
R/envfit.formula.R | 6 +--
R/fitted.capscale.R | 2 +-
R/hierParseFormula.R | 10 ++---
R/intersetcor.R | 13 +++---
R/make.commsim.R | 59 +++++++++++---------------
R/ordiGetData.R | 10 -----
R/ordicluster.R | 4 +-
R/permutest.cca.R | 18 +++++---
R/predict.rda.R | 2 +-
R/rda.formula.R | 13 +++---
R/scores.cca.R | 5 +++
R/scores.rda.R | 5 +++
R/simulate.rda.R | 3 +-
R/stressplot.wcmdscale.R | 2 +-
R/tabasco.R | 49 ++++++++++++++--------
R/tolerance.cca.R | 88 ++++++++++++++++++++++-----------------
build/partial.rdb | Bin 21872 -> 21870 bytes
data/dune.taxon.rda | Bin 779 -> 758 bytes
inst/NEWS.Rd | 86 +++++++++++++++++++++++++++++++++++++-
inst/{ChangeLog => OldChangeLog} | 0
inst/doc/decision-vegan.pdf | Bin 340389 -> 340533 bytes
inst/doc/diversity-vegan.pdf | Bin 365471 -> 364765 bytes
inst/doc/intro-vegan.pdf | Bin 238294 -> 238492 bytes
inst/doc/partitioning.pdf | Bin 137193 -> 137361 bytes
man/anova.cca.Rd | 8 ++--
man/betadisper.Rd | 2 +
man/capscale.Rd | 7 ++--
man/dune.taxon.Rd | 26 +++++++++---
man/envfit.Rd | 18 ++++++--
man/plot.cca.Rd | 23 ++++++----
man/tolerance.Rd | 7 ++--
man/vegan-internal.Rd | 6 +--
man/vegemite.Rd | 18 +++++++-
src/nestedness.c | 2 -
src/vegdist.c | 32 +++++++-------
43 files changed, 416 insertions(+), 255 deletions(-)
diff --git a/DESCRIPTION b/DESCRIPTION
index 21b4961..68fda56 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -1,7 +1,7 @@
Package: vegan
Title: Community Ecology Package
-Version: 2.4-1
-Date: 2016-09-07
+Version: 2.4-2
+Date: 2017-01-17
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-09-07 10:35:24 UTC; jarioksa
+Packaged: 2017-01-17 13:20:06 UTC; jarioksa
Repository: CRAN
-Date/Publication: 2016-09-07 14:41:37
+Date/Publication: 2017-01-17 19:41:27
diff --git a/MD5 b/MD5
index 7726c99..0163689 100644
--- a/MD5
+++ b/MD5
@@ -1,4 +1,4 @@
-f06a29325e1e14877dd37db3e8ad55a5 *DESCRIPTION
+4598b2d294cb96a71a6b964047b44d63 *DESCRIPTION
ad7596a4d60e6ab02877ab7a75271d33 *NAMESPACE
4b8531b446af54510e5fb31f841aed2f *R/AIC.radfit.R
e9814d051bdf49db5606399ac3a4704e *R/CCorA.R
@@ -17,7 +17,7 @@ d80688d78aba3cd9367ffaaaec6ec252 *R/TukeyHSD.betadisper.R
6d8b8084eb99357cf7a6e95894514520 *R/adipart.default.R
6e0cc43b676b69a43ca460c886da2f28 *R/adipart.formula.R
23af28a7ddb2957549409a1e80481b82 *R/adonis.R
-3da02c8549ac302efdccf84f99de44c7 *R/adonis2.R
+950d2493f08fc212fac4ebb263350ca3 *R/adonis2.R
7331b1428563ed9add00b088b50617fd *R/alias.cca.R
4bdae1555a954b5266ac30300783ffd8 *R/anosim.R
a4f23289c4a5eab2a3587292b306d497 *R/anova.betadisper.R
@@ -38,12 +38,12 @@ a7f01bd69394d5554cf10279a2690080 *R/as.preston.R
a9297920fdeeb053cfe57930118ca20c *R/as.ts.oecosimu.R
704239604b0ed8420cb22a31b28a01d3 *R/as.ts.permat.R
fbec6d133dea10372ce082c7035a8ab2 *R/beals.R
-0fd386d101a4f4d6823cbf510e0ea14d *R/betadisper.R
+9067ff32c0361faea6601e7df46c07fa *R/betadisper.R
2943ef31dcda3c6189e1ffda42641aba *R/betadiver.R
46ae3f75a0b483fecab589637d72a307 *R/bgdispersal.R
4603ea944d470a9e284cb6cab6d75529 *R/bioenv.R
68f7dc3b2c6c698c3288605c90f5cd80 *R/bioenv.default.R
-abe03a297a6200d9b48b38c6d92333aa *R/bioenv.formula.R
+c41d73027fbc46fc9c71c627d1994a66 *R/bioenv.formula.R
4dbe9f135fadbba3f6939d64a5bb0e29 *R/biplot.CCorA.R
f22e634bf8399d7edb1fe05845921ccf *R/biplot.rda.R
0999bb90f22b72fade2ca6adbd01758f *R/boxplot.betadisper.R
@@ -58,11 +58,11 @@ b98443c6f47168edc9fd96e8a30c82e1 *R/cIndexKM.R
a6df607186ceb18d204494b6a33816d4 *R/calibrate.R
d66bb19eac276433e8ae56c2bb106e48 *R/calibrate.cca.R
f56b52d53b17c7dc8d8c9accd5a3401a *R/calibrate.ordisurf.R
-a56b4c5eafc2fb9f7c27b4f577dac731 *R/capscale.R
+176ac0fc7d603de0ef7f490217de7009 *R/capscale.R
52b06d758d53934d0b67b4e7653dc3dd *R/cascadeKM.R
2e09a82ec52e211afc2ac6e8d4b40898 *R/cca.R
fe3b7320b434d46d2308d880ef26787a *R/cca.default.R
-e01e3acecdb9ac8d9195937e9879d126 *R/cca.formula.R
+ef3f23773999c3466c303c79b98375f0 *R/cca.formula.R
efd5146e35f97186b97ca1bb6e618c79 *R/centroids.cca.R
c66d8fbe69ccca94f2ee8f777ff16ae2 *R/checkSelect.R
6faf5d12f3e1abb40c0f8d2cfeabc4b4 *R/clamtest.R
@@ -74,7 +74,7 @@ c66d8fbe69ccca94f2ee8f777ff16ae2 *R/checkSelect.R
191ebc7278f8bdc69ae353d1c02a1d60 *R/contribdiv.R
e0449c3666763adaef0b70a5fffc864c *R/cophenetic.spantree.R
edee3aaced61290b219985d0ce69155c *R/coverscale.R
-a3b446f23cacb17801c8b5c3ae7cab8e *R/dbrda.R
+208905c12826c443641353b369fa6273 *R/dbrda.R
0732c6a49ad12d5cc56aeced9bd47714 *R/decorana.R
c22bdcfe87e2bf710db3b301d880a54a *R/decostand.R
e450e8f1e80659cedc734f0931ba5059 *R/designdist.R
@@ -90,7 +90,7 @@ cafeabc2133997b3381c9edf6a971abf *R/distconnected.R
3481fc55ba439f64100b3954f2e775a3 *R/eigenvals.R
17a62527ee103c09bfba0c851ab12560 *R/envfit.R
8b55b666951751cfd6cb9720c886677e *R/envfit.default.R
-1ef64854841e194d35484feffe7914e5 *R/envfit.formula.R
+3daf51b37b06f56aaa7bcdf740c46eb4 *R/envfit.formula.R
0b5f742d4f302ab12c17fe3fc3e3deee *R/estaccumR.R
81098475867f802dea0565fe426c9fc5 *R/estimateR.R
cf0a0bf7116ef7a21e090d0c1a76f8d0 *R/estimateR.data.frame.R
@@ -103,7 +103,7 @@ a184abc0cc159b4c71f7e62cf6c7034c *R/extractAIC.cca.R
ee8330855e6a7bc2350047d76b2209a4 *R/fisher.alpha.R
2776f68ef40e177303c3b73163036969 *R/fisherfit.R
15075c7f443896f54b5e0befd21c17bf *R/fitspecaccum.R
-2c0ddc46e242a1a015ba5b9ae1715c97 *R/fitted.capscale.R
+3f7d0c9c7f0509455863056a98358d36 *R/fitted.capscale.R
ee2e3daa463fb46ffce01206f8b44fa5 *R/fitted.cca.R
000a71e4b3ec565a541325caac6efb11 *R/fitted.dbrda.R
0080b65cfd48bac5e53961b8e12682e5 *R/fitted.procrustes.R
@@ -115,7 +115,7 @@ ee2e3daa463fb46ffce01206f8b44fa5 *R/fitted.cca.R
aa6cac97fcd00c1a6d8a39cc6fdd3d1d *R/goodness.cca.R
5364f16346047d3b8719ddef653a70bb *R/goodness.metaMDS.R
8a767726c40223a58d4055759bf41efe *R/head.summary.cca.R
-d17f4f6be45b52e01cd605b09b56a80a *R/hierParseFormula.R
+25d2377be819fa41f9856329f2e9d693 *R/hierParseFormula.R
3d19236ee5dd2f1c678061773895e86f *R/hiersimu.R
786179cf06d7a24c21fca7cb3a907ae4 *R/hiersimu.default.R
848772d209bbabe3515a9b4c7fcd15be *R/hiersimu.formula.R
@@ -125,7 +125,7 @@ d02fc9c672a9b2c4a31065702a3381be *R/humpfit.R
9e731fa2cfb821bbe7ed62336d5fa3b3 *R/indpower.R
56b994a6310b74f9891e7af4cd461c6d *R/inertcomp.R
bf423cb7cf07abc3a4c64229bcc8fc14 *R/initMDS.R
-5d5904a8fe3090744de68cc871241b38 *R/intersetcor.R
+c1202a1639faec44406e0cc5adf96055 *R/intersetcor.R
c63972a171f76f92652feeb2daf30e82 *R/isomap.R
1e167e69edcee4aa651d97bef81b31e9 *R/isomapdist.R
5abdcd58cf3811e482543d5207114331 *R/kendall.global.R
@@ -139,7 +139,7 @@ eb4e11e71eeefa6ec64e4a2580b8af75 *R/lines.prestonfit.R
66d749d120812f26c7bb7a50e014e0b6 *R/lines.spantree.R
4163375ba5178f6e98a0b50f63b91ead *R/linestack.R
1dcc7e0504b5468a3bb2253924901e50 *R/make.cepnames.R
-68f06098a78ccef4c962d97a5e433b9f *R/make.commsim.R
+36184444dfa43e6e33ef88e4bae3bbb3 *R/make.commsim.R
f25f916c75667aa6eb64136817e79256 *R/mantel.R
fdb2f4786b31866197c80d827584edaf *R/mantel.correlog.R
3e005ec1cc5a4231ee7c470cb30df01b *R/mantel.partial.R
@@ -172,7 +172,6 @@ ed3928f1675b3211ddd239f6144b1f9e *R/oldCapscale.R
fe4f72fa1928f93c92840af2ae08b52e *R/ordiArgAbsorber.R
ffd002ae0ed83062dabb963f02f3c854 *R/ordiArrowMul.R
1f50c54490f6cbfa7300255219939ccb *R/ordiArrowTextXY.R
-dcb0331100aee15cee54c25c241ffd35 *R/ordiGetData.R
99c1ec285e2afe4fb8beccbd507a123e *R/ordiNAexclude.R
045e89399470e8c72a875570e1229bf2 *R/ordiParseFormula.R
477035081490c768593968825b58b831 *R/ordiR2step.R
@@ -181,7 +180,7 @@ a1a229f63a785534a5135815564d4581 *R/ordiareatest.R
a7f82442062699d56ea176a7d87e9ac4 *R/ordiarrows.R
2b2c4ee6b157be9425eff260647b5c39 *R/ordibar.R
85f3047b80ab9a2ea57dd7935d07b583 *R/ordicloud.R
-bb7416f58eebbdb1e87127cefa2e70d5 *R/ordicluster.R
+2e13df86ab2e32188a3b034ae928b31b *R/ordicluster.R
04da9ccfd4ac2a36a08bb7911b01cf0c *R/ordiellipse.R
c253906529c77aead16b293275f1afc3 *R/ordigrid.R
e28c083009568ab3cc82d5fab2ba109b *R/ordihull.R
@@ -208,7 +207,7 @@ eeeaf4245033bd2a4ce822c919e42c6e *R/permatswap.R
2b1a9af8b638ed1e2138267237d6a497 *R/permustats.R
3d6a5ecd5feab93db30c063fd144d422 *R/permuted.index.R
d2b4ce957bcc6376391f045b7046c697 *R/permutest.betadisper.R
-42e69f6ffd88f0840cbc512a9d618fd4 *R/permutest.cca.R
+c0c65873159cda3b68e3c0cca5be237a *R/permutest.cca.R
b4e77b98f86c4b567d687b64e3aa8812 *R/persp.renyiaccum.R
b499c6eea710aa0c65a580dba30f2914 *R/persp.tsallisaccum.R
f7c8d52c791489d956a7fd833913f242 *R/plot.MOStest.R
@@ -264,7 +263,7 @@ ca38da30d3e3d1e91d5534ec6b885834 *R/predict.cca.R
ca99e94ed4bc39135b84f61ed64bf9fd *R/predict.fitspecaccum.R
06cca728e43d29da2528b01dccb26962 *R/predict.humpfit.R
3eaaaf25580077e7dff217c3f237e37a *R/predict.radline.R
-02545ea3fcfb0989266ad7fe6b260ded *R/predict.rda.R
+0922f1fa3fbf81c25694fe15e24754d3 *R/predict.rda.R
6b10b84b569e5eed32629912b19e9c8b *R/predict.specaccum.R
4f56d16f5bf8f9af3477c23137a70fb5 *R/pregraphKM.R
81bb150e264f7da07989c909f4531a45 *R/prepanel.ordi3d.R
@@ -345,7 +344,7 @@ f62b0ebf24922d65ae1ce7bbcab2473f *R/rarecurve.R
d9a219ae6f3e6155ae76bc59d3e14d30 *R/raupcrick.R
8116cefb40383fb571abb9fb82091087 *R/rda.R
22c320cd450c1088dfb0a05e577b9a73 *R/rda.default.R
-90b562e8a94febce8430a344392a2943 *R/rda.formula.R
+850c1cd2a9a50688a689ab060611061d *R/rda.formula.R
66f9447f8ac8388ac02c39aa1f5db95a *R/read.cep.R
c8b0d740574bc39b929d3216d19d3026 *R/renyi.R
3af80e7b694a975fcaf69f53bba241eb *R/renyiaccum.R
@@ -356,7 +355,7 @@ c94cf53d2345f590de45c0f9db6fe272 *R/scalingUtils.R
ed66f1e11f53f7fbdbd8663de2b7f5dd *R/scores.R
afdabd5d19efde6d0c383fc7562077ac *R/scores.betadisper.R
341ee43f8524dccb5e369513a16923b1 *R/scores.betadiver.R
-6052d447e0b7e6a8605629055fd2c5d0 *R/scores.cca.R
+4bc568476b3dd4db5cb044d326b1699b *R/scores.cca.R
447810692c53fab8cd6907ec920e0852 *R/scores.decorana.R
d7485aeb982d12832c96f54a47dff2f4 *R/scores.default.R
6415eb8600a7e516ae6c053832c45357 *R/scores.envfit.R
@@ -366,7 +365,7 @@ e4b321e08dfaaf89bd548af364902738 *R/scores.ordihull.R
f146575a3f60358567dfed56e8cbb2cd *R/scores.ordiplot.R
512cedf50891372019cae370b240a742 *R/scores.orditkplot.R
4755a38c8b83b76f123b8e84cf47b700 *R/scores.pcnm.R
-27294f4a051e9f5eb8955493ee437b06 *R/scores.rda.R
+38a01517e16c12e4a3e87a3fa29289ae *R/scores.rda.R
42e3e9222d18a33abb561bac1db5bc6f *R/screeplot.cca.R
71a7f620655b068c3a53561fc16bfd39 *R/screeplot.decorana.R
3fe910b739d447ba5026f077cb0c670d *R/screeplot.prcomp.R
@@ -375,7 +374,7 @@ f146575a3f60358567dfed56e8cbb2cd *R/scores.ordiplot.R
9cb0fc3a15596992bff286c98c8f9650 *R/simper.R
82fb9f429cda2543095b52ccdc4bc3a1 *R/simpleRDA2.R
f2d46ee718949e4a5bfb90d1c90142d4 *R/simulate.nullmodel.R
-da0d0878390e5a1661dc80c72577ec38 *R/simulate.rda.R
+1f74bf934a566f50e7598f9af75c0111 *R/simulate.rda.R
f6a71e261975457650d1094d08329f4c *R/smbind.R
9f235c650efc4217a3cc88996b627e1d *R/spandepth.R
f4554cf72cc501fad09662c612b1c34c *R/spantree.R
@@ -388,7 +387,7 @@ d24743b3fb58c8a195608e814eeed02c *R/specslope.R
33d884aae53dcc5fa80d9e9ffae4515e *R/stepacross.R
bd2d1d998f18e7a9c65d5072932cbef2 *R/str.nullmodel.R
301ba29a09201611845f7adb2b2d7d81 *R/stressplot.R
-b4829a105205ba44280e56808ceaf700 *R/stressplot.wcmdscale.R
+eb7fedcd67e50aa63a1557aa3c608ddf *R/stressplot.wcmdscale.R
55b28298153f00b4c1f8574b0784eb0c *R/summary.anosim.R
19ce7c501fff2cacc8ad322fd0500a48 *R/summary.bioenv.R
7fea8ad8bbbfb61348faaa76ea44725b *R/summary.cca.R
@@ -408,7 +407,7 @@ a8c1bf3d3f371f3ee5a3de3c39a4113a *R/summary.procrustes.R
25e8a947666bed660358e359730160d9 *R/summary.specaccum.R
8f34602692f6a5476bb4a6d7b2a269fe *R/summary.taxondive.R
7c55757d8187363116d3561d53cbc5ba *R/swan.R
-c2c3f2005758d438c6f2815ab2495d5d *R/tabasco.R
+6af0f799845d8f2e3f64b9bf204e0cb1 *R/tabasco.R
62bc8a0693a71adb1457b0a102d8951a *R/taxa2dist.R
90ec6192eb43f8fd29bc93485f4ef293 *R/taxondive.R
c103958b08a39e45f44ed5b55c380d25 *R/text.cca.R
@@ -417,7 +416,7 @@ c103958b08a39e45f44ed5b55c380d25 *R/text.cca.R
974bdc93cd9b352d30debf3e93111136 *R/text.ordiplot.R
dbc282f5aef3c9729d098b4fb80004b7 *R/text.orditkplot.R
0fc7a75cf414d76cc751cc33ed5d6384 *R/tolerance.R
-7a3aedecb5fc64e07b919d867321a4ba *R/tolerance.cca.R
+8a114b5c20e46c089ecd9f80ed0f27e5 *R/tolerance.cca.R
48c49511d26ea0e18e752198ecde97ba *R/treedist.R
54b0bf2548f7912cf4c10d4552d58efc *R/treedive.R
b7181b8d28c9da1019a0b2fe5f117e05 *R/treeheight.R
@@ -445,14 +444,14 @@ ecfd48e2f4df6bcd683a87203dd80e12 *R/weights.cca.R
9ed0ac2ab6e01950db0cc181a42e523f *R/weights.rda.R
4138f57726620d493f218e5e3da0013c *R/wisconsin.R
678368022e0d66a4fd7722ab6bcc8beb *R/zzz.R
-1a3d51bbeb652633dddc174617cb7c35 *build/partial.rdb
+7f5f6d32b2e1a254b5645dbabc58f880 *build/partial.rdb
bf482d265609ebdc74921368caf131a8 *build/vignette.rds
72cc26156e4b9ce7e2655c228ab87107 *data/BCI.env.rda
0a5c36b1ebd892c80a84d0d6417e1d6f *data/BCI.rda
412ea5cf443401fe54f0b14c14c45806 *data/dune.env.rda
b0a8834b45c79fc017717838d700f0f6 *data/dune.phylodis.rda
339a47050fe72465c659e82378562781 *data/dune.rda
-7a9f931df676f8a3f1489a2119304915 *data/dune.taxon.rda
+43251e030cebf2a2c4a66aca60c462ff *data/dune.taxon.rda
442171925629c4ef13f9d70601ca9cb3 *data/mite.env.rda
c51905bd025ccea2737527b6fca4a081 *data/mite.pcnm.rda
272a07c3f4162668600425cb1a043e10 *data/mite.rda
@@ -461,24 +460,24 @@ c51905bd025ccea2737527b6fca4a081 *data/mite.pcnm.rda
ee3c343418d7cf2e435028adf93205f1 *data/sipoo.rda
f87df84297865b5faf31e232e97a0f94 *data/varechem.rda
7136b8666250a538d60c88869390a085 *data/varespec.rda
-1fb35aec7042529e18e4673818fecf7f *inst/ChangeLog
-c0c60e5e1f1147547308b6fcbe609e76 *inst/NEWS.Rd
+23e8211d6b2aa00d4e78e8dc3aa73c2f *inst/NEWS.Rd
9abfab8b05c34dd283379a7d87500ffb *inst/ONEWS
+1fb35aec7042529e18e4673818fecf7f *inst/OldChangeLog
b21accfb0a73075d80634960e461ac7e *inst/doc/FAQ-vegan.R
5a63786318301497a2ff53b27afd94e9 *inst/doc/FAQ-vegan.Rmd
da32fa53640082fe265ae96e87445079 *inst/doc/FAQ-vegan.html
92fd39278aa2666ce4fec88c032b33ed *inst/doc/decision-vegan.R
c910da720c0da49de1808c688a450206 *inst/doc/decision-vegan.Rnw
-3d2c3875806c04033b687357505ae477 *inst/doc/decision-vegan.pdf
+b4b72dfffc0571804c618d4027932283 *inst/doc/decision-vegan.pdf
41fae44349a8a602825bddba8750102d *inst/doc/diversity-vegan.R
06cfa11a83ca0330979d500549f2415a *inst/doc/diversity-vegan.Rnw
-a2beada25992475d5dede853c59c77cb *inst/doc/diversity-vegan.pdf
+ba77aab598df214db58eb2f63d43da17 *inst/doc/diversity-vegan.pdf
eff5665df3e4437135528b753d664a7f *inst/doc/intro-vegan.R
6b35943a07c04a6afc77222b0e17b7f8 *inst/doc/intro-vegan.Rnw
-e162d90081bd39fdf06d12a604679da1 *inst/doc/intro-vegan.pdf
+51ff72da0df8c9f7d49166967c7bfaa4 *inst/doc/intro-vegan.pdf
d56c6fb7eaff59b945aad2459b96bce7 *inst/doc/partitioning.R
5b17ce6c86e3334b796a658328d426f9 *inst/doc/partitioning.Rnw
-36a5256cd81fe21d0f7bd04355b1593b *inst/doc/partitioning.pdf
+aa3e03a8c197428b17cbb71342249c35 *inst/doc/partitioning.pdf
1f5ef97a44dee865f33b8eadb2e206c1 *man/BCI.Rd
d4d97e3b71561f61bd9f1f0686a57434 *man/CCorA.Rd
2b36702bf2b1931f955fb7dd9d044c99 *man/MDSrotate.Rd
@@ -489,15 +488,15 @@ fd218be03aa2591e5123d11780ccba1a *man/MOStest.Rd
13da867f859157284eee4217561d4c3c *man/adipart.Rd
84fa6a1565509707d87ee887c746cc19 *man/adonis.Rd
1788008f46807f84083a0964eb0a9559 *man/anosim.Rd
-5b83e39817e231c0a01c8496fcde00dc *man/anova.cca.Rd
+7ce9770199d7889d0d0d7a2f8ce674af *man/anova.cca.Rd
c57af27fa11dadcd48981fcf42b2d221 *man/as.mlm.Rd
8e3718248ff8d48e724654ab17caa2e2 *man/beals.Rd
-9e07f61d9bd0d75a548953907dde9148 *man/betadisper.Rd
+32cc1d68836f6540ef1db0e27fa8f595 *man/betadisper.Rd
653c0566697c40d57405e1b6a06cd7c8 *man/betadiver.Rd
b04c2fae35dba2d97cb248814d5e2fe9 *man/bgdispersal.Rd
860b9c7f2325f500c27f3c903831efae *man/bioenv.Rd
783cc695729b9ce5ce9331944337541f *man/biplot.rda.Rd
-777d378c6bdd91306058c915aefd144e *man/capscale.Rd
+3692d544d02a8ce24fab53142a4eb9b1 *man/capscale.Rd
644e253ebcab91a5ddce85294dda278d *man/cascadeKM.Rd
aabb7dbe6885e0362b5c92a47c856b54 *man/cca.Rd
bd548455eb7f153d33932dc4f3ba44a9 *man/cca.object.Rd
@@ -513,9 +512,9 @@ f58b474141a1b0fdf438bfe6dd8da0c9 *man/dispindmorisita.Rd
f3f742efa7511a4c33108a00b512ebd9 *man/distconnected.Rd
0a67f0ca537d4b8ed97297fa9eb9fefa *man/diversity.Rd
08b96c1a45c11ffcb7f0da33a888421a *man/dune.Rd
-91fa409075b3bd64706c8ff380b3d01d *man/dune.taxon.Rd
+4548669f5df26e953e52fbd6daa3a532 *man/dune.taxon.Rd
5f5f8c7df063606ccde6124c5dbe8add *man/eigenvals.Rd
-190f23f7405cc5be2266faaf27be2183 *man/envfit.Rd
+e3e4972c0872f98244211540657cb371 *man/envfit.Rd
d2cf422a3d7702ac6293fcd3ff046afc *man/eventstar.Rd
5857c2307b1dfd69953a88bd3c384180 *man/fisherfit.Rd
4135cbc750171f53a71e727291162bf8 *man/goodness.cca.Rd
@@ -556,7 +555,7 @@ d3fd306546c43339ad7d8fd985a28801 *man/permatfull.Rd
6812983f8e154a66bd4ec3c736d1b36a *man/permustats.Rd
4a2ed8481b1f6805d343e83fda91e0ed *man/permutations.Rd
7533f16237c68f522d66d70b05a99c76 *man/permutest.betadisper.Rd
-1e8bee4a00a9e945676bc461ba949a0c *man/plot.cca.Rd
+55b066a2bb2dc47997c76c2ae6155dca *man/plot.cca.Rd
d45a85e1ccef663ad3bc6d87286f5904 *man/prc.Rd
0f7fb32afada9a6d1c274875465abad7 *man/predict.cca.Rd
e29ed0c997c75aa9e229ae847e3d1cf6 *man/procrustes.Rd
@@ -579,18 +578,18 @@ c334f2fca856d5073044392713ee0894 *man/specpool.Rd
5b9e51c85395f80f8504954e4175f877 *man/stepacross.Rd
9a022e15270dc4d340207f34beb038a1 *man/stressplot.wcmdscale.Rd
0aac5f5c8f58fc8fe1cb6c0ba819b196 *man/taxondive.Rd
-21d5137a2335a80efddff8dc9c55370f *man/tolerance.Rd
+a060076b9ee8a4e694bc1c4a02324800 *man/tolerance.Rd
a4b37297402220dee75997c4f49a729c *man/treedive.Rd
14cc64af5f8a8c5965563a2b03c408f2 *man/tsallis.Rd
033dd7d7917185cea81e4d7afcd59df9 *man/varechem.Rd
a6280a68ce4a9298bc68d7ca5f768a2f *man/varpart.Rd
3c0ab1f2a60eff99bbc3f7a33c3f6eee *man/vegan-defunct.Rd
00b4cef1efbd187368d0905e3b298cfd *man/vegan-deprecated.Rd
-9c7d6e52f7182e300ee5170664011925 *man/vegan-internal.Rd
+4f9d5a46d163e48df77f5f668d4d55a2 *man/vegan-internal.Rd
cef033ea30c92a1508f82924ce9f2402 *man/vegan-package.Rd
5280fd8e6478cff76373f5e85422ae5b *man/vegandocs.Rd
ad48b24429d673e1af3120d0cf6c3eb3 *man/vegdist.Rd
-a2cc1d837017b4de0b4bec617e29533d *man/vegemite.Rd
+f5910df140a9fc0a290d0a9813b00825 *man/vegemite.Rd
c3209a8eff0fe638d3a43b25ea5bec16 *man/wascores.Rd
e8085b39e46823189e312a5776835adc *man/wcmdscale.Rd
d706ad17bf9aaeab00cead307aeb2d3a *src/cepin.f
@@ -598,11 +597,11 @@ dd22a1632081402e62320a4c0d6b2aa9 *src/data2hill.c
6f93283e7eba742ef97d0eb323db28eb *src/decorana.f
87b05dd087e591f1f8e92ecbf1983207 *src/goffactor.c
6edc5b9813b7a8545ff411295b2020d2 *src/monoMDS.f
-f64ced55260d166a69e691d592457228 *src/nestedness.c
+8e52305b02e176e1e2979235d311efb7 *src/nestedness.c
77acc57d3a8492c99c324a4c4e585378 *src/ordering.f
31bdbe9b08340e1662a62cf6e61ade6a *src/pnpoly.c
b9b647fcf8a3e59e10b9351fae60ec06 *src/stepacross.c
-36ea09c9a6553010e786f0e787185d60 *src/vegdist.c
+bdd7c52a5c8aa1ae167f2a7924eae507 *src/vegdist.c
5a63786318301497a2ff53b27afd94e9 *vignettes/FAQ-vegan.Rmd
c910da720c0da49de1808c688a450206 *vignettes/decision-vegan.Rnw
06cfa11a83ca0330979d500549f2415a *vignettes/diversity-vegan.Rnw
diff --git a/R/adonis2.R b/R/adonis2.R
index cbedb26..50f439a 100644
--- a/R/adonis2.R
+++ b/R/adonis2.R
@@ -55,7 +55,8 @@
if (missing(data))
data <- .GlobalEnv
else
- data <- ordiGetData(match.call(), environment(formula))
+ data <- eval(match.call()$data, environment(formula),
+ enclos = .GlobalEnv)
## First we collect info for the uppermost level of the analysed
## object
Trms <- terms(delete.response(formula), data = data)
@@ -87,7 +88,7 @@
Gfit <- qr.fitted(qrhs, G)
Gres <- qr.resid(qrhs, G)
## collect data for the fit
- if(!is.null(qrhs$rank) && qrhs$rank > 0)
+ if(!is.null(qrhs$rank) && qrhs$rank > 0)
CCA <- list(rank = qrhs$rank,
qrank = qrhs$rank,
tot.chi = sum(diag(Gfit)),
diff --git a/R/betadisper.R b/R/betadisper.R
index a11f3c8..62e9eab 100644
--- a/R/betadisper.R
+++ b/R/betadisper.R
@@ -129,7 +129,7 @@
## zij are the distances of each point to its group centroid
zij <- sqrt(abs(dist.pos - dist.neg))
if (bias.adjust) {
- n.group <- table(group)
+ n.group <- as.vector(table(group))
zij <- zij*sqrt(n.group[group]/(n.group[group]-1))
}
## add in correct labels
diff --git a/R/bioenv.formula.R b/R/bioenv.formula.R
index 2d01869..719d4c8 100644
--- a/R/bioenv.formula.R
+++ b/R/bioenv.formula.R
@@ -1,11 +1,11 @@
`bioenv.formula` <-
- function (formula, data, ...)
+ function (formula, data, ...)
{
- if (missing(data))
- data <- parent.frame()
+ if (missing(data))
+ data <- environment(formula)
fla <- formula
comm <- formula[[2]]
- comm <- eval(comm, data, parent.frame())
+ comm <- eval(comm, environment(formula), parent.frame())
formula[[2]] <- NULL
env <- model.frame(formula, data, na.action = NULL)
out <- bioenv(comm, env, ...)
diff --git a/R/capscale.R b/R/capscale.R
index 1580f27..1db7de5 100644
--- a/R/capscale.R
+++ b/R/capscale.R
@@ -1,16 +1,17 @@
`capscale` <-
function (formula, data, distance = "euclidean", sqrt.dist = FALSE,
comm = NULL, add = FALSE, dfun = vegdist,
- metaMDSdist = FALSE, na.action = na.fail, subset = NULL, ...)
+ metaMDSdist = FALSE, na.action = na.fail, subset = NULL, ...)
{
EPS <- sqrt(.Machine$double.eps)
- if (!inherits(formula, "formula"))
+ if (!inherits(formula, "formula"))
stop("Needs a model formula")
if (missing(data)) {
data <- parent.frame()
}
else {
- data <- ordiGetData(match.call(), environment(formula))
+ data <- eval(match.call()$data, environment(formula),
+ enclos = .GlobalEnv)
}
formula <- formula(terms(formula, data = data))
## The following line was eval'ed in environment(formula), but
@@ -74,7 +75,7 @@
else {
adjust <- sqrt(k)
}
- nm <- attr(X, "Labels")
+ nm <- attr(X, "Labels")
## wcmdscale, optionally with additive adjustment
X <- wcmdscale(X, x.ret = TRUE, add = add)
## this may have been euclidified: update inertia
@@ -82,7 +83,7 @@
inertia <- paste(paste0(toupper(substring(X$add, 1, 1)),
substring(X$add, 2)),
"adjusted", inertia)
- if (is.null(rownames(X$points)))
+ if (is.null(rownames(X$points)))
rownames(X$points) <- nm
X$points <- adjust * X$points
## We adjust eigenvalues to variances, and simultaneously the
@@ -152,7 +153,7 @@
## NA action after 'subset'
if (!is.null(d$na.action))
comm <- comm[-d$na.action, , drop = FALSE]
- if (!is.null(sol$pCCA) && sol$pCCA$rank > 0)
+ if (!is.null(sol$pCCA) && sol$pCCA$rank > 0)
comm <- qr.resid(sol$pCCA$QR, comm)
if (!is.null(sol$CCA) && sol$CCA$rank > 0) {
v.eig <- t(comm) %*% sol$CCA$u/sqrt(k)
@@ -171,13 +172,13 @@
sol$CCA$v[] <- NA
sol$colsum <- NA
}
- if (!is.null(sol$CCA) && sol$CCA$rank > 0)
+ if (!is.null(sol$CCA) && sol$CCA$rank > 0)
sol$CCA$centroids <- centroids.cca(sol$CCA$wa, d$modelframe)
- if (!is.null(sol$CCA$alias))
+ if (!is.null(sol$CCA$alias))
sol$CCA$centroids <- unique(sol$CCA$centroids)
if (!is.null(sol$CCA$centroids)) {
rs <- rowSums(sol$CCA$centroids^2)
- sol$CCA$centroids <- sol$CCA$centroids[rs > 1e-04, ,
+ sol$CCA$centroids <- sol$CCA$centroids[rs > 1e-04, ,
drop = FALSE]
if (nrow(sol$CCA$centroids) == 0)
sol$CCA$centroids <- NULL
diff --git a/R/cca.formula.R b/R/cca.formula.R
index aa95e22..75dcada 100644
--- a/R/cca.formula.R
+++ b/R/cca.formula.R
@@ -4,9 +4,10 @@
if (missing(data)) {
data <- parent.frame()
} else {
- data <- ordiGetData(match.call(), environment(formula))
+ data <- eval(match.call()$data, environment(formula),
+ enclos = .GlobalEnv)
}
- d <- ordiParseFormula(formula, data, na.action = na.action,
+ d <- ordiParseFormula(formula, data = data, na.action = na.action,
subset = substitute(subset))
sol <- cca.default(d$X, d$Y, d$Z)
if (!is.null(sol$CCA) && sol$CCA$rank > 0)
diff --git a/R/dbrda.R b/R/dbrda.R
index b88e294..a62f1db 100644
--- a/R/dbrda.R
+++ b/R/dbrda.R
@@ -2,16 +2,17 @@
function (formula, data, distance = "euclidean",
sqrt.dist = FALSE, add = FALSE, dfun = vegdist,
metaMDSdist = FALSE, na.action = na.fail,
- subset = NULL, ...)
+ subset = NULL, ...)
{
EPS <- sqrt(.Machine$double.eps)
- if (!inherits(formula, "formula"))
+ if (!inherits(formula, "formula"))
stop("Needs a model formula")
if (missing(data)) {
data <- parent.frame()
}
else {
- data <- ordiGetData(match.call(), environment(formula))
+ data <- eval(match.call()$data, environment(formula),
+ enclos = .GlobalEnv)
}
formula <- formula(terms(formula, data = data))
## The following line was eval'ed in environment(formula), but
@@ -94,7 +95,7 @@
else {
adjust <- sqrt(k)
}
- nm <- attr(X, "Labels")
+ nm <- attr(X, "Labels")
## Get components of inertia with negative eigenvalues following
## McArdle & Anderson (2001), section "Theory". G is their
## double-centred Gower matrix, but instead of hat matrix, we use
@@ -118,7 +119,7 @@
}
## CCA
if (!is.null(d$Y)) {
- d$Y <- scale(d$Y, scale = FALSE)
+ d$Y <- scale(d$Y, scale = FALSE)
Q <- qr(cbind(d$Z, d$Y), tol = 1e-6)
HGH <- qr.fitted(Q, t(qr.fitted(Q, G)))
e <- eigen(HGH, symmetric = TRUE)
@@ -216,14 +217,14 @@
}
sol$colsum <- NA
- if (!is.null(sol$CCA) && sol$CCA$rank > 0)
+ if (!is.null(sol$CCA) && sol$CCA$rank > 0)
sol$CCA$centroids <-
centroids.cca(sol$CCA$u, d$modelframe)
- if (!is.null(sol$CCA$alias))
+ if (!is.null(sol$CCA$alias))
sol$CCA$centroids <- unique(sol$CCA$centroids)
if (!is.null(sol$CCA$centroids)) {
rs <- rowSums(sol$CCA$centroids^2)
- sol$CCA$centroids <- sol$CCA$centroids[rs > 1e-04, ,
+ sol$CCA$centroids <- sol$CCA$centroids[rs > 1e-04, ,
drop = FALSE]
if (nrow(sol$CCA$centroids) == 0)
sol$CCA$centroids <- NULL
diff --git a/R/envfit.formula.R b/R/envfit.formula.R
index 684d5da..5bca192 100644
--- a/R/envfit.formula.R
+++ b/R/envfit.formula.R
@@ -1,10 +1,10 @@
-"envfit.formula" <-
+`envfit.formula` <-
function(formula, data, ...)
{
if (missing(data))
- data <- parent.frame()
+ data <- environment(formula)
X <- formula[[2]]
- X <- eval(X, data, parent.frame())
+ X <- eval(X, environment(formula), enclos = .GlobalEnv)
formula[[2]] <- NULL
P <- model.frame(formula, data, na.action = na.pass)
envfit.default(X, P, ...)
diff --git a/R/fitted.capscale.R b/R/fitted.capscale.R
index c2d56f5..fb8c15d 100644
--- a/R/fitted.capscale.R
+++ b/R/fitted.capscale.R
@@ -13,7 +13,7 @@
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)
+ pCCA = object$pCCA$Fit)
if (is.null(U))
stop("component ", model, " does not exist")
## Distances or working scores U
diff --git a/R/hierParseFormula.R b/R/hierParseFormula.R
index 0d8e911..47d01b4 100644
--- a/R/hierParseFormula.R
+++ b/R/hierParseFormula.R
@@ -1,14 +1,14 @@
-"hierParseFormula" <-
-function (formula, data)
+`hierParseFormula` <-
+ function (formula, data)
{
lhs <- formula[[2]]
- if (any(attr(terms(formula, data = data), "order") > 1))
+ if (any(attr(terms(formula, data = data), "order") > 1))
stop("interactions are not allowed")
- lhs <- as.matrix(eval(lhs, data))
+ lhs <- as.matrix(eval(lhs, environment(formula), parent.frame()))
formula[[2]] <- NULL
rhs <- model.frame(formula, data, drop.unused.levels = TRUE)
rhs[] <- lapply(rhs, function(u) {
- if (!is.factor(u))
+ if (!is.factor(u))
u <- factor(u)
u
})
diff --git a/R/intersetcor.R b/R/intersetcor.R
index 419843e..9a4931b 100644
--- a/R/intersetcor.R
+++ b/R/intersetcor.R
@@ -1,15 +1,18 @@
`intersetcor` <-
- function(object)
+ function(object)
{
if (!inherits(object, "cca"))
stop("can be used only with objects inheriting from 'cca'")
if (is.null(object$CCA))
stop("can be used only with constrained ordination")
wa <- object$CCA$wa
- if (!inherits(object, "rda")) { # is CCA
+ X <- qr.X(object$CCA$QR)
+ if (inherits(object, "rda"))
+ cor(X, wa)
+ else { # cca
w <- object$rowsum
- wa <- sweep(object$CCA$wa, 1, sqrt(w), "*")
+ cov <- crossprod(X, sqrt(w) * wa)
+ sd <- outer(1/sqrt(colSums(X^2)), 1/sqrt(colSums(w * wa^2)))
+ cov * sd
}
- X <- qr.X(object$CCA$QR)
- cor(X, wa)
}
diff --git a/R/make.commsim.R b/R/make.commsim.R
index e08e19f..01c1b88 100644
--- a/R/make.commsim.R
+++ b/R/make.commsim.R
@@ -88,37 +88,31 @@ function(method)
mode="integer",
fun=function(x, n, nr, nc, rs, cs, rf, cf, s, fill, thin) {
out <- array(0L, c(nr, nc, n))
- out[,,1] <- .C("swap",
- m = x, nr, nc, thin, PACKAGE = "vegan")$m
- for (k in seq_len(n-1))
- out[,,k+1] <- .C("swap",
- m = out[,,k], nr, nc, thin,
- PACKAGE = "vegan")$m
+ for (k in seq_len(n)) {
+ x <- .C("swap", m = x, nr, nc, thin, PACKAGE = "vegan")$m
+ out[,,k] <- x
+ }
out
}),
"tswap" = commsim(method="tswap", binary=TRUE, isSeq=TRUE,
mode="integer",
fun=function(x, n, nr, nc, rs, cs, rf, cf, s, fill, thin) {
out <- array(0L, c(nr, nc, n))
- out[,,1] <- .C("trialswap",
- m = x, nr, nc, thin, PACKAGE = "vegan")$m
- for (k in seq_len(n-1))
- out[,,k+1] <- .C("trialswap",
- m = out[,,k], nr, nc, thin, PACKAGE = "vegan")$m
+ for (k in seq_len(n)) {
+ x <- .C("trialswap", m = x, nr, nc, thin, PACKAGE = "vegan")$m
+ out[,,k] <- x
+ }
out
}),
"curveball" = commsim(method="curveball", binary=TRUE, isSeq=TRUE,
mode="integer",
fun=function(x, n, nr, nc, rs, cs, rf, cf, s, fill, thin) {
out <- array(0L, c(nr, nc, n))
- out[,,1] <- .C("curveball", m = x, nr, nc, thin,
- integer(2L*nc),
- PACKAGE = "vegan")$m
- for (k in seq_len(n-1))
- out[,,k+1] <- .C("curveball",
- m = out[,,k], nr, nc, thin,
- integer(2L*nc),
- PACKAGE = "vegan")$m
+ for (k in seq_len(n)) {
+ x <- .C("curveball", m = x, nr, nc, thin,
+ integer(2L*nc), PACKAGE = "vegan")$m
+ out[,,k] <- x
+ }
out
}),
"backtrack" = commsim(method="backtrack", binary=TRUE, isSeq=FALSE,
@@ -187,11 +181,10 @@ function(method)
if (nr < 2L || nc < 2)
stop("needs at least 2 items")
out <- array(0L, c(nr, nc, n))
- out[,,1] <- .C("swapcount",
- m = x, nr, nc, thin, PACKAGE = "vegan")$m
- for (k in seq_len(n-1))
- out[,,k+1] <- .C("swapcount",
- m = out[,,k], nr, nc, thin, PACKAGE = "vegan")$m
+ for (k in seq_len(n)) {
+ x <- .C("swapcount", m = x, nr, nc, thin, PACKAGE = "vegan")$m
+ out[,,k] <- x
+ }
out
}),
"quasiswap_count" = commsim(method="quasiswap_count", binary=FALSE, isSeq=FALSE,
@@ -339,22 +332,20 @@ function(method)
mode="double",
fun=function(x, n, nr, nc, cs, rs, rf, cf, s, fill, thin) {
out <- array(0, c(nr, nc, n))
- out[,,1] <- .C("abuswap",
- m = x, nr, nc, thin, 1L, PACKAGE = "vegan")$m
- for (k in seq_len(n-1))
- out[,,k+1] <- .C("abuswap",
- m = out[,,k], nr, nc, thin, 1L, PACKAGE = "vegan")$m
+ for (k in seq_len(n)) {
+ x <- .C("abuswap", m = x, nr, nc, thin, 1L, PACKAGE = "vegan")$m
+ out[,,k] <- x
+ }
out
}),
"abuswap_c" = commsim(method="abuswap_c", binary=FALSE, isSeq=TRUE,
mode="double",
fun=function(x, n, nr, nc, cs, rs, rf, cf, s, fill, thin) {
out <- array(0, c(nr, nc, n))
- out[,,1] <- .C("abuswap",
- m = x, nr, nc, thin, 0L, PACKAGE = "vegan")$m
- for (k in seq_len(n-1))
- out[,,k+1] <- .C("abuswap",
- m = out[,,k], nr, nc, thin, 0L, PACKAGE = "vegan")$m
+ for (k in seq_len(n)) {
+ x <- .C("abuswap", m = x, nr, nc, thin, 0L, PACKAGE = "vegan")$m
+ out[,,k] <- x
+ }
out
}),
"r00_samp" = commsim(method="r00_samp", binary=FALSE, isSeq=FALSE,
diff --git a/R/ordiGetData.R b/R/ordiGetData.R
deleted file mode 100644
index 26c4f2b..0000000
--- a/R/ordiGetData.R
+++ /dev/null
@@ -1,10 +0,0 @@
-`ordiGetData` <-
-function (call, env)
-{
- call$scale <- call$distance <- call$comm <- call$add <- call$method <-
- call$dfun <- call$sqrt.dist <- call$metaMDSdist <- call$subset <- NULL
- call$na.action <- na.pass
- call[[2]] <- NULL
- call[[1]] <- as.name("model.frame")
- eval(call, env, enclos = .GlobalEnv)
-}
diff --git a/R/ordicluster.R b/R/ordicluster.R
index cd11abd..3fede2b 100644
--- a/R/ordicluster.R
+++ b/R/ordicluster.R
@@ -10,8 +10,8 @@
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
+ noden <- numeric(nrow(mrg) - prune)
+ go <- matrix(0, nrow(mrg) - prune, 2)
## recycle colours for points and prepare to get node colours
col <- rep(col, length = nrow(ord))
col <- col2rgb(col)/255
diff --git a/R/permutest.cca.R b/R/permutest.cca.R
index 110f42a..5716fdc 100644
--- a/R/permutest.cca.R
+++ b/R/permutest.cca.R
@@ -24,6 +24,10 @@ permutest.default <- function(x, ...)
## special cases
isCCA <- !inherits(x, "rda") # weighting
isPartial <- !is.null(x$pCCA) # handle conditions
+ ## first eigenvalue cannot be analysed with capscale which had
+ ## discarded imaginary values: cast to old before evaluating isDB
+ if (first && inherits(x, "capscale"))
+ x <- oldCapscale(x)
isDB <- inherits(x, c("capscale", "dbrda")) &&
!inherits(x, "oldcapscale") # distance-based & new design
## Function to get the F statistics in one loop
@@ -57,6 +61,8 @@ permutest.default <- function(x, ...)
QZ <- qr(XZ)
}
Y <- qr.resid(QZ, Y)
+ if (isDB)
+ Y <- qr.resid(QZ, t(Y))
}
if (isCCA) {
XY <- .C("wcentre", x = as.double(X), as.double(wtake),
@@ -66,12 +72,13 @@ permutest.default <- function(x, ...)
Q <- qr(XY)
}
tmp <- qr.fitted(Q, Y)
- if (first)
- if (isDB)
- cca.ev <- eigen(tmp)$values[1]
- else
+ if (first) {
+ if (isDB) {
+ tmp <- qr.fitted(Q, t(tmp)) # eigen needs symmetric tmp
+ cca.ev <- eigen(tmp, symmetric = TRUE)$values[1]
+ } else
cca.ev <- La.svd(tmp, nv = 0, nu = 0)$d[1]^2
- else
+ } else
cca.ev <- getEV(tmp, isDB)
if (isPartial || first) {
tmp <- qr.resid(Q, Y)
@@ -83,6 +90,7 @@ permutest.default <- function(x, ...)
mat
}
## end getF()
+
if (first) {
Chi.z <- x$CCA$eig[1]
q <- 1
diff --git a/R/predict.rda.R b/R/predict.rda.R
index 0b858d8..c7bc178 100644
--- a/R/predict.rda.R
+++ b/R/predict.rda.R
@@ -51,7 +51,7 @@
}
if (inherits(object, c("capscale", "dbrda"))) {
if (take > 0) {
- out <- u %*% slam/object$adjust
+ out <- u %*% slam
if (type == "response") {
out <- dist(out)
if (!is.null(object$ac)) {
diff --git a/R/rda.formula.R b/R/rda.formula.R
index 96a5378..34a0b09 100644
--- a/R/rda.formula.R
+++ b/R/rda.formula.R
@@ -1,22 +1,23 @@
`rda.formula` <-
function (formula, data, scale = FALSE, na.action = na.fail,
- subset = NULL, ...)
+ subset = NULL, ...)
{
if (missing(data)) {
data <- parent.frame()
} else {
- data <- ordiGetData(match.call(), environment(formula))
+ data <- eval(match.call()$data, environment(formula),
+ enclos = .GlobalEnv)
}
- d <- ordiParseFormula(formula, data, na.action = na.action,
+ d <- ordiParseFormula(formula, data = data, na.action = na.action,
subset = substitute(subset))
sol <- rda.default(d$X, d$Y, d$Z, scale)
- if (!is.null(sol$CCA) && sol$CCA$rank > 0)
+ if (!is.null(sol$CCA) && sol$CCA$rank > 0)
sol$CCA$centroids <- centroids.cca(sol$CCA$wa, d$modelframe)
- if (!is.null(sol$CCA$alias))
+ if (!is.null(sol$CCA$alias))
sol$CCA$centroids <- unique(sol$CCA$centroids)
if (!is.null(sol$CCA$centroids)) {
rs <- rowSums(sol$CCA$centroids^2)
- sol$CCA$centroids <- sol$CCA$centroids[rs > 1e-04, ,
+ sol$CCA$centroids <- sol$CCA$centroids[rs > 1e-04, ,
drop = FALSE]
if (length(sol$CCA$centroids) == 0)
sol$CCA$centroids <- NULL
diff --git a/R/scores.cca.R b/R/scores.cca.R
index f90d997..e4a3adb 100644
--- a/R/scores.cca.R
+++ b/R/scores.cca.R
@@ -70,6 +70,11 @@
rnk]]
colnames(b) <- c(colnames(x$CCA$u), colnames(x$CA$u))[choices]
rownames(b) <- rownames(x$CCA$biplot)
+ if (scaling) {
+ scal <- list(slam, 1, sqrt(slam))[[abs(scaling)]]
+ scal <- scal/max(scal) # scale proportionally to the "best" dim
+ b <- sweep(b, 2, scal, "*")
+ }
sol$biplot <- b
}
if ("centroids" %in% take) {
diff --git a/R/scores.rda.R b/R/scores.rda.R
index 9244d8e..3048cf1 100644
--- a/R/scores.rda.R
+++ b/R/scores.rda.R
@@ -89,6 +89,11 @@
b[, choices <= rnk] <- x$CCA$biplot[, choices[choices <= rnk]]
colnames(b) <- c(colnames(x$CCA$u), colnames(x$CA$u))[choices]
rownames(b) <- rownames(x$CCA$biplot)
+ if (scaling) {
+ scal <- list(slam, 1, sqrt(slam))[[abs(scaling)]]
+ scal <- scal/max(scal) # scale proportionally to the "best" dim
+ b <- sweep(b, 2, scal, "*")
+ }
sol$biplot <- b
}
if ("centroids" %in% take) {
diff --git a/R/simulate.rda.R b/R/simulate.rda.R
index 02a2200..3297fd6 100644
--- a/R/simulate.rda.R
+++ b/R/simulate.rda.R
@@ -235,10 +235,11 @@
else
ans <- ftd + object$CA$Xbar[indx,]
## return Euclidean distances
+ if (object$adjust == 1)
+ ans <- ans * sqrt(nrow(ans) - 1)
ans <- dist(ans)
## remove adjustment done in capscale and put dissimilarities to
## (approximately) original scale
- ans <- ans/object$adjust
if (is.null(indx))
attr(ans, "seed") <- RNGstate
else
diff --git a/R/stressplot.wcmdscale.R b/R/stressplot.wcmdscale.R
index 02304ec..f4c84d2 100644
--- a/R/stressplot.wcmdscale.R
+++ b/R/stressplot.wcmdscale.R
@@ -145,7 +145,7 @@
Xbar <- u %*% t(v)
Xbark <- u[,seq_len(k), drop = FALSE] %*% t(v[,seq_len(k), drop = FALSE])
if (!is.null(object$pCCA)) {
- pFit <- object$pCCA$Fit/object$adjust
+ pFit <- object$pCCA$Fit
Xbar <- Xbar + pFit
Xbark <- Xbark + pFit
}
diff --git a/R/tabasco.R b/R/tabasco.R
index d30d2dc..6c22e88 100644
--- a/R/tabasco.R
+++ b/R/tabasco.R
@@ -5,17 +5,20 @@
### but only uses these for sites, and only if given as 'use'.
`tabasco` <-
- function (x, use, sp.ind = NULL, site.ind = NULL,
- select, Rowv = TRUE, Colv = TRUE, ...)
+ function (x, use, sp.ind = NULL, site.ind = NULL,
+ select, Rowv = TRUE, Colv = TRUE, labRow = NULL,
+ labCol = NULL, scale = c("none", "column", "row"),
+ col = heat.colors(12), ...)
{
if (any(x < 0))
stop("function cannot be used with negative data values")
pltree <- sptree <- NA
+ scale <- match.arg(scale)
if (!missing(use)) {
if (!is.list(use) && is.vector(use)) {
- if (is.null(site.ind))
+ if (is.null(site.ind))
site.ind <- order(use)
- if (is.null(sp.ind))
+ if (is.null(sp.ind))
sp.ind <- order(wascores(use, x))
}
else if (inherits(use, c("dendrogram", "hclust", "twins"))) {
@@ -52,14 +55,14 @@
length(Rowv), nrow(x)))
use <- reorder(use, Rowv, agglo.FUN = "mean")
}
- if (inherits(use, "dendrogram")) {
+ if (inherits(use, "dendrogram")) {
site.ind <- seq_len(nrow(x))
names(site.ind) <- rownames(x)
site.ind <- site.ind[labels(use)]
} else {
site.ind <- use$order
}
- if (is.null(sp.ind))
+ if (is.null(sp.ind))
sp.ind <- order(wascores(order(site.ind), x))
pltree <- use
## heatmap needs a "dendrogram"
@@ -68,19 +71,19 @@
}
else if (is.list(use)) {
tmp <- scores(use, choices = 1, display = "sites")
- if (is.null(site.ind))
+ if (is.null(site.ind))
site.ind <- order(tmp)
- if (is.null(sp.ind))
- sp.ind <- try(order(scores(use, choices = 1,
+ if (is.null(sp.ind))
+ sp.ind <- try(order(scores(use, choices = 1,
display = "species")))
- if (inherits(sp.ind, "try-error"))
+ if (inherits(sp.ind, "try-error"))
sp.ind <- order(wascores(tmp, x))
}
else if (is.matrix(use)) {
tmp <- scores(use, choices = 1, display = "sites")
- if (is.null(site.ind))
+ if (is.null(site.ind))
site.ind <- order(tmp)
- if (is.null(sp.ind))
+ if (is.null(sp.ind))
sp.ind <- order(wascores(tmp, x))
}
}
@@ -121,9 +124,9 @@
sp.ind <- (1:ncol(x))[sp.ind]
if (!is.null(site.ind) && is.logical(site.ind))
site.ind <- (1:nrow(x))[site.ind]
- if (is.null(sp.ind))
+ if (is.null(sp.ind))
sp.ind <- 1:ncol(x)
- if (is.null(site.ind))
+ if (is.null(site.ind))
site.ind <- 1:nrow(x)
if (!missing(select)) {
if (!is.na(pltree))
@@ -152,10 +155,22 @@
cind <- sort(sp.ind)
## we assume t() changes data.frame to a matrix
x <- t(x[rind, cind])
- sp.nam <- rownames(x)
- sp.len <- max(nchar(sp.nam))
+ ## labels must be ordered if there is no dendrogram
+ if (!is.null(labRow))
+ labRow <- labRow[cind]
+ if (!is.null(labCol))
+ labCol <- labCol[rind]
+ x <- switch(scale,
+ "none" = x,
+ "column" = decostand(x, "max", 2),
+ "row" = decostand(x, "max", 1))
+ ## explicit scaling so that zeros and small abundances get
+ ## different colours
+ brk <- (max(x) - min(x[x>0])/2)/length(col)
+ brk <- 0:length(col) * brk
heatmap((max(x) - x), Rowv = sptree, Colv = pltree,
- scale = "none", ...)
+ scale = "none", labRow = labRow, labCol = labCol,
+ col = col, breaks = brk, ...)
out <- list(sites = site.ind, species = sp.ind)
invisible(out)
}
diff --git a/R/tolerance.cca.R b/R/tolerance.cca.R
index fdccbce..bd43894 100644
--- a/R/tolerance.cca.R
+++ b/R/tolerance.cca.R
@@ -6,7 +6,7 @@
##'
##' @param x object of class \code{"cca"}.
##' @param choices numeric; which ordination axes to compute
-##' tolerances and heterogeneities for. Defaults to axes 1 and 2.
+##' tolerances and heterogeneities for. Defaults to axes 1 and 2.
##' @param which character; one of \code{"species"} or \code{"sites"},
##' indicating whether species tolerances or sample heterogeneities
##' respectively are computed.
@@ -15,8 +15,8 @@
##' heterogeneities be reduced via scaling by Hill's N2?
##' @param ... arguments passed to other methods
##' @return matrix of tolerances/heterogeneities with some additional
-##' attributes.
-##' @author Gavin Simpson \email{gavin.simpson AT ucl.ac.uk}
+##' attributes: \code{which}, \code{scaling}, and \code{N2}, the latter of which will be \code{NA} if \code{useN2 = FALSE}.
+##' @author Gavin L. Simpson
##' @examples
##' data(dune)
##' data(dune.env)
@@ -25,77 +25,89 @@
##'
tolerance.cca <- function(x, choices = 1:2,
which = c("species","sites"),
- scaling = "species", useN2 = FALSE,
+ scaling = "species", useN2 = TRUE,
hill = FALSE, ...) {
- if(inherits(x, "rda"))
+ if(inherits(x, "rda")) {
stop("tolerances only available for unimodal ordinations")
- if(missing(which))
+ }
+ if(missing(which)) {
which <- "species"
+ }
## reconstruct species/response matrix Y - up to machine precision!
partialFit <- ifelse(is.null(x$pCCA$Fit), 0, x$pCCA$Fit)
- if (is.null(x$CCA))
+ if (is.null(x$CCA)) {
Xbar <- x$CA$Xbar
- else
+ } else {
Xbar <- x$CCA$Xbar
+ }
Y <- ((partialFit + Xbar) * sqrt(x$rowsum %o% x$colsum) +
x$rowsum %o% x$colsum) * x$grand.total
which <- match.arg(which)
- siteScrTypes <- if(is.null(x$CCA)){ "sites" } else {"lc"}
+ siteScrTypes <- if (is.null(x$CCA)) {
+ "sites"
+ } else {
+ "lc"
+ }
## Sort out scaling; only for (C)CA so no correlation arg
scaling <- scalingType(scaling, hill = hill)
- scrs <- scores(x, display = c(siteScrTypes,"species"),
+ scrs <- scores(x, display = c(siteScrTypes, "species"),
choices = choices, scaling = scaling, ...)
## compute N2 if useN2 == TRUE & only if
doN2 <- isTRUE(useN2) && ((which == "species" && abs(scaling) == 2) ||
(which == "sites" && abs(scaling) == 1))
-
- ## this gives the x_i - u_k on axis j
- ## outer(scrs$sites, scrs$species, "-")[,2,,j]
siteScrs <- which(names(scrs) %in% c("sites","constraints"))
- xiuk <- outer(scrs[[siteScrs]], scrs$species, "-")
if(isTRUE(all.equal(which, "sites"))) {
- ## need to permute the array as rowSums has different idea of what rows
- ## are that doesn't correspond to colSums. So flip dimensions 1 and 2
- ## with aperm and use colSums.
- res <- sqrt(sweep(colSums(aperm(sweep(xiuk[ , 2, , choices]^2, c(1:2),
- data.matrix(Y), "*"),
- c(2,1,3))),
- 1, rowSums(Y), "/"))
+ res <- matrix(ncol = length(choices), nrow = nrow(scrs[[siteScrs]]))
+ Ytot <- rowSums(Y)
+ for (i in seq_len(NROW(res))) {
+ XiUk <- apply(scrs[["species"]], 1L, `-`, scrs[[siteScrs]][i,])
+ YXiUk <- sweep(XiUk^2, 2L, Y[i,], "*")
+ res[i, ] <- sqrt(rowSums(YXiUk) / Ytot[i])
+ }
+ rownames(res) <- rownames(scrs[[siteScrs]])
+ colnames(res) <- colnames(scrs[[siteScrs]])
+
if(doN2) {
- tot <- rowSums(Y)
- y <- sweep(Y, 1, tot, "/")^2
+ y <- sweep(Y, 1, Ytot, "/")^2
N2 <- 1 / rowSums(y, na.rm = TRUE) ## 1/H
res <- sweep(res, 1, sqrt(1 - (1/N2)), "/")
}
} else {
- res <- sqrt(sweep(colSums(sweep(xiuk[ , 2, , choices]^2, c(1:2),
- data.matrix(Y), "*")),
- 1, colSums(Y), "/"))
+ res <- matrix(ncol = length(choices), nrow = ncol(Y))
+ Ytot <- colSums(Y)
+ for (i in seq_len(NROW(res))) {
+ XiUk <- apply(scrs[[siteScrs]], 1L, `-`, scrs[["species"]][i,])
+ YXiUk <- sweep(XiUk^2, 2L, Y[,i], "*")
+ res[i, ] <- sqrt(rowSums(YXiUk) / Ytot[i])
+ }
+ rownames(res) <- colnames(Y)
+ colnames(res) <- colnames(scrs[["species"]])
+
if(doN2) {
- tot <- colSums(Y)
- y <- sweep(Y, 2, tot, "/")^2
- N2 <- 1 / colSums(y, na.rm = TRUE) ## 1/H
+ y <- sweep(Y, 2, Ytot, "/")^2
+ N2 <- 1 / colSums(y, na.rm = TRUE) # 1/H
res <- sweep(res, 1, sqrt(1 - (1/N2)), "/")
}
}
- class(res) <- c("tolerance.cca","tolerance","matrix")
+ res[is.infinite(res)] <- 0 # some values can be Inf but are really 0
+ class(res) <- c("tolerance.cca", "tolerance","matrix")
attr(res, "which") <- which
attr(res, "scaling") <- scaling
- attr(res, "N2") <- NULL
- if(doN2)
+ attr(res, "N2") <- NA
+ if(doN2) {
attr(res, "N2") <- N2
- attr(res, "model") <- deparse(substitute(mod))
- return(res)
+ }
+ res # return
}
`print.tolerance.cca` <- function(x, ...) {
cat("\n")
- msg <- ifelse(attr(x, "which") == "species", "Species Tolerances",
- "Sample Heterogeneities")
- writeLines(strwrap(msg, prefix = "\t"), sep = "\n\n")
+ msg <- ifelse(attr(x, "which") == "species", "Species Tolerance",
+ "Sample Heterogeneity")
+ writeLines(msg, sep = "\n\n")
msg <- paste("Scaling:", attr(x, "scaling"))
writeLines(strwrap(msg), sep = "\n\n")
- attr(x, "model") <- attr(x, "scaling") <- attr(x, "which") <- NULL
+ attr(x, "model") <- attr(x, "scaling") <- attr(x, "which") <- attr(x, "N2") <- NULL
print(unclass(x), ...)
cat("\n")
}
diff --git a/build/partial.rdb b/build/partial.rdb
index 5aabe92..c08a061 100644
Binary files a/build/partial.rdb and b/build/partial.rdb differ
diff --git a/data/dune.taxon.rda b/data/dune.taxon.rda
index d29dc3a..df1ab3c 100644
Binary files a/data/dune.taxon.rda and b/data/dune.taxon.rda differ
diff --git a/inst/NEWS.Rd b/inst/NEWS.Rd
index 7b7114a..a3611f2 100644
--- a/inst/NEWS.Rd
+++ b/inst/NEWS.Rd
@@ -1,7 +1,91 @@
-\name{NEWS}
+ \name{NEWS}
\title{vegan News}
\encoding{UTF-8}
+\section{Changes in version 2.4-2}{
+ \subsection{BUG FIXES}{
+ \itemize{
+
+ \item Permutation tests (\code{permutests}, \code{anova}) for the
+ first axis failed in constrained distance-based ordination
+ (\code{dbrda}, \code{capscale}). Now \code{capscale} will also
+ throw away negative eigenvalues when first eigenvalues are
+ tested. All permutation tests for the first axis are now
+ faster. The problem was reported by Cleo Tebby and the fixes are
+ discussed in GitHub issue
+ \href{https://github.com/vegandevs/vegan/issues/198}{#198} and
+ pull request
+ \href{https://github.com/vegandevs/vegan/pull/199}{#199}.
+
+ \item Some support functions for \code{dbrda} or \code{capscale}
+ gave results or some of their components in wrong scale. Fixes in
+ \code{stressplot}, \code{simulate}, \code{predict} and
+ \code{fitted} functions.
+
+ \item \code{intersetcor} did not use correct weighting for
+ \code{cca} and the results were slightly off.
+
+ \item \code{anova} and \code{permutest} failed when
+ \code{betadisper} was fitted with argument
+ \code{bias.adjust = TRUE}. Fixes Github issue
+ \href{https://github.com/vegandevs/vegan/issues/219}{#219}
+ reported by Ross Cunning, O'ahu, Hawaii.
+
+ \item \code{ordicluster} should return invisibly only the
+ coordinates of internal points (where clusters or points are
+ joined), but last rows contained coordinates of external points
+ (ordination scores of points).
+
+ \item The \code{cca} method of \code{tolerance} was returning
+ incorrect values for all but the second axis for sample
+ heterogeneities and species tolerances. See issue
+ \href{https://github.com/vegandevs/vegan/issues/216}{#216} for
+ details.
+
+ } %itemize
+ } % bug fixes
+
+ \subsection{NEW FEATURES}{
+ \itemize{
+
+ \item Biplot scores are scaled similarly as site scores in
+ constrained ordination methods \code{cca}, \code{rda},
+ \code{capscale} and \code{dbrda}. Earlier they were unscaled (or
+ more technically, had equal scaling on all axes).
+
+ \item \code{tabasco} adds argument to \code{scale} the colours
+ by rows or columns in addition to the old equal scale over the
+ whole plot. New arguments \code{labRow} and \code{labCex} can be
+ used to change the column or row labels. Function also takes
+ care that only above-zero observations are coloured: earlier
+ tiny observed values were merged to zeros and were not distinct
+ in the plots.
+
+ \item Sequential null models are somewhat faster (up to
+ 10\%). Non-sequential null models may be marginally faster. These
+ null models are generated by function \code{nullmodel} and also
+ used in \code{oecosimu}.
+
+ \item \code{vegdist} is much faster. It used to be clearly slower
+ than \code{stats::dist}, but now it is nearly equally fast for the
+ same dissimilarity measure.
+
+ \item Handling of \code{data=} in formula interface is more
+ robust, and messages on user errors are improved. This fixes
+ points raised in Github issue
+ \href{https://github.com/vegandevs/vegan/issues/200}{#200}.
+
+ \item The families and orders in \code{dune.taxon} were updated to
+ APG IV (\emph{Bot J Linnean Soc} \strong{181,} 1--20; 2016) and a
+ corresponding classification for higher levels (Chase & Reveal,
+ \emph{Bot J Linnean Soc} \strong{161,} 122-127; 2009).
+
+ } %itemize
+ } % features
+
+
+} % 2.4-2
+
\section{Changes in version 2.4-1}{
\subsection{INSTALLATION}{
\itemize{
diff --git a/inst/ChangeLog b/inst/OldChangeLog
similarity index 100%
rename from inst/ChangeLog
rename to inst/OldChangeLog
diff --git a/inst/doc/decision-vegan.pdf b/inst/doc/decision-vegan.pdf
index b6331e5..cd949b2 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 35d1ae4..48ea5bc 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 3d20ab1..3020cda 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 68b648e..8d1321b 100644
Binary files a/inst/doc/partitioning.pdf and b/inst/doc/partitioning.pdf differ
diff --git a/man/anova.cca.Rd b/man/anova.cca.Rd
index 7509f60..c72cf0a 100644
--- a/man/anova.cca.Rd
+++ b/man/anova.cca.Rd
@@ -33,9 +33,9 @@
\item{object}{One or several result objects from \code{\link{cca}},
\code{\link{rda}} or \code{\link{capscale}}. If there are several
- result objects, they are compared against each other in the ordre
+ result objects, they are compared against each other in the order
they were supplied. For a single object, a test specified in
- \code{by} or an overal test is given.}
+ \code{by} or an overall test is given.}
\item{x}{A single ordination result object.}
@@ -94,7 +94,7 @@
Function \code{anova} can analyse a sequence of constrained
ordination models. The analysis is based on the differences in
- residual deviances in permutations of nested models.
+ residual deviance in permutations of nested models.
The default test is for the sum of all constrained eigenvalues.
Setting \code{first = TRUE} will perform a test for the first
@@ -113,7 +113,7 @@
perform separate significance test for each term (constraining
variable). The terms are assessed sequentially from first to last,
and the order of the terms will influence their
- significances. Setting \code{by = "margin"} will perform separate
+ significance. Setting \code{by = "margin"} will perform separate
significance test for each marginal term in a model with all other
terms. The marginal test also accepts a \code{scope} argument for
the \code{\link{drop.scope}} which can be a character vector of term
diff --git a/man/betadisper.Rd b/man/betadisper.Rd
index 97ba3d5..dc0bf5f 100644
--- a/man/betadisper.Rd
+++ b/man/betadisper.Rd
@@ -303,6 +303,8 @@ eigenvals(mod)
## try out bias correction; compare with mod3
(mod3B <- betadisper(dis, groups, type = "median", bias.adjust=TRUE))
+anova(mod3B)
+permutest(mod3B, permutations = 99)
## should always work for a single group
group <- factor(rep("grazed", NROW(varespec)))
diff --git a/man/capscale.Rd b/man/capscale.Rd
index fa99738..a76ed00 100644
--- a/man/capscale.Rd
+++ b/man/capscale.Rd
@@ -195,10 +195,9 @@ dbrda(formula, data, distance = "euclidean", sqrt.dist = FALSE,
Manhattan distances. Inertia is based on squared index, and keyword
\code{squared} is added to the name of distance, unless data were
square root transformed (argument \code{sqrt.dist = TRUE}). If an
- additive constant was used, keyword \code{euclidified} is added to the
- the name of inertia, and the value of the constant is printed
- (argument \code{add = TRUE}).
-}
+ additive constant was used with argument \code{add},
+ \code{Lingoes adjusted} or \code{Cailliez adjusted} is added to the
+ the name of inertia, and the value of the constant is printed. }
\seealso{\code{\link{rda}}, \code{\link{cca}}, \code{\link{plot.cca}},
diff --git a/man/dune.taxon.Rd b/man/dune.taxon.Rd
index 0fa9826..d8406bf 100644
--- a/man/dune.taxon.Rd
+++ b/man/dune.taxon.Rd
@@ -22,13 +22,26 @@
}
\details{
- The classification of vascular plants is based on APG (2009), and
- that of mosses on Hill et al. (2006).
+
+ The families and orders are based on APG IV (2016) in vascular
+ plants and on Hill et al. (2006) in mosses. The higher levels
+ (superorder and subclass) are based on Chase & Reveal (2009). Chase
+ & Reveal (2009) treat Angiosperms and mosses as subclasses of class
+ Equisetopsida (land plants), but brylogists have traditionally used
+ much more inflated levels which are adjusted here to match
+ Angiosperm classification.
+
}
\references{
- APG [Angiosperm Phylogeny Group] (2009) An update of the Angiosperm
- Phylogeny Group classification for the orders and families of flowering
- plants: APG III. \emph{Bot. J. Linnean Soc.} \strong{161}: 105--121.
+
+ APG IV [Angiosperm Phylogeny Group] (2016) An update of the
+ Angiosperm Phylogeny Group classification for the orders and
+ families of flowering plants: APG IV. \emph{Bot. J. Linnean Soc.}
+ \strong{181}: 1--20.
+
+ Chase, M.W. & Reveal, J. L. (2009) A phylogenetic classification of
+ the land plants to accompany APG III. \emph{Bot. J. Linnean Soc.}
+ \strong{161}: 122--127.
Hill, M.O et al. (2006) An annotated checklist of the mosses of Europe
and Macaronesia. \emph{J. Bryology} \strong{28}: 198--267.
@@ -39,7 +52,8 @@
I.J., Aarssen, L., Bertin, R.I., Calaminus, A., Govaerts, R.,
Hemmings, F., Leishman, M.R., Oleksyn, J., Soltis, P.S., Swenson,
N.G., Warman, L. & Beaulieu, J.M. (2014) Three keys to the radiation
- of angiosperms into freezing environments. \emph{Nature} 506, 89--92.
+ of angiosperms into freezing environments. \emph{Nature}
+ \strong{506}: 89--92.
}
diff --git a/man/envfit.Rd b/man/envfit.Rd
index 62a7255..e14dad1 100644
--- a/man/envfit.Rd
+++ b/man/envfit.Rd
@@ -106,7 +106,16 @@ factorfit(X, P, permutations = 0, strata = NULL, w, ...)
side lists the environmental variables. The formula interface can be
used for easier selection and/or transformation of environmental
variables. Only the main effects will be analysed even if interaction
- terms were defined in the formula.
+ terms were defined in the formula.
+
+ The ordination results are extracted with \code{\link{scores}} and
+ all extra arguments are passed to the \code{scores}. The fitted
+ models only apply to the results defined when extracting the scores
+ when using \code{envfit}. For instance, \code{scaling} in
+ constrained ordination (see \code{\link{scores.rda}},
+ \code{\link{scores.cca}}) must be set in the same way in
+ \code{envfit} and in the \code{plot} or the ordination results (see
+ Examples).
The printed output of continuous variables (vectors) gives the
direction cosines which are the coordinates of the heads of unit
@@ -204,8 +213,7 @@ factorfit(X, P, permutations = 0, strata = NULL, w, ...)
}
\examples{
-data(varespec)
-data(varechem)
+data(varespec, varechem)
library(MASS)
ord <- metaMDS(varespec)
(fit <- envfit(ord, varechem, perm = 999))
@@ -219,6 +227,10 @@ ord <- cca(varespec ~ Al + P + K, varechem)
plot(ord, type="p")
fit <- envfit(ord, varechem, perm = 999, display = "lc")
plot(fit, p.max = 0.05, col = "red")
+## 'scaling' must be set similarly in envfit and in ordination plot
+plot(ord, type = "p", scaling = "sites")
+fit <- envfit(ord, varechem, perm = 0, display = "lc", scaling = "sites")
+plot(fit, col = "red")
## Class variables, formula interface, and displaying the
## inter-class variability with `ordispider', and semitransparent
diff --git a/man/plot.cca.Rd b/man/plot.cca.Rd
index 6a6e5be..b8cbe7e 100644
--- a/man/plot.cca.Rd
+++ b/man/plot.cca.Rd
@@ -116,15 +116,22 @@
Environmental variables receive a special treatment. With
\code{display="bp"}, arrows will be drawn. These are labelled with
- \code{text} and unlabelled with \code{points}. The basic \code{plot}
- function uses a simple (but not very clever) heuristics for adjusting
- arrow lengths to plots, but the user can give the expansion factor in
- \code{mul.arrow}. With \code{display="cn"} the centroids of levels of
- \code{\link{factor}} variables are displayed (these are available only if there were
- factors and a formula interface was used in \code{\link{cca}} or
- \code{\link{rda}}). With this option continuous
+ \code{text} and unlabelled with \code{points}. The arrows have
+ basically unit scaling, but if sites were scaled (\code{scaling}
+ \code{"sites"} or \code{"symmetric"}), the scores of requested axes
+ are adjusted relative to the axis with highest eigenvalue. With
+ \code{scaling = "species"} or \code{scaling = "none"}, the arrows will
+ be consistent with vectors fitted to linear combination scores
+ (\code{display = "lc"} in function \code{\link{envfit}}), but with
+ other scaling alternatives they will differ. The basic \code{plot}
+ function uses a simple heuristics for adjusting the unit-length arrows
+ to the current plot area, but the user can give the expansion factor
+ in \code{mul.arrow}. With \code{display="cn"} the centroids of levels
+ of \code{\link{factor}} variables are displayed (these are available
+ only if there were factors and a formula interface was used in
+ \code{\link{cca}} or \code{\link{rda}}). With this option continuous
variables still are presented as arrows and ordered factors as arrows
- and centroids.
+ and centroids.
If you want to have still a better control of plots, it is better to
produce them using primitive \code{plot} commands. Function
diff --git a/man/tolerance.Rd b/man/tolerance.Rd
index 86d7186..306b988 100644
--- a/man/tolerance.Rd
+++ b/man/tolerance.Rd
@@ -7,7 +7,7 @@
tolerance(x, \dots)
\method{tolerance}{cca}(x, choices = 1:2, which = c("species","sites"),
- scaling = "species", useN2 = FALSE, hill = FALSE, \dots)
+ scaling = "species", useN2 = TRUE, hill = FALSE, \dots)
}
\description{
Species tolerances and sample heterogeneities.
@@ -15,11 +15,12 @@ tolerance(x, \dots)
\details{
Function to compute species tolerances and site heterogeneity measures
from unimodal ordinations (CCA & CA). Implements Eq 6.47 and 6.48 from
- the Canoco 4.5 Reference Manual (pages 178-179).
+ the Canoco 4.5 Reference Manual (pages 178--179).
}
\value{
Matrix of tolerances/heterogeneities with some additional
- attributes.
+ attributes: \code{which}, \code{scaling}, and \code{N2}, the latter of
+ which will be \code{NA} if \code{useN2 = FALSE}.
}
\author{Gavin L. Simpson}
\arguments{
diff --git a/man/vegan-internal.Rd b/man/vegan-internal.Rd
index eb64b8d..c35ed6b 100644
--- a/man/vegan-internal.Rd
+++ b/man/vegan-internal.Rd
@@ -1,5 +1,4 @@
\name{vegan-internal}
-\alias{ordiGetData}
\alias{ordiParseFormula}
\alias{ordiNAexclude}
\alias{ordiNApredict}
@@ -23,7 +22,6 @@
but only within other functions.
}
\usage{
-ordiGetData(call, env)
ordiParseFormula(formula, data, xlev = NULL, na.action = na.fail,
subset = NULL)
ordiTerminfo(d, data)
@@ -50,9 +48,7 @@ addCailliez(d)
\code{\link{get}} or \code{\link{:::}} to directly call these
functions.
- \code{ordiGetData} finds the model frame of constraints and
- conditions in constrained ordination in the defined
- \code{env}ironment. \code{ordiParseFormula} returns a list of three
+ \code{ordiParseFormula} returns a list of three
matrices (dependent variables, and \code{\link{model.matrix}} of
constraints and conditions, possibly \code{NULL}) needed in
constrained ordination. Argument \code{xlev} is passed to
diff --git a/man/vegemite.Rd b/man/vegemite.Rd
index 171bed4..ceee36b 100644
--- a/man/vegemite.Rd
+++ b/man/vegemite.Rd
@@ -17,7 +17,8 @@
\usage{
vegemite(x, use, scale, sp.ind, site.ind, zero=".", select ,...)
tabasco(x, use, sp.ind = NULL, site.ind = NULL, select,
- Rowv = TRUE, Colv = TRUE, ...)
+ Rowv = TRUE, Colv = TRUE, labRow = NULL, labCol = NULL,
+ scale = c("none", "column", "row"), col = heat.colors(12), ...)
coverscale(x, scale=c("Braun.Blanquet", "Domin", "Hult", "Hill", "fix","log"),
maxabund)
}
@@ -44,7 +45,20 @@ coverscale(x, scale=c("Braun.Blanquet", "Domin", "Hult", "Hill", "fix","log"),
weighted average (\code{\link{wascores}}) of the row order.
Alternatively, the arguments can be vectors that are used to
reorder the dendrogram. }
- \item{scale}{Cover scale used (can be abbreviated).}
+
+ \item{labRow, labCol}{character vectors with row and column labels
+ used in the \code{\link{heatmap}} instead of the default. NB., the
+ input matrix is transposed so that row labels will be used for data
+ columns.}
+
+ \item{scale}{In \code{vegemite} and \code{coverscale}: cover scale
+ used (can be abbreviated). In \code{tabasco}: scaling of colours
+ in \code{\link{heatmap}}; if \code{"column"} or \code{"row"}, all
+ columns or rows are scaled to equal maximum colour (NB., these
+ refer to the transposed data of the \code{\link{heatmap}}). }
+
+ \item{col}{A vector of colours used for above-zero abundance values.}
+
\item{maxabund}{Maximum abundance used with \code{scale = "log"}.
Data maximum in the \code{select}ed subset will be used if this is
missing.}
diff --git a/src/nestedness.c b/src/nestedness.c
index e097a74..8a3dfa1 100644
--- a/src/nestedness.c
+++ b/src/nestedness.c
@@ -12,8 +12,6 @@
void i2rand(int *vec, int imax)
{
- if (imax < 1)
- error("needs at least 2 items");
vec[0] = IRAND(imax);
do {
vec[1] = IRAND(imax);
diff --git a/src/vegdist.c b/src/vegdist.c
index 2ee63ec..f97447b 100644
--- a/src/vegdist.c
+++ b/src/vegdist.c
@@ -60,7 +60,7 @@ double veg_manhattan(double *x, int nr, int nc, int i1, int i2)
dist = 0.0;
count = 0;
for (j=0; j<nc; j++) {
- if (R_FINITE(x[i1]) && R_FINITE(x[i2])) {
+ if (!ISNAN(x[i1]) && !ISNAN(x[i2])) {
dist += fabs( x[i1] - x[i2] );
count++;
}
@@ -85,7 +85,7 @@ double veg_gower(double *x, int nr, int nc, int i1, int i2)
dist = 0.0;
count = 0;
for (j=0; j<nc; j++) {
- if (R_FINITE(x[i1]) && R_FINITE(x[i2])) {
+ if (!ISNAN(x[i1]) && !ISNAN(x[i2])) {
dist += fabs( x[i1] - x[i2] );
count++;
}
@@ -112,7 +112,7 @@ double veg_gowerDZ(double *x, int nr, int nc, int i1, int i2)
dist = 0.0;
count = 0;
for (j=0; j<nc; j++) {
- if (R_FINITE(x[i1]) && R_FINITE(x[i2])) {
+ if (!ISNAN(x[i1]) && !ISNAN(x[i2])) {
if (x[i1] > 0 || x[i2] > 0) {
dist += fabs( x[i1] - x[i2] );
count++;
@@ -138,7 +138,7 @@ double veg_euclidean(double *x, int nr, int nc, int i1, int i2)
count = 0;
dist = 0.0;
for (j=0; j<nc; j++) {
- if (R_FINITE(x[i1]) && R_FINITE(x[i2])) {
+ if (!ISNAN(x[i1]) && !ISNAN(x[i2])) {
dev = x[i1] - x[i2];
dist += dev*dev;
count++;
@@ -162,7 +162,7 @@ double veg_canberra(double *x, int nr, int nc, int i1, int i2)
count = 0;
dist = 0.0;
for (j=0; j<nc; j++) {
- if (R_FINITE(x[i1]) && R_FINITE(x[i2])) {
+ if (!ISNAN(x[i1]) && !ISNAN(x[i2])) {
if (x[i1] != 0 || x[i2] != 0) {
count++;
denom = x[i1] + x[i2];
@@ -200,7 +200,7 @@ double veg_bray(double *x, int nr, int nc, int i1, int i2)
count = 0;
dist = 0;
for (j=0; j<nc; j++) {
- if (R_FINITE(x[i1]) && R_FINITE(x[i2])) {
+ if (!ISNAN(x[i1]) && !ISNAN(x[i2])) {
dist += fabs(x[i1] - x[i2]);
total += x[i1] + x[i2];
count++;
@@ -225,7 +225,7 @@ double veg_kulczynski(double *x, int nr, int nc, int i1, int i2)
count = 0;
sim = 0.0;
for (j=0; j<nc; j++) {
- if (R_FINITE(x[i1]) && R_FINITE(x[i2])) {
+ if (!ISNAN(x[i1]) && !ISNAN(x[i2])) {
sim += (x[i1] < x[i2]) ? x[i1] : x[i2] ;
t1 += x[i1];
t2 += x[i2];
@@ -257,7 +257,7 @@ double veg_morisita(double *x, int nr, int nc, int i1, int i2)
tlam1 = 0.0;
tlam2 = 0.0;
for (j=0; j<nc; j++) {
- if (R_FINITE(x[i1]) && R_FINITE(x[i2])) {
+ if (!ISNAN(x[i1]) && !ISNAN(x[i2])) {
sim += x[i1]*x[i2];
t1 += x[i1];
t2 += x[i2];
@@ -289,7 +289,7 @@ double veg_horn(double *x, int nr, int nc, int i1, int i2)
sq1 = 0.0;
sq2 = 0.0;
for (j=0; j<nc; j++) {
- if (R_FINITE(x[i1]) && R_FINITE(x[i2])) {
+ if (!ISNAN(x[i1]) && !ISNAN(x[i2])) {
sim += x[i1]*x[i2];
t1 += x[i1];
t2 += x[i2];
@@ -339,7 +339,7 @@ double veg_mountford(double *x, int nr, int nc, int i1, int i2)
t2 = 0;
count = 0;
for (j = 0; j < nc; j++) {
- if (R_FINITE(x[i1]) && R_FINITE(x[i2])) {
+ if (!ISNAN(x[i1]) && !ISNAN(x[i2])) {
if (x[i1] > 0.0 && x[i2] > 0.0)
sim++;
if (x[i1] > 0)
@@ -407,7 +407,7 @@ double veg_raup(double *x, int nr, int nc, int i1, int i2)
t2 = 0;
count = 0;
for (j = 0; j < nc; j++) {
- if (R_FINITE(x[i1]) && R_FINITE(x[i2])) {
+ if (!ISNAN(x[i1]) && !ISNAN(x[i2])) {
if (x[i1] > 0.0 && x[i2] > 0.0)
sim++;
if (x[i1] > 0)
@@ -443,7 +443,7 @@ double veg_millar(double *x, int nr, int nc, int i1, int i2)
count = 0;
dist = 0;
for (j=0; j<nc; j++, i1 += nr, i2 += nr) {
- if (R_FINITE(x[i1]) && R_FINITE(x[i2])) {
+ if (!ISNAN(x[i1]) && !ISNAN(x[i2])) {
nk = x[i1] + x[i2];
if (nk == 0) continue;
lognk = log(nk);
@@ -482,7 +482,7 @@ double veg_chao(double *x, int nr, int nc, int i1, int i2)
jshar1 = 0;
count = 0;
for (j=0; j<nc; j++) {
- if (R_FINITE(x[i1]) && R_FINITE(x[i2])) {
+ if (!ISNAN(x[i1]) && !ISNAN(x[i2])) {
count++;
itot += x[i1];
jtot += x[i2];
@@ -543,7 +543,7 @@ double veg_cao(double *x, int nr, int nc, int i1, int i2)
count = 0;
dist = 0;
for (j=0; j<nc; j++, i1 += nr, i2 += nr) {
- if (R_FINITE(x[i1]) && R_FINITE(x[i2])) {
+ if (!ISNAN(x[i1]) && !ISNAN(x[i2])) {
/* skip the rest of the loop if both species are
absent */
if (x[i1] == 0 && x[i2] == 0) continue;
@@ -584,7 +584,7 @@ double veg_noshared(double *x, int nr, int nc, int i1, int i2)
dist = 1;
count = 0;
for (j = 0; j<nc; j++) {
- if (R_FINITE(x[i1]) && R_FINITE(x[i2])) {
+ if (!ISNAN(x[i1]) && !ISNAN(x[i2])) {
count++;
if (x[i1] > 0 && x[i2] > 0) {
dist = 0;
@@ -609,7 +609,7 @@ double veg_matching(double *x, int nr, int nc, int i1, int i2)
matches = 0;
count = 0;
for (j = 0; j<nc; j++) {
- if (R_FINITE(x[i1]) && R_FINITE(x[i2])) {
+ if (!ISNAN(x[i1]) && !ISNAN(x[i2])) {
count++;
if (x[i1] == x[i2])
matches++;
--
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