all messages for Guix-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
blob c93e3905e18cf26d2cc801f4612dcce415ef9f26 470794 bytes (raw)
name: gnu/packages/patches/vegan-revert-test-deletion.patch 	 # note: path name is non-authoritative(*)

    1
    2
    3
    4
    5
    6
    7
    8
    9
   10
   11
   12
   13
   14
   15
   16
   17
   18
   19
   20
   21
   22
   23
   24
   25
   26
   27
   28
   29
   30
   31
   32
   33
   34
   35
   36
   37
   38
   39
   40
   41
   42
   43
   44
   45
   46
   47
   48
   49
   50
   51
   52
   53
   54
   55
   56
   57
   58
   59
   60
   61
   62
   63
   64
   65
   66
   67
   68
   69
   70
   71
   72
   73
   74
   75
   76
   77
   78
   79
   80
   81
   82
   83
   84
   85
   86
   87
   88
   89
   90
   91
   92
   93
   94
   95
   96
   97
   98
   99
  100
  101
  102
  103
  104
  105
  106
  107
  108
  109
  110
  111
  112
  113
  114
  115
  116
  117
  118
  119
  120
  121
  122
  123
  124
  125
  126
  127
  128
  129
  130
  131
  132
  133
  134
  135
  136
  137
  138
  139
  140
  141
  142
  143
  144
  145
  146
  147
  148
  149
  150
  151
  152
  153
  154
  155
  156
  157
  158
  159
  160
  161
  162
  163
  164
  165
  166
  167
  168
  169
  170
  171
  172
  173
  174
  175
  176
  177
  178
  179
  180
  181
  182
  183
  184
  185
  186
  187
  188
  189
  190
  191
  192
  193
  194
  195
  196
  197
  198
  199
  200
  201
  202
  203
  204
  205
  206
  207
  208
  209
  210
  211
  212
  213
  214
  215
  216
  217
  218
  219
  220
  221
  222
  223
  224
  225
  226
  227
  228
  229
  230
  231
  232
  233
  234
  235
  236
  237
  238
  239
  240
  241
  242
  243
  244
  245
  246
  247
  248
  249
  250
  251
  252
  253
  254
  255
  256
  257
  258
  259
  260
  261
  262
  263
  264
  265
  266
  267
  268
  269
  270
  271
  272
  273
  274
  275
  276
  277
  278
  279
  280
  281
  282
  283
  284
  285
  286
  287
  288
  289
  290
  291
  292
  293
  294
  295
  296
  297
  298
  299
  300
  301
  302
  303
  304
  305
  306
  307
  308
  309
  310
  311
  312
  313
  314
  315
  316
  317
  318
  319
  320
  321
  322
  323
  324
  325
  326
  327
  328
  329
  330
  331
  332
  333
  334
  335
  336
  337
  338
  339
  340
  341
  342
  343
  344
  345
  346
  347
  348
  349
  350
  351
  352
  353
  354
  355
  356
  357
  358
  359
  360
  361
  362
  363
  364
  365
  366
  367
  368
  369
  370
  371
  372
  373
  374
  375
  376
  377
  378
  379
  380
  381
  382
  383
  384
  385
  386
  387
  388
  389
  390
  391
  392
  393
  394
  395
  396
  397
  398
  399
  400
  401
  402
  403
  404
  405
  406
  407
  408
  409
  410
  411
  412
  413
  414
  415
  416
  417
  418
  419
  420
  421
  422
  423
  424
  425
  426
  427
  428
  429
  430
  431
  432
  433
  434
  435
  436
  437
  438
  439
  440
  441
  442
  443
  444
  445
  446
  447
  448
  449
  450
  451
  452
  453
  454
  455
  456
  457
  458
  459
  460
  461
  462
  463
  464
  465
  466
  467
  468
  469
  470
  471
  472
  473
  474
  475
  476
  477
  478
  479
  480
  481
  482
  483
  484
  485
  486
  487
  488
  489
  490
  491
  492
  493
  494
  495
  496
  497
  498
  499
  500
  501
  502
  503
  504
  505
  506
  507
  508
  509
  510
  511
  512
  513
  514
  515
  516
  517
  518
  519
  520
  521
  522
  523
  524
  525
  526
  527
  528
  529
  530
  531
  532
  533
  534
  535
  536
  537
  538
  539
  540
  541
  542
  543
  544
  545
  546
  547
  548
  549
  550
  551
  552
  553
  554
  555
  556
  557
  558
  559
  560
  561
  562
  563
  564
  565
  566
  567
  568
  569
  570
  571
  572
  573
  574
  575
  576
  577
  578
  579
  580
  581
  582
  583
  584
  585
  586
  587
  588
  589
  590
  591
  592
  593
  594
  595
  596
  597
  598
  599
  600
  601
  602
  603
  604
  605
  606
  607
  608
  609
  610
  611
  612
  613
  614
  615
  616
  617
  618
  619
  620
  621
  622
  623
  624
  625
  626
  627
  628
  629
  630
  631
  632
  633
  634
  635
  636
  637
  638
  639
  640
  641
  642
  643
  644
  645
  646
  647
  648
  649
  650
  651
  652
  653
  654
  655
  656
  657
  658
  659
  660
  661
  662
  663
  664
  665
  666
  667
  668
  669
  670
  671
  672
  673
  674
  675
  676
  677
  678
  679
  680
  681
  682
  683
  684
  685
  686
  687
  688
  689
  690
  691
  692
  693
  694
  695
  696
  697
  698
  699
  700
  701
  702
  703
  704
  705
  706
  707
  708
  709
  710
  711
  712
  713
  714
  715
  716
  717
  718
  719
  720
  721
  722
  723
  724
  725
  726
  727
  728
  729
  730
  731
  732
  733
  734
  735
  736
  737
  738
  739
  740
  741
  742
  743
  744
  745
  746
  747
  748
  749
  750
  751
  752
  753
  754
  755
  756
  757
  758
  759
  760
  761
  762
  763
  764
  765
  766
  767
  768
  769
  770
  771
  772
  773
  774
  775
  776
  777
  778
  779
  780
  781
  782
  783
  784
  785
  786
  787
  788
  789
  790
  791
  792
  793
  794
  795
  796
  797
  798
  799
  800
  801
  802
  803
  804
  805
  806
  807
  808
  809
  810
  811
  812
  813
  814
  815
  816
  817
  818
  819
  820
  821
  822
  823
  824
  825
  826
  827
  828
  829
  830
  831
  832
  833
  834
  835
  836
  837
  838
  839
  840
  841
  842
  843
  844
  845
  846
  847
  848
  849
  850
  851
  852
  853
  854
  855
  856
  857
  858
  859
  860
  861
  862
  863
  864
  865
  866
  867
  868
  869
  870
  871
  872
  873
  874
  875
  876
  877
  878
  879
  880
  881
  882
  883
  884
  885
  886
  887
  888
  889
  890
  891
  892
  893
  894
  895
  896
  897
  898
  899
  900
  901
  902
  903
  904
  905
  906
  907
  908
  909
  910
  911
  912
  913
  914
  915
  916
  917
  918
  919
  920
  921
  922
  923
  924
  925
  926
  927
  928
  929
  930
  931
  932
  933
  934
  935
  936
  937
  938
  939
  940
  941
  942
  943
  944
  945
  946
  947
  948
  949
  950
  951
  952
  953
  954
  955
  956
  957
  958
  959
  960
  961
  962
  963
  964
  965
  966
  967
  968
  969
  970
  971
  972
  973
  974
  975
  976
  977
  978
  979
  980
  981
  982
  983
  984
  985
  986
  987
  988
  989
  990
  991
  992
  993
  994
  995
  996
  997
  998
  999
 1000
 1001
 1002
 1003
 1004
 1005
 1006
 1007
 1008
 1009
 1010
 1011
 1012
 1013
 1014
 1015
 1016
 1017
 1018
 1019
 1020
 1021
 1022
 1023
 1024
 1025
 1026
 1027
 1028
 1029
 1030
 1031
 1032
 1033
 1034
 1035
 1036
 1037
 1038
 1039
 1040
 1041
 1042
 1043
 1044
 1045
 1046
 1047
 1048
 1049
 1050
 1051
 1052
 1053
 1054
 1055
 1056
 1057
 1058
 1059
 1060
 1061
 1062
 1063
 1064
 1065
 1066
 1067
 1068
 1069
 1070
 1071
 1072
 1073
 1074
 1075
 1076
 1077
 1078
 1079
 1080
 1081
 1082
 1083
 1084
 1085
 1086
 1087
 1088
 1089
 1090
 1091
 1092
 1093
 1094
 1095
 1096
 1097
 1098
 1099
 1100
 1101
 1102
 1103
 1104
 1105
 1106
 1107
 1108
 1109
 1110
 1111
 1112
 1113
 1114
 1115
 1116
 1117
 1118
 1119
 1120
 1121
 1122
 1123
 1124
 1125
 1126
 1127
 1128
 1129
 1130
 1131
 1132
 1133
 1134
 1135
 1136
 1137
 1138
 1139
 1140
 1141
 1142
 1143
 1144
 1145
 1146
 1147
 1148
 1149
 1150
 1151
 1152
 1153
 1154
 1155
 1156
 1157
 1158
 1159
 1160
 1161
 1162
 1163
 1164
 1165
 1166
 1167
 1168
 1169
 1170
 1171
 1172
 1173
 1174
 1175
 1176
 1177
 1178
 1179
 1180
 1181
 1182
 1183
 1184
 1185
 1186
 1187
 1188
 1189
 1190
 1191
 1192
 1193
 1194
 1195
 1196
 1197
 1198
 1199
 1200
 1201
 1202
 1203
 1204
 1205
 1206
 1207
 1208
 1209
 1210
 1211
 1212
 1213
 1214
 1215
 1216
 1217
 1218
 1219
 1220
 1221
 1222
 1223
 1224
 1225
 1226
 1227
 1228
 1229
 1230
 1231
 1232
 1233
 1234
 1235
 1236
 1237
 1238
 1239
 1240
 1241
 1242
 1243
 1244
 1245
 1246
 1247
 1248
 1249
 1250
 1251
 1252
 1253
 1254
 1255
 1256
 1257
 1258
 1259
 1260
 1261
 1262
 1263
 1264
 1265
 1266
 1267
 1268
 1269
 1270
 1271
 1272
 1273
 1274
 1275
 1276
 1277
 1278
 1279
 1280
 1281
 1282
 1283
 1284
 1285
 1286
 1287
 1288
 1289
 1290
 1291
 1292
 1293
 1294
 1295
 1296
 1297
 1298
 1299
 1300
 1301
 1302
 1303
 1304
 1305
 1306
 1307
 1308
 1309
 1310
 1311
 1312
 1313
 1314
 1315
 1316
 1317
 1318
 1319
 1320
 1321
 1322
 1323
 1324
 1325
 1326
 1327
 1328
 1329
 1330
 1331
 1332
 1333
 1334
 1335
 1336
 1337
 1338
 1339
 1340
 1341
 1342
 1343
 1344
 1345
 1346
 1347
 1348
 1349
 1350
 1351
 1352
 1353
 1354
 1355
 1356
 1357
 1358
 1359
 1360
 1361
 1362
 1363
 1364
 1365
 1366
 1367
 1368
 1369
 1370
 1371
 1372
 1373
 1374
 1375
 1376
 1377
 1378
 1379
 1380
 1381
 1382
 1383
 1384
 1385
 1386
 1387
 1388
 1389
 1390
 1391
 1392
 1393
 1394
 1395
 1396
 1397
 1398
 1399
 1400
 1401
 1402
 1403
 1404
 1405
 1406
 1407
 1408
 1409
 1410
 1411
 1412
 1413
 1414
 1415
 1416
 1417
 1418
 1419
 1420
 1421
 1422
 1423
 1424
 1425
 1426
 1427
 1428
 1429
 1430
 1431
 1432
 1433
 1434
 1435
 1436
 1437
 1438
 1439
 1440
 1441
 1442
 1443
 1444
 1445
 1446
 1447
 1448
 1449
 1450
 1451
 1452
 1453
 1454
 1455
 1456
 1457
 1458
 1459
 1460
 1461
 1462
 1463
 1464
 1465
 1466
 1467
 1468
 1469
 1470
 1471
 1472
 1473
 1474
 1475
 1476
 1477
 1478
 1479
 1480
 1481
 1482
 1483
 1484
 1485
 1486
 1487
 1488
 1489
 1490
 1491
 1492
 1493
 1494
 1495
 1496
 1497
 1498
 1499
 1500
 1501
 1502
 1503
 1504
 1505
 1506
 1507
 1508
 1509
 1510
 1511
 1512
 1513
 1514
 1515
 1516
 1517
 1518
 1519
 1520
 1521
 1522
 1523
 1524
 1525
 1526
 1527
 1528
 1529
 1530
 1531
 1532
 1533
 1534
 1535
 1536
 1537
 1538
 1539
 1540
 1541
 1542
 1543
 1544
 1545
 1546
 1547
 1548
 1549
 1550
 1551
 1552
 1553
 1554
 1555
 1556
 1557
 1558
 1559
 1560
 1561
 1562
 1563
 1564
 1565
 1566
 1567
 1568
 1569
 1570
 1571
 1572
 1573
 1574
 1575
 1576
 1577
 1578
 1579
 1580
 1581
 1582
 1583
 1584
 1585
 1586
 1587
 1588
 1589
 1590
 1591
 1592
 1593
 1594
 1595
 1596
 1597
 1598
 1599
 1600
 1601
 1602
 1603
 1604
 1605
 1606
 1607
 1608
 1609
 1610
 1611
 1612
 1613
 1614
 1615
 1616
 1617
 1618
 1619
 1620
 1621
 1622
 1623
 1624
 1625
 1626
 1627
 1628
 1629
 1630
 1631
 1632
 1633
 1634
 1635
 1636
 1637
 1638
 1639
 1640
 1641
 1642
 1643
 1644
 1645
 1646
 1647
 1648
 1649
 1650
 1651
 1652
 1653
 1654
 1655
 1656
 1657
 1658
 1659
 1660
 1661
 1662
 1663
 1664
 1665
 1666
 1667
 1668
 1669
 1670
 1671
 1672
 1673
 1674
 1675
 1676
 1677
 1678
 1679
 1680
 1681
 1682
 1683
 1684
 1685
 1686
 1687
 1688
 1689
 1690
 1691
 1692
 1693
 1694
 1695
 1696
 1697
 1698
 1699
 1700
 1701
 1702
 1703
 1704
 1705
 1706
 1707
 1708
 1709
 1710
 1711
 1712
 1713
 1714
 1715
 1716
 1717
 1718
 1719
 1720
 1721
 1722
 1723
 1724
 1725
 1726
 1727
 1728
 1729
 1730
 1731
 1732
 1733
 1734
 1735
 1736
 1737
 1738
 1739
 1740
 1741
 1742
 1743
 1744
 1745
 1746
 1747
 1748
 1749
 1750
 1751
 1752
 1753
 1754
 1755
 1756
 1757
 1758
 1759
 1760
 1761
 1762
 1763
 1764
 1765
 1766
 1767
 1768
 1769
 1770
 1771
 1772
 1773
 1774
 1775
 1776
 1777
 1778
 1779
 1780
 1781
 1782
 1783
 1784
 1785
 1786
 1787
 1788
 1789
 1790
 1791
 1792
 1793
 1794
 1795
 1796
 1797
 1798
 1799
 1800
 1801
 1802
 1803
 1804
 1805
 1806
 1807
 1808
 1809
 1810
 1811
 1812
 1813
 1814
 1815
 1816
 1817
 1818
 1819
 1820
 1821
 1822
 1823
 1824
 1825
 1826
 1827
 1828
 1829
 1830
 1831
 1832
 1833
 1834
 1835
 1836
 1837
 1838
 1839
 1840
 1841
 1842
 1843
 1844
 1845
 1846
 1847
 1848
 1849
 1850
 1851
 1852
 1853
 1854
 1855
 1856
 1857
 1858
 1859
 1860
 1861
 1862
 1863
 1864
 1865
 1866
 1867
 1868
 1869
 1870
 1871
 1872
 1873
 1874
 1875
 1876
 1877
 1878
 1879
 1880
 1881
 1882
 1883
 1884
 1885
 1886
 1887
 1888
 1889
 1890
 1891
 1892
 1893
 1894
 1895
 1896
 1897
 1898
 1899
 1900
 1901
 1902
 1903
 1904
 1905
 1906
 1907
 1908
 1909
 1910
 1911
 1912
 1913
 1914
 1915
 1916
 1917
 1918
 1919
 1920
 1921
 1922
 1923
 1924
 1925
 1926
 1927
 1928
 1929
 1930
 1931
 1932
 1933
 1934
 1935
 1936
 1937
 1938
 1939
 1940
 1941
 1942
 1943
 1944
 1945
 1946
 1947
 1948
 1949
 1950
 1951
 1952
 1953
 1954
 1955
 1956
 1957
 1958
 1959
 1960
 1961
 1962
 1963
 1964
 1965
 1966
 1967
 1968
 1969
 1970
 1971
 1972
 1973
 1974
 1975
 1976
 1977
 1978
 1979
 1980
 1981
 1982
 1983
 1984
 1985
 1986
 1987
 1988
 1989
 1990
 1991
 1992
 1993
 1994
 1995
 1996
 1997
 1998
 1999
 2000
 2001
 2002
 2003
 2004
 2005
 2006
 2007
 2008
 2009
 2010
 2011
 2012
 2013
 2014
 2015
 2016
 2017
 2018
 2019
 2020
 2021
 2022
 2023
 2024
 2025
 2026
 2027
 2028
 2029
 2030
 2031
 2032
 2033
 2034
 2035
 2036
 2037
 2038
 2039
 2040
 2041
 2042
 2043
 2044
 2045
 2046
 2047
 2048
 2049
 2050
 2051
 2052
 2053
 2054
 2055
 2056
 2057
 2058
 2059
 2060
 2061
 2062
 2063
 2064
 2065
 2066
 2067
 2068
 2069
 2070
 2071
 2072
 2073
 2074
 2075
 2076
 2077
 2078
 2079
 2080
 2081
 2082
 2083
 2084
 2085
 2086
 2087
 2088
 2089
 2090
 2091
 2092
 2093
 2094
 2095
 2096
 2097
 2098
 2099
 2100
 2101
 2102
 2103
 2104
 2105
 2106
 2107
 2108
 2109
 2110
 2111
 2112
 2113
 2114
 2115
 2116
 2117
 2118
 2119
 2120
 2121
 2122
 2123
 2124
 2125
 2126
 2127
 2128
 2129
 2130
 2131
 2132
 2133
 2134
 2135
 2136
 2137
 2138
 2139
 2140
 2141
 2142
 2143
 2144
 2145
 2146
 2147
 2148
 2149
 2150
 2151
 2152
 2153
 2154
 2155
 2156
 2157
 2158
 2159
 2160
 2161
 2162
 2163
 2164
 2165
 2166
 2167
 2168
 2169
 2170
 2171
 2172
 2173
 2174
 2175
 2176
 2177
 2178
 2179
 2180
 2181
 2182
 2183
 2184
 2185
 2186
 2187
 2188
 2189
 2190
 2191
 2192
 2193
 2194
 2195
 2196
 2197
 2198
 2199
 2200
 2201
 2202
 2203
 2204
 2205
 2206
 2207
 2208
 2209
 2210
 2211
 2212
 2213
 2214
 2215
 2216
 2217
 2218
 2219
 2220
 2221
 2222
 2223
 2224
 2225
 2226
 2227
 2228
 2229
 2230
 2231
 2232
 2233
 2234
 2235
 2236
 2237
 2238
 2239
 2240
 2241
 2242
 2243
 2244
 2245
 2246
 2247
 2248
 2249
 2250
 2251
 2252
 2253
 2254
 2255
 2256
 2257
 2258
 2259
 2260
 2261
 2262
 2263
 2264
 2265
 2266
 2267
 2268
 2269
 2270
 2271
 2272
 2273
 2274
 2275
 2276
 2277
 2278
 2279
 2280
 2281
 2282
 2283
 2284
 2285
 2286
 2287
 2288
 2289
 2290
 2291
 2292
 2293
 2294
 2295
 2296
 2297
 2298
 2299
 2300
 2301
 2302
 2303
 2304
 2305
 2306
 2307
 2308
 2309
 2310
 2311
 2312
 2313
 2314
 2315
 2316
 2317
 2318
 2319
 2320
 2321
 2322
 2323
 2324
 2325
 2326
 2327
 2328
 2329
 2330
 2331
 2332
 2333
 2334
 2335
 2336
 2337
 2338
 2339
 2340
 2341
 2342
 2343
 2344
 2345
 2346
 2347
 2348
 2349
 2350
 2351
 2352
 2353
 2354
 2355
 2356
 2357
 2358
 2359
 2360
 2361
 2362
 2363
 2364
 2365
 2366
 2367
 2368
 2369
 2370
 2371
 2372
 2373
 2374
 2375
 2376
 2377
 2378
 2379
 2380
 2381
 2382
 2383
 2384
 2385
 2386
 2387
 2388
 2389
 2390
 2391
 2392
 2393
 2394
 2395
 2396
 2397
 2398
 2399
 2400
 2401
 2402
 2403
 2404
 2405
 2406
 2407
 2408
 2409
 2410
 2411
 2412
 2413
 2414
 2415
 2416
 2417
 2418
 2419
 2420
 2421
 2422
 2423
 2424
 2425
 2426
 2427
 2428
 2429
 2430
 2431
 2432
 2433
 2434
 2435
 2436
 2437
 2438
 2439
 2440
 2441
 2442
 2443
 2444
 2445
 2446
 2447
 2448
 2449
 2450
 2451
 2452
 2453
 2454
 2455
 2456
 2457
 2458
 2459
 2460
 2461
 2462
 2463
 2464
 2465
 2466
 2467
 2468
 2469
 2470
 2471
 2472
 2473
 2474
 2475
 2476
 2477
 2478
 2479
 2480
 2481
 2482
 2483
 2484
 2485
 2486
 2487
 2488
 2489
 2490
 2491
 2492
 2493
 2494
 2495
 2496
 2497
 2498
 2499
 2500
 2501
 2502
 2503
 2504
 2505
 2506
 2507
 2508
 2509
 2510
 2511
 2512
 2513
 2514
 2515
 2516
 2517
 2518
 2519
 2520
 2521
 2522
 2523
 2524
 2525
 2526
 2527
 2528
 2529
 2530
 2531
 2532
 2533
 2534
 2535
 2536
 2537
 2538
 2539
 2540
 2541
 2542
 2543
 2544
 2545
 2546
 2547
 2548
 2549
 2550
 2551
 2552
 2553
 2554
 2555
 2556
 2557
 2558
 2559
 2560
 2561
 2562
 2563
 2564
 2565
 2566
 2567
 2568
 2569
 2570
 2571
 2572
 2573
 2574
 2575
 2576
 2577
 2578
 2579
 2580
 2581
 2582
 2583
 2584
 2585
 2586
 2587
 2588
 2589
 2590
 2591
 2592
 2593
 2594
 2595
 2596
 2597
 2598
 2599
 2600
 2601
 2602
 2603
 2604
 2605
 2606
 2607
 2608
 2609
 2610
 2611
 2612
 2613
 2614
 2615
 2616
 2617
 2618
 2619
 2620
 2621
 2622
 2623
 2624
 2625
 2626
 2627
 2628
 2629
 2630
 2631
 2632
 2633
 2634
 2635
 2636
 2637
 2638
 2639
 2640
 2641
 2642
 2643
 2644
 2645
 2646
 2647
 2648
 2649
 2650
 2651
 2652
 2653
 2654
 2655
 2656
 2657
 2658
 2659
 2660
 2661
 2662
 2663
 2664
 2665
 2666
 2667
 2668
 2669
 2670
 2671
 2672
 2673
 2674
 2675
 2676
 2677
 2678
 2679
 2680
 2681
 2682
 2683
 2684
 2685
 2686
 2687
 2688
 2689
 2690
 2691
 2692
 2693
 2694
 2695
 2696
 2697
 2698
 2699
 2700
 2701
 2702
 2703
 2704
 2705
 2706
 2707
 2708
 2709
 2710
 2711
 2712
 2713
 2714
 2715
 2716
 2717
 2718
 2719
 2720
 2721
 2722
 2723
 2724
 2725
 2726
 2727
 2728
 2729
 2730
 2731
 2732
 2733
 2734
 2735
 2736
 2737
 2738
 2739
 2740
 2741
 2742
 2743
 2744
 2745
 2746
 2747
 2748
 2749
 2750
 2751
 2752
 2753
 2754
 2755
 2756
 2757
 2758
 2759
 2760
 2761
 2762
 2763
 2764
 2765
 2766
 2767
 2768
 2769
 2770
 2771
 2772
 2773
 2774
 2775
 2776
 2777
 2778
 2779
 2780
 2781
 2782
 2783
 2784
 2785
 2786
 2787
 2788
 2789
 2790
 2791
 2792
 2793
 2794
 2795
 2796
 2797
 2798
 2799
 2800
 2801
 2802
 2803
 2804
 2805
 2806
 2807
 2808
 2809
 2810
 2811
 2812
 2813
 2814
 2815
 2816
 2817
 2818
 2819
 2820
 2821
 2822
 2823
 2824
 2825
 2826
 2827
 2828
 2829
 2830
 2831
 2832
 2833
 2834
 2835
 2836
 2837
 2838
 2839
 2840
 2841
 2842
 2843
 2844
 2845
 2846
 2847
 2848
 2849
 2850
 2851
 2852
 2853
 2854
 2855
 2856
 2857
 2858
 2859
 2860
 2861
 2862
 2863
 2864
 2865
 2866
 2867
 2868
 2869
 2870
 2871
 2872
 2873
 2874
 2875
 2876
 2877
 2878
 2879
 2880
 2881
 2882
 2883
 2884
 2885
 2886
 2887
 2888
 2889
 2890
 2891
 2892
 2893
 2894
 2895
 2896
 2897
 2898
 2899
 2900
 2901
 2902
 2903
 2904
 2905
 2906
 2907
 2908
 2909
 2910
 2911
 2912
 2913
 2914
 2915
 2916
 2917
 2918
 2919
 2920
 2921
 2922
 2923
 2924
 2925
 2926
 2927
 2928
 2929
 2930
 2931
 2932
 2933
 2934
 2935
 2936
 2937
 2938
 2939
 2940
 2941
 2942
 2943
 2944
 2945
 2946
 2947
 2948
 2949
 2950
 2951
 2952
 2953
 2954
 2955
 2956
 2957
 2958
 2959
 2960
 2961
 2962
 2963
 2964
 2965
 2966
 2967
 2968
 2969
 2970
 2971
 2972
 2973
 2974
 2975
 2976
 2977
 2978
 2979
 2980
 2981
 2982
 2983
 2984
 2985
 2986
 2987
 2988
 2989
 2990
 2991
 2992
 2993
 2994
 2995
 2996
 2997
 2998
 2999
 3000
 3001
 3002
 3003
 3004
 3005
 3006
 3007
 3008
 3009
 3010
 3011
 3012
 3013
 3014
 3015
 3016
 3017
 3018
 3019
 3020
 3021
 3022
 3023
 3024
 3025
 3026
 3027
 3028
 3029
 3030
 3031
 3032
 3033
 3034
 3035
 3036
 3037
 3038
 3039
 3040
 3041
 3042
 3043
 3044
 3045
 3046
 3047
 3048
 3049
 3050
 3051
 3052
 3053
 3054
 3055
 3056
 3057
 3058
 3059
 3060
 3061
 3062
 3063
 3064
 3065
 3066
 3067
 3068
 3069
 3070
 3071
 3072
 3073
 3074
 3075
 3076
 3077
 3078
 3079
 3080
 3081
 3082
 3083
 3084
 3085
 3086
 3087
 3088
 3089
 3090
 3091
 3092
 3093
 3094
 3095
 3096
 3097
 3098
 3099
 3100
 3101
 3102
 3103
 3104
 3105
 3106
 3107
 3108
 3109
 3110
 3111
 3112
 3113
 3114
 3115
 3116
 3117
 3118
 3119
 3120
 3121
 3122
 3123
 3124
 3125
 3126
 3127
 3128
 3129
 3130
 3131
 3132
 3133
 3134
 3135
 3136
 3137
 3138
 3139
 3140
 3141
 3142
 3143
 3144
 3145
 3146
 3147
 3148
 3149
 3150
 3151
 3152
 3153
 3154
 3155
 3156
 3157
 3158
 3159
 3160
 3161
 3162
 3163
 3164
 3165
 3166
 3167
 3168
 3169
 3170
 3171
 3172
 3173
 3174
 3175
 3176
 3177
 3178
 3179
 3180
 3181
 3182
 3183
 3184
 3185
 3186
 3187
 3188
 3189
 3190
 3191
 3192
 3193
 3194
 3195
 3196
 3197
 3198
 3199
 3200
 3201
 3202
 3203
 3204
 3205
 3206
 3207
 3208
 3209
 3210
 3211
 3212
 3213
 3214
 3215
 3216
 3217
 3218
 3219
 3220
 3221
 3222
 3223
 3224
 3225
 3226
 3227
 3228
 3229
 3230
 3231
 3232
 3233
 3234
 3235
 3236
 3237
 3238
 3239
 3240
 3241
 3242
 3243
 3244
 3245
 3246
 3247
 3248
 3249
 3250
 3251
 3252
 3253
 3254
 3255
 3256
 3257
 3258
 3259
 3260
 3261
 3262
 3263
 3264
 3265
 3266
 3267
 3268
 3269
 3270
 3271
 3272
 3273
 3274
 3275
 3276
 3277
 3278
 3279
 3280
 3281
 3282
 3283
 3284
 3285
 3286
 3287
 3288
 3289
 3290
 3291
 3292
 3293
 3294
 3295
 3296
 3297
 3298
 3299
 3300
 3301
 3302
 3303
 3304
 3305
 3306
 3307
 3308
 3309
 3310
 3311
 3312
 3313
 3314
 3315
 3316
 3317
 3318
 3319
 3320
 3321
 3322
 3323
 3324
 3325
 3326
 3327
 3328
 3329
 3330
 3331
 3332
 3333
 3334
 3335
 3336
 3337
 3338
 3339
 3340
 3341
 3342
 3343
 3344
 3345
 3346
 3347
 3348
 3349
 3350
 3351
 3352
 3353
 3354
 3355
 3356
 3357
 3358
 3359
 3360
 3361
 3362
 3363
 3364
 3365
 3366
 3367
 3368
 3369
 3370
 3371
 3372
 3373
 3374
 3375
 3376
 3377
 3378
 3379
 3380
 3381
 3382
 3383
 3384
 3385
 3386
 3387
 3388
 3389
 3390
 3391
 3392
 3393
 3394
 3395
 3396
 3397
 3398
 3399
 3400
 3401
 3402
 3403
 3404
 3405
 3406
 3407
 3408
 3409
 3410
 3411
 3412
 3413
 3414
 3415
 3416
 3417
 3418
 3419
 3420
 3421
 3422
 3423
 3424
 3425
 3426
 3427
 3428
 3429
 3430
 3431
 3432
 3433
 3434
 3435
 3436
 3437
 3438
 3439
 3440
 3441
 3442
 3443
 3444
 3445
 3446
 3447
 3448
 3449
 3450
 3451
 3452
 3453
 3454
 3455
 3456
 3457
 3458
 3459
 3460
 3461
 3462
 3463
 3464
 3465
 3466
 3467
 3468
 3469
 3470
 3471
 3472
 3473
 3474
 3475
 3476
 3477
 3478
 3479
 3480
 3481
 3482
 3483
 3484
 3485
 3486
 3487
 3488
 3489
 3490
 3491
 3492
 3493
 3494
 3495
 3496
 3497
 3498
 3499
 3500
 3501
 3502
 3503
 3504
 3505
 3506
 3507
 3508
 3509
 3510
 3511
 3512
 3513
 3514
 3515
 3516
 3517
 3518
 3519
 3520
 3521
 3522
 3523
 3524
 3525
 3526
 3527
 3528
 3529
 3530
 3531
 3532
 3533
 3534
 3535
 3536
 3537
 3538
 3539
 3540
 3541
 3542
 3543
 3544
 3545
 3546
 3547
 3548
 3549
 3550
 3551
 3552
 3553
 3554
 3555
 3556
 3557
 3558
 3559
 3560
 3561
 3562
 3563
 3564
 3565
 3566
 3567
 3568
 3569
 3570
 3571
 3572
 3573
 3574
 3575
 3576
 3577
 3578
 3579
 3580
 3581
 3582
 3583
 3584
 3585
 3586
 3587
 3588
 3589
 3590
 3591
 3592
 3593
 3594
 3595
 3596
 3597
 3598
 3599
 3600
 3601
 3602
 3603
 3604
 3605
 3606
 3607
 3608
 3609
 3610
 3611
 3612
 3613
 3614
 3615
 3616
 3617
 3618
 3619
 3620
 3621
 3622
 3623
 3624
 3625
 3626
 3627
 3628
 3629
 3630
 3631
 3632
 3633
 3634
 3635
 3636
 3637
 3638
 3639
 3640
 3641
 3642
 3643
 3644
 3645
 3646
 3647
 3648
 3649
 3650
 3651
 3652
 3653
 3654
 3655
 3656
 3657
 3658
 3659
 3660
 3661
 3662
 3663
 3664
 3665
 3666
 3667
 3668
 3669
 3670
 3671
 3672
 3673
 3674
 3675
 3676
 3677
 3678
 3679
 3680
 3681
 3682
 3683
 3684
 3685
 3686
 3687
 3688
 3689
 3690
 3691
 3692
 3693
 3694
 3695
 3696
 3697
 3698
 3699
 3700
 3701
 3702
 3703
 3704
 3705
 3706
 3707
 3708
 3709
 3710
 3711
 3712
 3713
 3714
 3715
 3716
 3717
 3718
 3719
 3720
 3721
 3722
 3723
 3724
 3725
 3726
 3727
 3728
 3729
 3730
 3731
 3732
 3733
 3734
 3735
 3736
 3737
 3738
 3739
 3740
 3741
 3742
 3743
 3744
 3745
 3746
 3747
 3748
 3749
 3750
 3751
 3752
 3753
 3754
 3755
 3756
 3757
 3758
 3759
 3760
 3761
 3762
 3763
 3764
 3765
 3766
 3767
 3768
 3769
 3770
 3771
 3772
 3773
 3774
 3775
 3776
 3777
 3778
 3779
 3780
 3781
 3782
 3783
 3784
 3785
 3786
 3787
 3788
 3789
 3790
 3791
 3792
 3793
 3794
 3795
 3796
 3797
 3798
 3799
 3800
 3801
 3802
 3803
 3804
 3805
 3806
 3807
 3808
 3809
 3810
 3811
 3812
 3813
 3814
 3815
 3816
 3817
 3818
 3819
 3820
 3821
 3822
 3823
 3824
 3825
 3826
 3827
 3828
 3829
 3830
 3831
 3832
 3833
 3834
 3835
 3836
 3837
 3838
 3839
 3840
 3841
 3842
 3843
 3844
 3845
 3846
 3847
 3848
 3849
 3850
 3851
 3852
 3853
 3854
 3855
 3856
 3857
 3858
 3859
 3860
 3861
 3862
 3863
 3864
 3865
 3866
 3867
 3868
 3869
 3870
 3871
 3872
 3873
 3874
 3875
 3876
 3877
 3878
 3879
 3880
 3881
 3882
 3883
 3884
 3885
 3886
 3887
 3888
 3889
 3890
 3891
 3892
 3893
 3894
 3895
 3896
 3897
 3898
 3899
 3900
 3901
 3902
 3903
 3904
 3905
 3906
 3907
 3908
 3909
 3910
 3911
 3912
 3913
 3914
 3915
 3916
 3917
 3918
 3919
 3920
 3921
 3922
 3923
 3924
 3925
 3926
 3927
 3928
 3929
 3930
 3931
 3932
 3933
 3934
 3935
 3936
 3937
 3938
 3939
 3940
 3941
 3942
 3943
 3944
 3945
 3946
 3947
 3948
 3949
 3950
 3951
 3952
 3953
 3954
 3955
 3956
 3957
 3958
 3959
 3960
 3961
 3962
 3963
 3964
 3965
 3966
 3967
 3968
 3969
 3970
 3971
 3972
 3973
 3974
 3975
 3976
 3977
 3978
 3979
 3980
 3981
 3982
 3983
 3984
 3985
 3986
 3987
 3988
 3989
 3990
 3991
 3992
 3993
 3994
 3995
 3996
 3997
 3998
 3999
 4000
 4001
 4002
 4003
 4004
 4005
 4006
 4007
 4008
 4009
 4010
 4011
 4012
 4013
 4014
 4015
 4016
 4017
 4018
 4019
 4020
 4021
 4022
 4023
 4024
 4025
 4026
 4027
 4028
 4029
 4030
 4031
 4032
 4033
 4034
 4035
 4036
 4037
 4038
 4039
 4040
 4041
 4042
 4043
 4044
 4045
 4046
 4047
 4048
 4049
 4050
 4051
 4052
 4053
 4054
 4055
 4056
 4057
 4058
 4059
 4060
 4061
 4062
 4063
 4064
 4065
 4066
 4067
 4068
 4069
 4070
 4071
 4072
 4073
 4074
 4075
 4076
 4077
 4078
 4079
 4080
 4081
 4082
 4083
 4084
 4085
 4086
 4087
 4088
 4089
 4090
 4091
 4092
 4093
 4094
 4095
 4096
 4097
 4098
 4099
 4100
 4101
 4102
 4103
 4104
 4105
 4106
 4107
 4108
 4109
 4110
 4111
 4112
 4113
 4114
 4115
 4116
 4117
 4118
 4119
 4120
 4121
 4122
 4123
 4124
 4125
 4126
 4127
 4128
 4129
 4130
 4131
 4132
 4133
 4134
 4135
 4136
 4137
 4138
 4139
 4140
 4141
 4142
 4143
 4144
 4145
 4146
 4147
 4148
 4149
 4150
 4151
 4152
 4153
 4154
 4155
 4156
 4157
 4158
 4159
 4160
 4161
 4162
 4163
 4164
 4165
 4166
 4167
 4168
 4169
 4170
 4171
 4172
 4173
 4174
 4175
 4176
 4177
 4178
 4179
 4180
 4181
 4182
 4183
 4184
 4185
 4186
 4187
 4188
 4189
 4190
 4191
 4192
 4193
 4194
 4195
 4196
 4197
 4198
 4199
 4200
 4201
 4202
 4203
 4204
 4205
 4206
 4207
 4208
 4209
 4210
 4211
 4212
 4213
 4214
 4215
 4216
 4217
 4218
 4219
 4220
 4221
 4222
 4223
 4224
 4225
 4226
 4227
 4228
 4229
 4230
 4231
 4232
 4233
 4234
 4235
 4236
 4237
 4238
 4239
 4240
 4241
 4242
 4243
 4244
 4245
 4246
 4247
 4248
 4249
 4250
 4251
 4252
 4253
 4254
 4255
 4256
 4257
 4258
 4259
 4260
 4261
 4262
 4263
 4264
 4265
 4266
 4267
 4268
 4269
 4270
 4271
 4272
 4273
 4274
 4275
 4276
 4277
 4278
 4279
 4280
 4281
 4282
 4283
 4284
 4285
 4286
 4287
 4288
 4289
 4290
 4291
 4292
 4293
 4294
 4295
 4296
 4297
 4298
 4299
 4300
 4301
 4302
 4303
 4304
 4305
 4306
 4307
 4308
 4309
 4310
 4311
 4312
 4313
 4314
 4315
 4316
 4317
 4318
 4319
 4320
 4321
 4322
 4323
 4324
 4325
 4326
 4327
 4328
 4329
 4330
 4331
 4332
 4333
 4334
 4335
 4336
 4337
 4338
 4339
 4340
 4341
 4342
 4343
 4344
 4345
 4346
 4347
 4348
 4349
 4350
 4351
 4352
 4353
 4354
 4355
 4356
 4357
 4358
 4359
 4360
 4361
 4362
 4363
 4364
 4365
 4366
 4367
 4368
 4369
 4370
 4371
 4372
 4373
 4374
 4375
 4376
 4377
 4378
 4379
 4380
 4381
 4382
 4383
 4384
 4385
 4386
 4387
 4388
 4389
 4390
 4391
 4392
 4393
 4394
 4395
 4396
 4397
 4398
 4399
 4400
 4401
 4402
 4403
 4404
 4405
 4406
 4407
 4408
 4409
 4410
 4411
 4412
 4413
 4414
 4415
 4416
 4417
 4418
 4419
 4420
 4421
 4422
 4423
 4424
 4425
 4426
 4427
 4428
 4429
 4430
 4431
 4432
 4433
 4434
 4435
 4436
 4437
 4438
 4439
 4440
 4441
 4442
 4443
 4444
 4445
 4446
 4447
 4448
 4449
 4450
 4451
 4452
 4453
 4454
 4455
 4456
 4457
 4458
 4459
 4460
 4461
 4462
 4463
 4464
 4465
 4466
 4467
 4468
 4469
 4470
 4471
 4472
 4473
 4474
 4475
 4476
 4477
 4478
 4479
 4480
 4481
 4482
 4483
 4484
 4485
 4486
 4487
 4488
 4489
 4490
 4491
 4492
 4493
 4494
 4495
 4496
 4497
 4498
 4499
 4500
 4501
 4502
 4503
 4504
 4505
 4506
 4507
 4508
 4509
 4510
 4511
 4512
 4513
 4514
 4515
 4516
 4517
 4518
 4519
 4520
 4521
 4522
 4523
 4524
 4525
 4526
 4527
 4528
 4529
 4530
 4531
 4532
 4533
 4534
 4535
 4536
 4537
 4538
 4539
 4540
 4541
 4542
 4543
 4544
 4545
 4546
 4547
 4548
 4549
 4550
 4551
 4552
 4553
 4554
 4555
 4556
 4557
 4558
 4559
 4560
 4561
 4562
 4563
 4564
 4565
 4566
 4567
 4568
 4569
 4570
 4571
 4572
 4573
 4574
 4575
 4576
 4577
 4578
 4579
 4580
 4581
 4582
 4583
 4584
 4585
 4586
 4587
 4588
 4589
 4590
 4591
 4592
 4593
 4594
 4595
 4596
 4597
 4598
 4599
 4600
 4601
 4602
 4603
 4604
 4605
 4606
 4607
 4608
 4609
 4610
 4611
 4612
 4613
 4614
 4615
 4616
 4617
 4618
 4619
 4620
 4621
 4622
 4623
 4624
 4625
 4626
 4627
 4628
 4629
 4630
 4631
 4632
 4633
 4634
 4635
 4636
 4637
 4638
 4639
 4640
 4641
 4642
 4643
 4644
 4645
 4646
 4647
 4648
 4649
 4650
 4651
 4652
 4653
 4654
 4655
 4656
 4657
 4658
 4659
 4660
 4661
 4662
 4663
 4664
 4665
 4666
 4667
 4668
 4669
 4670
 4671
 4672
 4673
 4674
 4675
 4676
 4677
 4678
 4679
 4680
 4681
 4682
 4683
 4684
 4685
 4686
 4687
 4688
 4689
 4690
 4691
 4692
 4693
 4694
 4695
 4696
 4697
 4698
 4699
 4700
 4701
 4702
 4703
 4704
 4705
 4706
 4707
 4708
 4709
 4710
 4711
 4712
 4713
 4714
 4715
 4716
 4717
 4718
 4719
 4720
 4721
 4722
 4723
 4724
 4725
 4726
 4727
 4728
 4729
 4730
 4731
 4732
 4733
 4734
 4735
 4736
 4737
 4738
 4739
 4740
 4741
 4742
 4743
 4744
 4745
 4746
 4747
 4748
 4749
 4750
 4751
 4752
 4753
 4754
 4755
 4756
 4757
 4758
 4759
 4760
 4761
 4762
 4763
 4764
 4765
 4766
 4767
 4768
 4769
 4770
 4771
 4772
 4773
 4774
 4775
 4776
 4777
 4778
 4779
 4780
 4781
 4782
 4783
 4784
 4785
 4786
 4787
 4788
 4789
 4790
 4791
 4792
 4793
 4794
 4795
 4796
 4797
 4798
 4799
 4800
 4801
 4802
 4803
 4804
 4805
 4806
 4807
 4808
 4809
 4810
 4811
 4812
 4813
 4814
 4815
 4816
 4817
 4818
 4819
 4820
 4821
 4822
 4823
 4824
 4825
 4826
 4827
 4828
 4829
 4830
 4831
 4832
 4833
 4834
 4835
 4836
 4837
 4838
 4839
 4840
 4841
 4842
 4843
 4844
 4845
 4846
 4847
 4848
 4849
 4850
 4851
 4852
 4853
 4854
 4855
 4856
 4857
 4858
 4859
 4860
 4861
 4862
 4863
 4864
 4865
 4866
 4867
 4868
 4869
 4870
 4871
 4872
 4873
 4874
 4875
 4876
 4877
 4878
 4879
 4880
 4881
 4882
 4883
 4884
 4885
 4886
 4887
 4888
 4889
 4890
 4891
 4892
 4893
 4894
 4895
 4896
 4897
 4898
 4899
 4900
 4901
 4902
 4903
 4904
 4905
 4906
 4907
 4908
 4909
 4910
 4911
 4912
 4913
 4914
 4915
 4916
 4917
 4918
 4919
 4920
 4921
 4922
 4923
 4924
 4925
 4926
 4927
 4928
 4929
 4930
 4931
 4932
 4933
 4934
 4935
 4936
 4937
 4938
 4939
 4940
 4941
 4942
 4943
 4944
 4945
 4946
 4947
 4948
 4949
 4950
 4951
 4952
 4953
 4954
 4955
 4956
 4957
 4958
 4959
 4960
 4961
 4962
 4963
 4964
 4965
 4966
 4967
 4968
 4969
 4970
 4971
 4972
 4973
 4974
 4975
 4976
 4977
 4978
 4979
 4980
 4981
 4982
 4983
 4984
 4985
 4986
 4987
 4988
 4989
 4990
 4991
 4992
 4993
 4994
 4995
 4996
 4997
 4998
 4999
 5000
 5001
 5002
 5003
 5004
 5005
 5006
 5007
 5008
 5009
 5010
 5011
 5012
 5013
 5014
 5015
 5016
 5017
 5018
 5019
 5020
 5021
 5022
 5023
 5024
 5025
 5026
 5027
 5028
 5029
 5030
 5031
 5032
 5033
 5034
 5035
 5036
 5037
 5038
 5039
 5040
 5041
 5042
 5043
 5044
 5045
 5046
 5047
 5048
 5049
 5050
 5051
 5052
 5053
 5054
 5055
 5056
 5057
 5058
 5059
 5060
 5061
 5062
 5063
 5064
 5065
 5066
 5067
 5068
 5069
 5070
 5071
 5072
 5073
 5074
 5075
 5076
 5077
 5078
 5079
 5080
 5081
 5082
 5083
 5084
 5085
 5086
 5087
 5088
 5089
 5090
 5091
 5092
 5093
 5094
 5095
 5096
 5097
 5098
 5099
 5100
 5101
 5102
 5103
 5104
 5105
 5106
 5107
 5108
 5109
 5110
 5111
 5112
 5113
 5114
 5115
 5116
 5117
 5118
 5119
 5120
 5121
 5122
 5123
 5124
 5125
 5126
 5127
 5128
 5129
 5130
 5131
 5132
 5133
 5134
 5135
 5136
 5137
 5138
 5139
 5140
 5141
 5142
 5143
 5144
 5145
 5146
 5147
 5148
 5149
 5150
 5151
 5152
 5153
 5154
 5155
 5156
 5157
 5158
 5159
 5160
 5161
 5162
 5163
 5164
 5165
 5166
 5167
 5168
 5169
 5170
 5171
 5172
 5173
 5174
 5175
 5176
 5177
 5178
 5179
 5180
 5181
 5182
 5183
 5184
 5185
 5186
 5187
 5188
 5189
 5190
 5191
 5192
 5193
 5194
 5195
 5196
 5197
 5198
 5199
 5200
 5201
 5202
 5203
 5204
 5205
 5206
 5207
 5208
 5209
 5210
 5211
 5212
 5213
 5214
 5215
 5216
 5217
 5218
 5219
 5220
 5221
 5222
 5223
 5224
 5225
 5226
 5227
 5228
 5229
 5230
 5231
 5232
 5233
 5234
 5235
 5236
 5237
 5238
 5239
 5240
 5241
 5242
 5243
 5244
 5245
 5246
 5247
 5248
 5249
 5250
 5251
 5252
 5253
 5254
 5255
 5256
 5257
 5258
 5259
 5260
 5261
 5262
 5263
 5264
 5265
 5266
 5267
 5268
 5269
 5270
 5271
 5272
 5273
 5274
 5275
 5276
 5277
 5278
 5279
 5280
 5281
 5282
 5283
 5284
 5285
 5286
 5287
 5288
 5289
 5290
 5291
 5292
 5293
 5294
 5295
 5296
 5297
 5298
 5299
 5300
 5301
 5302
 5303
 5304
 5305
 5306
 5307
 5308
 5309
 5310
 5311
 5312
 5313
 5314
 5315
 5316
 5317
 5318
 5319
 5320
 5321
 5322
 5323
 5324
 5325
 5326
 5327
 5328
 5329
 5330
 5331
 5332
 5333
 5334
 5335
 5336
 5337
 5338
 5339
 5340
 5341
 5342
 5343
 5344
 5345
 5346
 5347
 5348
 5349
 5350
 5351
 5352
 5353
 5354
 5355
 5356
 5357
 5358
 5359
 5360
 5361
 5362
 5363
 5364
 5365
 5366
 5367
 5368
 5369
 5370
 5371
 5372
 5373
 5374
 5375
 5376
 5377
 5378
 5379
 5380
 5381
 5382
 5383
 5384
 5385
 5386
 5387
 5388
 5389
 5390
 5391
 5392
 5393
 5394
 5395
 5396
 5397
 5398
 5399
 5400
 5401
 5402
 5403
 5404
 5405
 5406
 5407
 5408
 5409
 5410
 5411
 5412
 5413
 5414
 5415
 5416
 5417
 5418
 5419
 5420
 5421
 5422
 5423
 5424
 5425
 5426
 5427
 5428
 5429
 5430
 5431
 5432
 5433
 5434
 5435
 5436
 5437
 5438
 5439
 5440
 5441
 5442
 5443
 5444
 5445
 5446
 5447
 5448
 5449
 5450
 5451
 5452
 5453
 5454
 5455
 5456
 5457
 5458
 5459
 5460
 5461
 5462
 5463
 5464
 5465
 5466
 5467
 5468
 5469
 5470
 5471
 5472
 5473
 5474
 5475
 5476
 5477
 5478
 5479
 5480
 5481
 5482
 5483
 5484
 5485
 5486
 5487
 5488
 5489
 5490
 5491
 5492
 5493
 5494
 5495
 5496
 5497
 5498
 5499
 5500
 5501
 5502
 5503
 5504
 5505
 5506
 5507
 5508
 5509
 5510
 5511
 5512
 5513
 5514
 5515
 5516
 5517
 5518
 5519
 5520
 5521
 5522
 5523
 5524
 5525
 5526
 5527
 5528
 5529
 5530
 5531
 5532
 5533
 5534
 5535
 5536
 5537
 5538
 5539
 5540
 5541
 5542
 5543
 5544
 5545
 5546
 5547
 5548
 5549
 5550
 5551
 5552
 5553
 5554
 5555
 5556
 5557
 5558
 5559
 5560
 5561
 5562
 5563
 5564
 5565
 5566
 5567
 5568
 5569
 5570
 5571
 5572
 5573
 5574
 5575
 5576
 5577
 5578
 5579
 5580
 5581
 5582
 5583
 5584
 5585
 5586
 5587
 5588
 5589
 5590
 5591
 5592
 5593
 5594
 5595
 5596
 5597
 5598
 5599
 5600
 5601
 5602
 5603
 5604
 5605
 5606
 5607
 5608
 5609
 5610
 5611
 5612
 5613
 5614
 5615
 5616
 5617
 5618
 5619
 5620
 5621
 5622
 5623
 5624
 5625
 5626
 5627
 5628
 5629
 5630
 5631
 5632
 5633
 5634
 5635
 5636
 5637
 5638
 5639
 5640
 5641
 5642
 5643
 5644
 5645
 5646
 5647
 5648
 5649
 5650
 5651
 5652
 5653
 5654
 5655
 5656
 5657
 5658
 5659
 5660
 5661
 5662
 5663
 5664
 5665
 5666
 5667
 5668
 5669
 5670
 5671
 5672
 5673
 5674
 5675
 5676
 5677
 5678
 5679
 5680
 5681
 5682
 5683
 5684
 5685
 5686
 5687
 5688
 5689
 5690
 5691
 5692
 5693
 5694
 5695
 5696
 5697
 5698
 5699
 5700
 5701
 5702
 5703
 5704
 5705
 5706
 5707
 5708
 5709
 5710
 5711
 5712
 5713
 5714
 5715
 5716
 5717
 5718
 5719
 5720
 5721
 5722
 5723
 5724
 5725
 5726
 5727
 5728
 5729
 5730
 5731
 5732
 5733
 5734
 5735
 5736
 5737
 5738
 5739
 5740
 5741
 5742
 5743
 5744
 5745
 5746
 5747
 5748
 5749
 5750
 5751
 5752
 5753
 5754
 5755
 5756
 5757
 5758
 5759
 5760
 5761
 5762
 5763
 5764
 5765
 5766
 5767
 5768
 5769
 5770
 5771
 5772
 5773
 5774
 5775
 5776
 5777
 5778
 5779
 5780
 5781
 5782
 5783
 5784
 5785
 5786
 5787
 5788
 5789
 5790
 5791
 5792
 5793
 5794
 5795
 5796
 5797
 5798
 5799
 5800
 5801
 5802
 5803
 5804
 5805
 5806
 5807
 5808
 5809
 5810
 5811
 5812
 5813
 5814
 5815
 5816
 5817
 5818
 5819
 5820
 5821
 5822
 5823
 5824
 5825
 5826
 5827
 5828
 5829
 5830
 5831
 5832
 5833
 5834
 5835
 5836
 5837
 5838
 5839
 5840
 5841
 5842
 5843
 5844
 5845
 5846
 5847
 5848
 5849
 5850
 5851
 5852
 5853
 5854
 5855
 5856
 5857
 5858
 5859
 5860
 5861
 5862
 5863
 5864
 5865
 5866
 5867
 5868
 5869
 5870
 5871
 5872
 5873
 5874
 5875
 5876
 5877
 5878
 5879
 5880
 5881
 5882
 5883
 5884
 5885
 5886
 5887
 5888
 5889
 5890
 5891
 5892
 5893
 5894
 5895
 5896
 5897
 5898
 5899
 5900
 5901
 5902
 5903
 5904
 5905
 5906
 5907
 5908
 5909
 5910
 5911
 5912
 5913
 5914
 5915
 5916
 5917
 5918
 5919
 5920
 5921
 5922
 5923
 5924
 5925
 5926
 5927
 5928
 5929
 5930
 5931
 5932
 5933
 5934
 5935
 5936
 5937
 5938
 5939
 5940
 5941
 5942
 5943
 5944
 5945
 5946
 5947
 5948
 5949
 5950
 5951
 5952
 5953
 5954
 5955
 5956
 5957
 5958
 5959
 5960
 5961
 5962
 5963
 5964
 5965
 5966
 5967
 5968
 5969
 5970
 5971
 5972
 5973
 5974
 5975
 5976
 5977
 5978
 5979
 5980
 5981
 5982
 5983
 5984
 5985
 5986
 5987
 5988
 5989
 5990
 5991
 5992
 5993
 5994
 5995
 5996
 5997
 5998
 5999
 6000
 6001
 6002
 6003
 6004
 6005
 6006
 6007
 6008
 6009
 6010
 6011
 6012
 6013
 6014
 6015
 6016
 6017
 6018
 6019
 6020
 6021
 6022
 6023
 6024
 6025
 6026
 6027
 6028
 6029
 6030
 6031
 6032
 6033
 6034
 6035
 6036
 6037
 6038
 6039
 6040
 6041
 6042
 6043
 6044
 6045
 6046
 6047
 6048
 6049
 6050
 6051
 6052
 6053
 6054
 6055
 6056
 6057
 6058
 6059
 6060
 6061
 6062
 6063
 6064
 6065
 6066
 6067
 6068
 6069
 6070
 6071
 6072
 6073
 6074
 6075
 6076
 6077
 6078
 6079
 6080
 6081
 6082
 6083
 6084
 6085
 6086
 6087
 6088
 6089
 6090
 6091
 6092
 6093
 6094
 6095
 6096
 6097
 6098
 6099
 6100
 6101
 6102
 6103
 6104
 6105
 6106
 6107
 6108
 6109
 6110
 6111
 6112
 6113
 6114
 6115
 6116
 6117
 6118
 6119
 6120
 6121
 6122
 6123
 6124
 6125
 6126
 6127
 6128
 6129
 6130
 6131
 6132
 6133
 6134
 6135
 6136
 6137
 6138
 6139
 6140
 6141
 6142
 6143
 6144
 6145
 6146
 6147
 6148
 6149
 6150
 6151
 6152
 6153
 6154
 6155
 6156
 6157
 6158
 6159
 6160
 6161
 6162
 6163
 6164
 6165
 6166
 6167
 6168
 6169
 6170
 6171
 6172
 6173
 6174
 6175
 6176
 6177
 6178
 6179
 6180
 6181
 6182
 6183
 6184
 6185
 6186
 6187
 6188
 6189
 6190
 6191
 6192
 6193
 6194
 6195
 6196
 6197
 6198
 6199
 6200
 6201
 6202
 6203
 6204
 6205
 6206
 6207
 6208
 6209
 6210
 6211
 6212
 6213
 6214
 6215
 6216
 6217
 6218
 6219
 6220
 6221
 6222
 6223
 6224
 6225
 6226
 6227
 6228
 6229
 6230
 6231
 6232
 6233
 6234
 6235
 6236
 6237
 6238
 6239
 6240
 6241
 6242
 6243
 6244
 6245
 6246
 6247
 6248
 6249
 6250
 6251
 6252
 6253
 6254
 6255
 6256
 6257
 6258
 6259
 6260
 6261
 6262
 6263
 6264
 6265
 6266
 6267
 6268
 6269
 6270
 6271
 6272
 6273
 6274
 6275
 6276
 6277
 6278
 6279
 6280
 6281
 6282
 6283
 6284
 6285
 6286
 6287
 6288
 6289
 6290
 6291
 6292
 6293
 6294
 6295
 6296
 6297
 6298
 6299
 6300
 6301
 6302
 6303
 6304
 6305
 6306
 6307
 6308
 6309
 6310
 6311
 6312
 6313
 6314
 6315
 6316
 6317
 6318
 6319
 6320
 6321
 6322
 6323
 6324
 6325
 6326
 6327
 6328
 6329
 6330
 6331
 6332
 6333
 6334
 6335
 6336
 6337
 6338
 6339
 6340
 6341
 6342
 6343
 6344
 6345
 6346
 6347
 6348
 6349
 6350
 6351
 6352
 6353
 6354
 6355
 6356
 6357
 6358
 6359
 6360
 6361
 6362
 6363
 6364
 6365
 6366
 6367
 6368
 6369
 6370
 6371
 6372
 6373
 6374
 6375
 6376
 6377
 6378
 6379
 6380
 6381
 6382
 6383
 6384
 6385
 6386
 6387
 6388
 6389
 6390
 6391
 6392
 6393
 6394
 6395
 6396
 6397
 6398
 6399
 6400
 6401
 6402
 6403
 6404
 6405
 6406
 6407
 6408
 6409
 6410
 6411
 6412
 6413
 6414
 6415
 6416
 6417
 6418
 6419
 6420
 6421
 6422
 6423
 6424
 6425
 6426
 6427
 6428
 6429
 6430
 6431
 6432
 6433
 6434
 6435
 6436
 6437
 6438
 6439
 6440
 6441
 6442
 6443
 6444
 6445
 6446
 6447
 6448
 6449
 6450
 6451
 6452
 6453
 6454
 6455
 6456
 6457
 6458
 6459
 6460
 6461
 6462
 6463
 6464
 6465
 6466
 6467
 6468
 6469
 6470
 6471
 6472
 6473
 6474
 6475
 6476
 6477
 6478
 6479
 6480
 6481
 6482
 6483
 6484
 6485
 6486
 6487
 6488
 6489
 6490
 6491
 6492
 6493
 6494
 6495
 6496
 6497
 6498
 6499
 6500
 6501
 6502
 6503
 6504
 6505
 6506
 6507
 6508
 6509
 6510
 6511
 6512
 6513
 6514
 6515
 6516
 6517
 6518
 6519
 6520
 6521
 6522
 6523
 6524
 6525
 6526
 6527
 6528
 6529
 6530
 6531
 6532
 6533
 6534
 6535
 6536
 6537
 6538
 6539
 6540
 6541
 6542
 6543
 6544
 6545
 6546
 6547
 6548
 6549
 6550
 6551
 6552
 6553
 6554
 6555
 6556
 6557
 6558
 6559
 6560
 6561
 6562
 6563
 6564
 6565
 6566
 6567
 6568
 6569
 6570
 6571
 6572
 6573
 6574
 6575
 6576
 6577
 6578
 6579
 6580
 6581
 6582
 6583
 6584
 6585
 6586
 6587
 6588
 6589
 6590
 6591
 6592
 6593
 6594
 6595
 6596
 6597
 6598
 6599
 6600
 6601
 6602
 6603
 6604
 6605
 6606
 6607
 6608
 6609
 6610
 6611
 6612
 6613
 6614
 6615
 6616
 6617
 6618
 6619
 6620
 6621
 6622
 6623
 6624
 6625
 6626
 6627
 6628
 6629
 6630
 6631
 6632
 6633
 6634
 6635
 6636
 6637
 6638
 6639
 6640
 6641
 6642
 6643
 6644
 6645
 6646
 6647
 6648
 6649
 6650
 6651
 6652
 6653
 6654
 6655
 6656
 6657
 6658
 6659
 6660
 6661
 6662
 6663
 6664
 6665
 6666
 6667
 6668
 6669
 6670
 6671
 6672
 6673
 6674
 6675
 6676
 6677
 6678
 6679
 6680
 6681
 6682
 6683
 6684
 6685
 6686
 6687
 6688
 6689
 6690
 6691
 6692
 6693
 6694
 6695
 6696
 6697
 6698
 6699
 6700
 6701
 6702
 6703
 6704
 6705
 6706
 6707
 6708
 6709
 6710
 6711
 6712
 6713
 6714
 6715
 6716
 6717
 6718
 6719
 6720
 6721
 6722
 6723
 6724
 6725
 6726
 6727
 6728
 6729
 6730
 6731
 6732
 6733
 6734
 6735
 6736
 6737
 6738
 6739
 6740
 6741
 6742
 6743
 6744
 6745
 6746
 6747
 6748
 6749
 6750
 6751
 6752
 6753
 6754
 6755
 6756
 6757
 6758
 6759
 6760
 6761
 6762
 6763
 6764
 6765
 6766
 6767
 6768
 6769
 6770
 6771
 6772
 6773
 6774
 6775
 6776
 6777
 6778
 6779
 6780
 6781
 6782
 6783
 6784
 6785
 6786
 6787
 6788
 6789
 6790
 6791
 6792
 6793
 6794
 6795
 6796
 6797
 6798
 6799
 6800
 6801
 6802
 6803
 6804
 6805
 6806
 6807
 6808
 6809
 6810
 6811
 6812
 6813
 6814
 6815
 6816
 6817
 6818
 6819
 6820
 6821
 6822
 6823
 6824
 6825
 6826
 6827
 6828
 6829
 6830
 6831
 6832
 6833
 6834
 6835
 6836
 6837
 6838
 6839
 6840
 6841
 6842
 6843
 6844
 6845
 6846
 6847
 6848
 6849
 6850
 6851
 6852
 6853
 6854
 6855
 6856
 6857
 6858
 6859
 6860
 6861
 6862
 6863
 6864
 6865
 6866
 6867
 6868
 6869
 6870
 6871
 6872
 6873
 6874
 6875
 6876
 6877
 6878
 6879
 6880
 6881
 6882
 6883
 6884
 6885
 6886
 6887
 6888
 6889
 6890
 6891
 6892
 6893
 6894
 6895
 6896
 6897
 6898
 6899
 6900
 6901
 6902
 6903
 6904
 6905
 6906
 6907
 6908
 6909
 6910
 6911
 6912
 6913
 6914
 6915
 6916
 6917
 6918
 6919
 6920
 6921
 6922
 6923
 6924
 6925
 6926
 6927
 6928
 6929
 6930
 6931
 6932
 6933
 6934
 6935
 6936
 6937
 6938
 6939
 6940
 6941
 6942
 6943
 6944
 6945
 6946
 6947
 6948
 6949
 6950
 6951
 6952
 6953
 6954
 6955
 6956
 6957
 6958
 6959
 6960
 6961
 6962
 6963
 6964
 6965
 6966
 6967
 6968
 6969
 6970
 6971
 6972
 6973
 6974
 6975
 6976
 6977
 6978
 6979
 6980
 6981
 6982
 6983
 6984
 6985
 6986
 6987
 6988
 6989
 6990
 6991
 6992
 6993
 6994
 6995
 6996
 6997
 6998
 6999
 7000
 7001
 7002
 7003
 7004
 7005
 7006
 7007
 7008
 7009
 7010
 7011
 7012
 7013
 7014
 7015
 7016
 7017
 7018
 7019
 7020
 7021
 7022
 7023
 7024
 7025
 7026
 7027
 7028
 7029
 7030
 7031
 7032
 7033
 7034
 7035
 7036
 7037
 7038
 7039
 7040
 7041
 7042
 7043
 7044
 7045
 7046
 7047
 7048
 7049
 7050
 7051
 7052
 7053
 7054
 7055
 7056
 7057
 7058
 7059
 7060
 7061
 7062
 7063
 7064
 7065
 7066
 7067
 7068
 7069
 7070
 7071
 7072
 7073
 7074
 7075
 7076
 7077
 7078
 7079
 7080
 7081
 7082
 7083
 7084
 7085
 7086
 7087
 7088
 7089
 7090
 7091
 7092
 7093
 7094
 7095
 7096
 7097
 7098
 7099
 7100
 7101
 7102
 7103
 7104
 7105
 7106
 7107
 7108
 7109
 7110
 7111
 7112
 7113
 7114
 7115
 7116
 7117
 7118
 7119
 7120
 7121
 7122
 7123
 7124
 7125
 7126
 7127
 7128
 7129
 7130
 7131
 7132
 7133
 7134
 7135
 7136
 7137
 7138
 7139
 7140
 7141
 7142
 7143
 7144
 7145
 7146
 7147
 7148
 7149
 7150
 7151
 7152
 7153
 7154
 7155
 7156
 7157
 7158
 7159
 7160
 7161
 7162
 7163
 7164
 7165
 7166
 7167
 7168
 7169
 7170
 7171
 7172
 7173
 7174
 7175
 7176
 7177
 7178
 7179
 7180
 7181
 7182
 7183
 7184
 7185
 7186
 7187
 7188
 7189
 7190
 7191
 7192
 7193
 7194
 7195
 7196
 7197
 7198
 7199
 7200
 7201
 7202
 7203
 7204
 7205
 7206
 7207
 7208
 7209
 7210
 7211
 7212
 7213
 7214
 7215
 7216
 7217
 7218
 7219
 7220
 7221
 7222
 7223
 7224
 7225
 7226
 7227
 7228
 7229
 7230
 7231
 7232
 7233
 7234
 7235
 7236
 7237
 7238
 7239
 7240
 7241
 7242
 7243
 7244
 7245
 7246
 7247
 7248
 7249
 7250
 7251
 7252
 7253
 7254
 7255
 7256
 7257
 7258
 7259
 7260
 7261
 7262
 7263
 7264
 7265
 7266
 7267
 7268
 7269
 7270
 7271
 7272
 7273
 7274
 7275
 7276
 7277
 7278
 7279
 7280
 7281
 7282
 7283
 7284
 7285
 7286
 7287
 7288
 7289
 7290
 7291
 7292
 7293
 7294
 7295
 7296
 7297
 7298
 7299
 7300
 7301
 7302
 7303
 7304
 7305
 7306
 7307
 7308
 7309
 7310
 7311
 7312
 7313
 7314
 7315
 7316
 7317
 7318
 7319
 7320
 7321
 7322
 7323
 7324
 7325
 7326
 7327
 7328
 7329
 7330
 7331
 7332
 7333
 7334
 7335
 7336
 7337
 7338
 7339
 7340
 7341
 7342
 7343
 7344
 7345
 7346
 7347
 7348
 7349
 7350
 7351
 7352
 7353
 7354
 7355
 7356
 7357
 7358
 7359
 7360
 7361
 7362
 7363
 7364
 7365
 7366
 7367
 7368
 7369
 7370
 7371
 7372
 7373
 7374
 7375
 7376
 7377
 7378
 7379
 7380
 7381
 7382
 7383
 7384
 7385
 7386
 7387
 7388
 7389
 7390
 7391
 7392
 7393
 7394
 7395
 7396
 7397
 7398
 7399
 7400
 7401
 7402
 7403
 7404
 7405
 7406
 7407
 7408
 7409
 7410
 7411
 7412
 7413
 7414
 7415
 7416
 7417
 7418
 7419
 7420
 7421
 7422
 7423
 7424
 7425
 7426
 7427
 7428
 7429
 7430
 7431
 7432
 7433
 7434
 7435
 7436
 7437
 7438
 7439
 7440
 7441
 7442
 7443
 7444
 7445
 7446
 7447
 7448
 7449
 7450
 7451
 7452
 7453
 7454
 7455
 7456
 7457
 7458
 7459
 7460
 7461
 7462
 7463
 7464
 7465
 7466
 7467
 7468
 7469
 7470
 7471
 7472
 7473
 7474
 7475
 7476
 7477
 7478
 7479
 7480
 7481
 7482
 7483
 7484
 7485
 7486
 7487
 7488
 7489
 7490
 7491
 7492
 7493
 7494
 7495
 7496
 7497
 7498
 7499
 7500
 7501
 7502
 7503
 7504
 7505
 7506
 7507
 7508
 7509
 7510
 7511
 7512
 7513
 7514
 7515
 7516
 7517
 7518
 7519
 7520
 7521
 7522
 7523
 7524
 7525
 7526
 7527
 7528
 7529
 7530
 7531
 7532
 7533
 7534
 7535
 7536
 7537
 7538
 7539
 7540
 7541
 7542
 7543
 7544
 7545
 7546
 7547
 7548
 7549
 7550
 7551
 7552
 7553
 7554
 7555
 7556
 7557
 7558
 7559
 7560
 7561
 7562
 7563
 7564
 7565
 7566
 7567
 7568
 7569
 7570
 7571
 7572
 7573
 7574
 7575
 7576
 7577
 7578
 7579
 7580
 7581
 7582
 7583
 7584
 7585
 7586
 7587
 7588
 7589
 7590
 7591
 7592
 7593
 7594
 7595
 7596
 7597
 7598
 7599
 7600
 7601
 7602
 7603
 7604
 7605
 7606
 7607
 7608
 7609
 7610
 7611
 7612
 7613
 7614
 7615
 7616
 7617
 7618
 7619
 7620
 7621
 7622
 7623
 7624
 7625
 7626
 7627
 7628
 7629
 7630
 7631
 7632
 7633
 7634
 7635
 7636
 7637
 7638
 7639
 7640
 7641
 7642
 7643
 7644
 7645
 7646
 7647
 7648
 7649
 7650
 7651
 7652
 7653
 7654
 7655
 7656
 7657
 7658
 7659
 7660
 7661
 7662
 7663
 7664
 7665
 7666
 7667
 7668
 7669
 7670
 7671
 7672
 7673
 7674
 7675
 7676
 7677
 7678
 7679
 7680
 7681
 7682
 7683
 7684
 7685
 7686
 7687
 7688
 7689
 7690
 7691
 7692
 7693
 7694
 7695
 7696
 7697
 7698
 7699
 7700
 7701
 7702
 7703
 7704
 7705
 7706
 7707
 7708
 7709
 7710
 7711
 7712
 7713
 7714
 7715
 7716
 7717
 7718
 7719
 7720
 7721
 7722
 7723
 7724
 7725
 7726
 7727
 7728
 7729
 7730
 7731
 7732
 7733
 7734
 7735
 7736
 7737
 7738
 7739
 7740
 7741
 7742
 7743
 7744
 7745
 7746
 7747
 7748
 7749
 7750
 7751
 7752
 7753
 7754
 7755
 7756
 7757
 7758
 7759
 7760
 7761
 7762
 7763
 7764
 7765
 7766
 7767
 7768
 7769
 7770
 7771
 7772
 7773
 7774
 7775
 7776
 7777
 7778
 7779
 7780
 7781
 7782
 7783
 7784
 7785
 7786
 7787
 7788
 7789
 7790
 7791
 7792
 7793
 7794
 7795
 7796
 7797
 7798
 7799
 7800
 7801
 7802
 7803
 7804
 7805
 7806
 7807
 7808
 7809
 7810
 7811
 7812
 7813
 7814
 7815
 7816
 7817
 7818
 7819
 7820
 7821
 7822
 7823
 7824
 7825
 7826
 7827
 7828
 7829
 7830
 7831
 7832
 7833
 7834
 7835
 7836
 7837
 7838
 7839
 7840
 7841
 7842
 7843
 7844
 7845
 7846
 7847
 7848
 7849
 7850
 7851
 7852
 7853
 7854
 7855
 7856
 7857
 7858
 7859
 7860
 7861
 7862
 7863
 7864
 7865
 7866
 7867
 7868
 7869
 7870
 7871
 7872
 7873
 7874
 7875
 7876
 7877
 7878
 7879
 7880
 7881
 7882
 7883
 7884
 7885
 7886
 7887
 7888
 7889
 7890
 7891
 7892
 7893
 7894
 7895
 7896
 7897
 7898
 7899
 7900
 7901
 7902
 7903
 7904
 7905
 7906
 7907
 7908
 7909
 7910
 7911
 7912
 7913
 7914
 7915
 7916
 7917
 7918
 7919
 7920
 7921
 7922
 7923
 7924
 7925
 7926
 7927
 7928
 7929
 7930
 7931
 7932
 7933
 7934
 7935
 7936
 7937
 7938
 7939
 7940
 7941
 7942
 7943
 7944
 7945
 7946
 7947
 7948
 7949
 7950
 7951
 7952
 7953
 7954
 7955
 7956
 7957
 7958
 7959
 7960
 7961
 7962
 7963
 7964
 7965
 7966
 7967
 7968
 7969
 7970
 7971
 7972
 7973
 7974
 7975
 7976
 7977
 7978
 7979
 7980
 7981
 7982
 7983
 7984
 7985
 7986
 7987
 7988
 7989
 7990
 7991
 7992
 7993
 7994
 7995
 7996
 7997
 7998
 7999
 8000
 8001
 8002
 8003
 8004
 8005
 8006
 8007
 8008
 8009
 8010
 8011
 8012
 8013
 8014
 8015
 8016
 8017
 8018
 8019
 8020
 8021
 8022
 8023
 8024
 8025
 8026
 8027
 8028
 8029
 8030
 8031
 8032
 8033
 8034
 8035
 8036
 8037
 8038
 8039
 8040
 8041
 8042
 8043
 8044
 8045
 8046
 8047
 8048
 8049
 8050
 8051
 8052
 8053
 8054
 8055
 8056
 8057
 8058
 8059
 8060
 8061
 8062
 8063
 8064
 8065
 8066
 8067
 8068
 8069
 8070
 8071
 8072
 8073
 8074
 8075
 8076
 8077
 8078
 8079
 8080
 8081
 8082
 8083
 8084
 8085
 8086
 8087
 8088
 8089
 8090
 8091
 8092
 8093
 8094
 8095
 8096
 8097
 8098
 8099
 8100
 8101
 8102
 8103
 8104
 8105
 8106
 8107
 8108
 8109
 8110
 8111
 8112
 8113
 8114
 8115
 8116
 8117
 8118
 8119
 8120
 8121
 8122
 8123
 8124
 8125
 8126
 8127
 8128
 8129
 8130
 8131
 8132
 8133
 8134
 8135
 8136
 8137
 8138
 8139
 8140
 8141
 8142
 8143
 8144
 8145
 8146
 8147
 8148
 8149
 8150
 8151
 8152
 8153
 8154
 8155
 8156
 8157
 8158
 8159
 8160
 8161
 8162
 8163
 8164
 8165
 8166
 8167
 8168
 8169
 8170
 8171
 8172
 8173
 8174
 8175
 8176
 8177
 8178
 8179
 8180
 8181
 8182
 8183
 8184
 8185
 8186
 8187
 8188
 8189
 8190
 8191
 8192
 8193
 8194
 8195
 8196
 8197
 8198
 8199
 8200
 8201
 8202
 8203
 8204
 8205
 8206
 8207
 8208
 8209
 8210
 8211
 8212
 8213
 8214
 8215
 8216
 8217
 8218
 8219
 8220
 8221
 8222
 8223
 8224
 8225
 8226
 8227
 8228
 8229
 8230
 8231
 8232
 8233
 8234
 8235
 8236
 8237
 8238
 8239
 8240
 8241
 8242
 8243
 8244
 8245
 8246
 8247
 8248
 8249
 8250
 8251
 8252
 8253
 8254
 8255
 8256
 8257
 8258
 8259
 8260
 8261
 8262
 8263
 8264
 8265
 8266
 8267
 8268
 8269
 8270
 8271
 8272
 8273
 8274
 8275
 8276
 8277
 8278
 8279
 8280
 8281
 8282
 8283
 8284
 8285
 8286
 8287
 8288
 8289
 8290
 8291
 8292
 8293
 8294
 8295
 8296
 8297
 8298
 8299
 8300
 8301
 8302
 8303
 8304
 8305
 8306
 8307
 8308
 8309
 8310
 8311
 8312
 8313
 8314
 8315
 8316
 8317
 8318
 8319
 8320
 8321
 8322
 8323
 8324
 8325
 8326
 8327
 8328
 8329
 8330
 8331
 8332
 8333
 8334
 8335
 8336
 8337
 8338
 8339
 8340
 8341
 8342
 8343
 8344
 8345
 8346
 8347
 8348
 8349
 8350
 8351
 8352
 8353
 8354
 8355
 8356
 8357
 8358
 8359
 8360
 8361
 8362
 8363
 8364
 8365
 8366
 8367
 8368
 8369
 8370
 8371
 8372
 8373
 8374
 8375
 8376
 8377
 8378
 8379
 8380
 8381
 8382
 8383
 8384
 8385
 8386
 8387
 8388
 8389
 8390
 8391
 8392
 8393
 8394
 8395
 8396
 8397
 8398
 8399
 8400
 8401
 8402
 8403
 8404
 8405
 8406
 8407
 8408
 8409
 8410
 8411
 8412
 8413
 8414
 8415
 8416
 8417
 8418
 8419
 8420
 8421
 8422
 8423
 8424
 8425
 8426
 8427
 8428
 8429
 8430
 8431
 8432
 8433
 8434
 8435
 8436
 8437
 8438
 8439
 8440
 8441
 8442
 8443
 8444
 8445
 8446
 8447
 8448
 8449
 8450
 8451
 8452
 8453
 8454
 8455
 8456
 8457
 8458
 8459
 8460
 8461
 8462
 8463
 8464
 8465
 8466
 8467
 8468
 8469
 8470
 8471
 8472
 8473
 8474
 8475
 8476
 8477
 8478
 8479
 8480
 8481
 8482
 8483
 8484
 8485
 8486
 8487
 8488
 8489
 8490
 8491
 8492
 8493
 8494
 8495
 8496
 8497
 8498
 8499
 8500
 8501
 8502
 8503
 8504
 8505
 8506
 8507
 8508
 8509
 8510
 8511
 8512
 8513
 8514
 8515
 8516
 8517
 8518
 8519
 8520
 8521
 8522
 8523
 8524
 8525
 8526
 8527
 8528
 8529
 8530
 8531
 8532
 8533
 8534
 8535
 8536
 8537
 8538
 8539
 8540
 8541
 8542
 8543
 8544
 8545
 8546
 8547
 8548
 8549
 8550
 8551
 8552
 8553
 8554
 8555
 8556
 8557
 8558
 8559
 8560
 8561
 8562
 8563
 8564
 8565
 8566
 8567
 8568
 8569
 8570
 8571
 8572
 8573
 8574
 8575
 8576
 8577
 8578
 8579
 8580
 8581
 8582
 8583
 8584
 8585
 8586
 8587
 8588
 8589
 8590
 8591
 8592
 8593
 8594
 8595
 8596
 8597
 8598
 8599
 8600
 8601
 8602
 8603
 8604
 8605
 8606
 8607
 8608
 8609
 8610
 8611
 8612
 8613
 8614
 8615
 8616
 8617
 8618
 8619
 8620
 8621
 8622
 8623
 8624
 8625
 8626
 8627
 8628
 8629
 8630
 8631
 8632
 8633
 8634
 8635
 8636
 8637
 8638
 8639
 8640
 8641
 8642
 8643
 8644
 8645
 8646
 8647
 8648
 8649
 8650
 8651
 8652
 8653
 8654
 8655
 8656
 8657
 8658
 8659
 8660
 8661
 8662
 8663
 8664
 8665
 8666
 8667
 8668
 8669
 8670
 8671
 8672
 8673
 8674
 8675
 8676
 8677
 8678
 8679
 8680
 8681
 8682
 8683
 8684
 8685
 8686
 8687
 8688
 8689
 8690
 8691
 8692
 8693
 8694
 8695
 8696
 8697
 8698
 8699
 8700
 8701
 8702
 8703
 8704
 8705
 8706
 8707
 8708
 8709
 8710
 8711
 8712
 8713
 8714
 8715
 8716
 8717
 8718
 8719
 8720
 8721
 8722
 8723
 8724
 8725
 8726
 8727
 8728
 8729
 8730
 8731
 8732
 8733
 8734
 8735
 8736
 8737
 8738
 8739
 8740
 8741
 8742
 8743
 8744
 8745
 8746
 8747
 8748
 8749
 8750
 8751
 8752
 8753
 8754
 8755
 8756
 8757
 8758
 8759
 8760
 8761
 8762
 8763
 8764
 8765
 8766
 8767
 8768
 8769
 8770
 8771
 8772
 8773
 8774
 8775
 8776
 8777
 8778
 8779
 8780
 8781
 8782
 8783
 8784
 8785
 8786
 8787
 8788
 8789
 8790
 8791
 8792
 8793
 8794
 8795
 8796
 8797
 8798
 8799
 8800
 8801
 8802
 8803
 8804
 8805
 8806
 8807
 8808
 8809
 8810
 8811
 8812
 8813
 8814
 8815
 8816
 8817
 8818
 8819
 8820
 8821
 8822
 8823
 8824
 8825
 8826
 8827
 8828
 8829
 8830
 8831
 8832
 8833
 8834
 8835
 8836
 8837
 8838
 8839
 8840
 8841
 8842
 8843
 8844
 8845
 8846
 8847
 8848
 8849
 8850
 8851
 8852
 8853
 8854
 8855
 8856
 8857
 8858
 8859
 8860
 8861
 8862
 8863
 8864
 8865
 8866
 8867
 8868
 8869
 8870
 8871
 8872
 8873
 8874
 8875
 8876
 8877
 8878
 8879
 8880
 8881
 8882
 8883
 8884
 8885
 8886
 8887
 8888
 8889
 8890
 8891
 8892
 8893
 8894
 8895
 8896
 8897
 8898
 8899
 8900
 8901
 8902
 8903
 8904
 8905
 8906
 8907
 8908
 8909
 8910
 8911
 8912
 8913
 8914
 8915
 8916
 8917
 8918
 8919
 8920
 8921
 8922
 8923
 8924
 8925
 8926
 8927
 8928
 8929
 8930
 8931
 8932
 8933
 8934
 8935
 8936
 8937
 8938
 8939
 8940
 8941
 8942
 8943
 8944
 8945
 8946
 8947
 8948
 8949
 8950
 8951
 8952
 8953
 8954
 8955
 8956
 8957
 8958
 8959
 8960
 8961
 8962
 8963
 8964
 8965
 8966
 8967
 8968
 8969
 8970
 8971
 8972
 8973
 8974
 8975
 8976
 8977
 8978
 8979
 8980
 8981
 8982
 8983
 8984
 8985
 8986
 8987
 8988
 8989
 8990
 8991
 8992
 8993
 8994
 8995
 8996
 8997
 8998
 8999
 9000
 9001
 9002
 9003
 9004
 9005
 9006
 9007
 9008
 9009
 9010
 9011
 9012
 9013
 9014
 9015
 9016
 9017
 9018
 9019
 9020
 9021
 9022
 9023
 9024
 9025
 9026
 9027
 9028
 9029
 9030
 9031
 9032
 9033
 9034
 9035
 9036
 9037
 9038
 9039
 9040
 9041
 9042
 9043
 9044
 9045
 9046
 9047
 9048
 9049
 9050
 9051
 9052
 9053
 9054
 9055
 9056
 9057
 9058
 9059
 9060
 9061
 9062
 9063
 9064
 9065
 9066
 9067
 9068
 9069
 9070
 9071
 9072
 9073
 9074
 9075
 9076
 9077
 9078
 9079
 9080
 9081
 9082
 9083
 9084
 9085
 9086
 9087
 9088
 9089
 9090
 9091
 9092
 9093
 9094
 9095
 9096
 9097
 9098
 9099
 9100
 9101
 9102
 9103
 9104
 9105
 9106
 9107
 9108
 9109
 9110
 9111
 9112
 9113
 9114
 9115
 9116
 9117
 9118
 9119
 9120
 9121
 9122
 9123
 9124
 9125
 9126
 9127
 9128
 9129
 9130
 9131
 9132
 9133
 9134
 9135
 9136
 9137
 9138
 9139
 9140
 9141
 9142
 9143
 9144
 9145
 9146
 9147
 9148
 9149
 9150
 9151
 9152
 9153
 9154
 9155
 9156
 9157
 9158
 9159
 9160
 9161
 9162
 9163
 9164
 9165
 9166
 9167
 9168
 9169
 9170
 9171
 9172
 9173
 9174
 9175
 9176
 9177
 9178
 9179
 9180
 9181
 9182
 9183
 9184
 9185
 9186
 9187
 9188
 9189
 9190
 9191
 9192
 9193
 9194
 9195
 9196
 9197
 9198
 9199
 9200
 9201
 9202
 9203
 9204
 9205
 9206
 9207
 9208
 9209
 9210
 9211
 9212
 9213
 9214
 9215
 9216
 9217
 9218
 9219
 9220
 9221
 9222
 9223
 9224
 9225
 9226
 9227
 9228
 9229
 9230
 9231
 9232
 9233
 9234
 9235
 9236
 9237
 9238
 9239
 9240
 9241
 9242
 9243
 9244
 9245
 9246
 9247
 9248
 9249
 9250
 9251
 9252
 9253
 9254
 9255
 9256
 9257
 9258
 9259
 9260
 9261
 9262
 9263
 9264
 9265
 9266
 9267
 9268
 9269
 9270
 9271
 9272
 9273
 9274
 9275
 9276
 9277
 9278
 9279
 9280
 9281
 9282
 9283
 9284
 9285
 9286
 9287
 9288
 9289
 9290
 9291
 9292
 9293
 9294
 9295
 9296
 9297
 9298
 9299
 9300
 9301
 9302
 9303
 9304
 9305
 9306
 9307
 9308
 9309
 9310
 9311
 9312
 9313
 9314
 9315
 9316
 9317
 9318
 9319
 9320
 9321
 9322
 9323
 9324
 9325
 9326
 9327
 9328
 9329
 9330
 9331
 9332
 9333
 9334
 9335
 9336
 9337
 9338
 9339
 9340
 9341
 9342
 9343
 9344
 9345
 9346
 9347
 9348
 9349
 9350
 9351
 9352
 9353
 9354
 9355
 9356
 9357
 9358
 9359
 9360
 9361
 9362
 9363
 9364
 9365
 9366
 9367
 9368
 9369
 9370
 9371
 9372
 9373
 9374
 9375
 9376
 9377
 9378
 9379
 9380
 9381
 9382
 9383
 9384
 9385
 9386
 9387
 9388
 9389
 9390
 9391
 9392
 9393
 9394
 9395
 9396
 9397
 9398
 9399
 9400
 9401
 9402
 9403
 9404
 9405
 9406
 9407
 9408
 9409
 9410
 9411
 9412
 9413
 9414
 9415
 9416
 9417
 9418
 9419
 9420
 9421
 9422
 9423
 9424
 9425
 9426
 9427
 9428
 9429
 9430
 9431
 9432
 9433
 9434
 9435
 9436
 9437
 9438
 9439
 9440
 9441
 9442
 9443
 9444
 9445
 9446
 9447
 9448
 9449
 9450
 9451
 9452
 9453
 9454
 9455
 9456
 9457
 9458
 9459
 9460
 9461
 9462
 9463
 9464
 9465
 9466
 9467
 9468
 9469
 9470
 9471
 9472
 9473
 9474
 9475
 9476
 9477
 9478
 9479
 9480
 9481
 9482
 9483
 9484
 9485
 9486
 9487
 9488
 9489
 9490
 9491
 9492
 9493
 9494
 9495
 9496
 9497
 9498
 9499
 9500
 9501
 9502
 9503
 9504
 9505
 9506
 9507
 9508
 9509
 9510
 9511
 9512
 9513
 9514
 9515
 9516
 9517
 9518
 9519
 9520
 9521
 9522
 9523
 9524
 9525
 9526
 9527
 9528
 9529
 9530
 9531
 9532
 9533
 9534
 9535
 9536
 9537
 9538
 9539
 9540
 9541
 9542
 9543
 9544
 9545
 9546
 9547
 9548
 9549
 9550
 9551
 9552
 9553
 9554
 9555
 9556
 9557
 9558
 9559
 9560
 9561
 9562
 9563
 9564
 9565
 9566
 9567
 9568
 9569
 9570
 9571
 9572
 9573
 9574
 9575
 9576
 9577
 9578
 9579
 9580
 9581
 9582
 9583
 9584
 9585
 9586
 9587
 9588
 9589
 9590
 9591
 9592
 9593
 9594
 9595
 9596
 9597
 9598
 9599
 9600
 9601
 9602
 9603
 9604
 9605
 9606
 9607
 9608
 9609
 9610
 9611
 9612
 9613
 9614
 9615
 9616
 9617
 9618
 9619
 9620
 9621
 9622
 9623
 9624
 9625
 9626
 9627
 9628
 9629
 9630
 9631
 9632
 9633
 9634
 9635
 9636
 9637
 9638
 9639
 9640
 9641
 9642
 9643
 9644
 9645
 9646
 9647
 9648
 9649
 9650
 9651
 9652
 9653
 9654
 9655
 9656
 9657
 9658
 9659
 9660
 9661
 9662
 9663
 9664
 9665
 9666
 9667
 9668
 9669
 9670
 9671
 9672
 9673
 9674
 9675
 9676
 9677
 9678
 9679
 9680
 9681
 9682
 9683
 9684
 9685
 9686
 9687
 9688
 9689
 9690
 9691
 9692
 9693
 9694
 9695
 9696
 9697
 9698
 9699
 9700
 9701
 9702
 9703
 9704
 9705
 9706
 9707
 9708
 9709
 9710
 9711
 9712
 9713
 9714
 9715
 9716
 9717
 9718
 9719
 9720
 9721
 9722
 9723
 9724
 9725
 9726
 9727
 9728
 9729
 9730
 9731
 9732
 9733
 9734
 9735
 9736
 9737
 9738
 9739
 9740
 9741
 9742
 9743
 9744
 9745
 9746
 9747
 9748
 9749
 9750
 9751
 9752
 9753
 9754
 9755
 9756
 9757
 9758
 9759
 9760
 9761
 9762
 9763
 9764
 9765
 9766
 9767
 9768
 9769
 9770
 9771
 9772
 9773
 9774
 9775
 9776
 9777
 9778
 9779
 9780
 9781
 9782
 9783
 9784
 9785
 9786
 9787
 9788
 9789
 9790
 9791
 9792
 9793
 9794
 9795
 9796
 9797
 9798
 9799
 9800
 9801
 9802
 9803
 9804
 9805
 9806
 9807
 9808
 9809
 9810
 9811
 9812
 9813
 9814
 9815
 9816
 9817
 9818
 9819
 9820
 9821
 9822
 9823
 9824
 9825
 9826
 9827
 9828
 9829
 9830
 9831
 9832
 9833
 9834
 9835
 9836
 9837
 9838
 9839
 9840
 9841
 9842
 9843
 9844
 9845
 9846
 9847
 9848
 9849
 9850
 9851
 9852
 9853
 9854
 9855
 9856
 9857
 9858
 9859
 9860
 9861
 9862
 9863
 9864
 9865
 9866
 9867
 9868
 9869
 9870
 9871
 9872
 9873
 9874
 9875
 9876
 9877
 9878
 9879
 9880
 9881
 9882
 9883
 9884
 9885
 9886
 9887
 9888
 9889
 9890
 9891
 9892
 9893
 9894
 9895
 9896
 9897
 9898
 9899
 9900
 9901
 9902
 9903
 9904
 9905
 9906
 9907
 9908
 9909
 9910
 9911
 9912
 9913
 9914
 9915
 9916
 9917
 9918
 9919
 9920
 9921
 9922
 9923
 9924
 9925
 9926
 9927
 9928
 9929
 9930
 9931
 9932
 9933
 9934
 9935
 9936
 9937
 9938
 9939
 9940
 9941
 9942
 9943
 9944
 9945
 9946
 9947
 9948
 9949
 9950
 9951
 9952
 9953
 9954
 9955
 9956
 9957
 9958
 9959
 9960
 9961
 9962
 9963
 9964
 9965
 9966
 9967
 9968
 9969
 9970
 9971
 9972
 9973
 9974
 9975
 9976
 9977
 9978
 9979
 9980
 9981
 9982
 9983
 9984
 9985
 9986
 9987
 9988
 9989
 9990
 9991
 9992
 9993
 9994
 9995
 9996
 9997
 9998
 9999
10000
10001
10002
10003
10004
10005
10006
10007
10008
10009
10010
10011
10012
10013
10014
10015
10016
10017
10018
10019
10020
10021
10022
10023
10024
10025
10026
10027
10028
10029
10030
10031
10032
10033
10034
10035
10036
10037
10038
10039
10040
10041
10042
10043
10044
10045
10046
10047
10048
10049
10050
10051
10052
10053
10054
10055
10056
10057
10058
10059
10060
10061
10062
10063
10064
10065
10066
10067
10068
10069
10070
10071
10072
10073
10074
10075
10076
10077
10078
10079
10080
10081
10082
10083
10084
10085
10086
10087
10088
10089
10090
10091
10092
10093
10094
10095
10096
10097
10098
10099
10100
10101
10102
10103
10104
10105
10106
10107
10108
10109
10110
10111
10112
10113
10114
10115
10116
10117
10118
10119
10120
10121
10122
10123
10124
10125
10126
10127
10128
10129
10130
10131
10132
10133
10134
10135
10136
10137
10138
10139
10140
10141
10142
10143
10144
10145
10146
10147
10148
10149
10150
10151
10152
10153
10154
10155
10156
10157
10158
10159
10160
10161
10162
10163
10164
10165
10166
10167
10168
10169
10170
10171
10172
10173
10174
10175
10176
10177
10178
10179
10180
10181
10182
10183
10184
10185
10186
10187
10188
10189
10190
10191
10192
10193
10194
10195
10196
10197
10198
10199
10200
10201
10202
10203
10204
10205
10206
10207
10208
10209
10210
10211
10212
10213
10214
10215
10216
10217
10218
10219
10220
10221
10222
10223
10224
10225
10226
10227
10228
10229
10230
10231
10232
10233
10234
10235
10236
10237
10238
10239
10240
10241
10242
10243
10244
10245
10246
10247
10248
10249
10250
10251
10252
10253
10254
10255
10256
10257
10258
10259
10260
10261
10262
10263
10264
10265
10266
10267
10268
10269
10270
10271
10272
10273
10274
10275
10276
10277
10278
10279
10280
10281
10282
10283
10284
10285
10286
10287
10288
10289
10290
10291
10292
10293
10294
10295
10296
10297
10298
10299
10300
10301
10302
10303
10304
10305
10306
10307
10308
10309
10310
10311
10312
10313
10314
10315
10316
10317
10318
10319
10320
10321
10322
10323
10324
10325
10326
10327
10328
10329
10330
10331
10332
10333
10334
10335
10336
10337
10338
10339
10340
10341
10342
10343
10344
10345
10346
10347
10348
10349
10350
10351
10352
10353
10354
10355
10356
10357
10358
10359
10360
10361
10362
10363
10364
10365
10366
10367
10368
10369
10370
10371
10372
10373
10374
10375
10376
10377
10378
10379
10380
10381
10382
10383
10384
10385
10386
10387
10388
10389
10390
10391
10392
10393
10394
10395
10396
10397
10398
10399
10400
10401
10402
10403
10404
10405
10406
10407
10408
10409
10410
10411
10412
10413
10414
10415
10416
10417
10418
10419
10420
10421
10422
10423
10424
10425
10426
10427
10428
10429
10430
10431
10432
10433
10434
10435
10436
10437
10438
10439
10440
10441
10442
10443
10444
10445
10446
10447
10448
10449
10450
10451
10452
10453
10454
10455
10456
10457
10458
10459
10460
10461
10462
10463
10464
10465
10466
10467
10468
10469
10470
10471
10472
10473
10474
10475
10476
10477
10478
10479
10480
10481
10482
10483
10484
10485
10486
10487
10488
10489
10490
10491
10492
10493
10494
10495
10496
10497
10498
10499
10500
10501
10502
10503
10504
10505
10506
10507
10508
10509
10510
10511
10512
10513
10514
10515
10516
10517
10518
10519
10520
10521
10522
10523
10524
10525
10526
10527
10528
10529
10530
10531
10532
10533
10534
10535
10536
10537
10538
10539
10540
10541
10542
10543
10544
10545
10546
10547
10548
10549
10550
10551
10552
10553
10554
10555
10556
10557
10558
10559
10560
10561
10562
10563
10564
10565
10566
10567
10568
10569
10570
10571
10572
10573
10574
10575
10576
10577
10578
10579
10580
10581
10582
10583
10584
10585
10586
10587
10588
10589
10590
10591
10592
10593
10594
10595
10596
10597
10598
10599
10600
10601
10602
10603
10604
10605
10606
10607
10608
10609
10610
10611
10612
10613
10614
10615
10616
10617
10618
10619
10620
10621
10622
10623
10624
10625
10626
10627
10628
10629
10630
10631
10632
10633
10634
10635
10636
10637
10638
10639
10640
10641
10642
10643
10644
10645
10646
10647
10648
10649
10650
10651
10652
10653
10654
10655
10656
10657
10658
10659
10660
10661
10662
10663
10664
10665
10666
10667
10668
10669
10670
10671
10672
10673
10674
10675
10676
10677
10678
10679
10680
10681
10682
10683
10684
10685
10686
10687
10688
10689
10690
10691
10692
10693
10694
10695
10696
10697
10698
10699
10700
10701
10702
10703
10704
10705
10706
10707
10708
10709
10710
10711
10712
10713
10714
10715
10716
10717
10718
10719
10720
10721
10722
10723
10724
10725
10726
10727
10728
10729
10730
10731
10732
10733
10734
10735
10736
10737
10738
10739
10740
10741
10742
10743
10744
10745
10746
10747
10748
10749
10750
10751
10752
10753
10754
10755
10756
10757
10758
10759
10760
10761
10762
10763
10764
10765
10766
10767
10768
10769
10770
10771
10772
10773
10774
10775
10776
10777
10778
10779
10780
10781
10782
10783
10784
10785
10786
10787
10788
10789
10790
10791
10792
10793
10794
10795
10796
10797
10798
10799
10800
10801
10802
10803
10804
10805
10806
10807
10808
10809
10810
10811
10812
10813
10814
10815
10816
10817
10818
10819
10820
10821
10822
10823
10824
10825
10826
10827
10828
10829
10830
10831
10832
10833
10834
10835
10836
10837
10838
10839
10840
10841
10842
10843
10844
10845
10846
10847
10848
10849
10850
10851
10852
10853
10854
10855
10856
10857
10858
10859
10860
10861
10862
10863
10864
10865
10866
10867
10868
10869
10870
10871
10872
10873
10874
10875
10876
10877
10878
10879
10880
10881
10882
10883
10884
10885
10886
10887
10888
10889
10890
10891
10892
10893
10894
10895
10896
10897
10898
10899
10900
10901
10902
10903
10904
10905
10906
10907
10908
10909
10910
10911
10912
10913
10914
10915
10916
10917
10918
10919
10920
10921
10922
10923
10924
10925
10926
10927
10928
10929
10930
10931
10932
10933
10934
10935
10936
10937
10938
10939
10940
10941
10942
10943
10944
10945
10946
10947
10948
10949
10950
10951
10952
10953
10954
10955
10956
10957
10958
10959
10960
10961
10962
10963
10964
10965
10966
10967
10968
10969
10970
10971
10972
10973
10974
10975
10976
10977
10978
10979
10980
10981
10982
10983
10984
10985
10986
10987
10988
10989
10990
10991
10992
10993
10994
10995
10996
10997
10998
10999
11000
11001
11002
11003
11004
11005
11006
11007
11008
11009
11010
11011
11012
11013
11014
11015
11016
11017
11018
11019
11020
11021
11022
11023
11024
11025
11026
11027
11028
11029
11030
11031
11032
11033
11034
11035
11036
11037
11038
11039
11040
11041
11042
11043
11044
11045
11046
11047
11048
11049
11050
11051
11052
11053
11054
11055
11056
11057
11058
11059
11060
11061
11062
11063
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
11078
11079
11080
11081
11082
11083
11084
11085
11086
11087
11088
11089
11090
11091
11092
11093
11094
11095
11096
11097
11098
11099
11100
11101
11102
11103
11104
11105
11106
11107
11108
11109
11110
11111
11112
11113
11114
11115
11116
11117
11118
11119
11120
11121
11122
11123
11124
11125
11126
11127
11128
11129
11130
11131
11132
11133
11134
11135
11136
11137
11138
11139
11140
11141
11142
11143
11144
11145
11146
11147
11148
11149
11150
11151
11152
11153
11154
11155
11156
11157
11158
11159
11160
11161
11162
11163
11164
11165
11166
11167
11168
11169
11170
11171
11172
11173
11174
11175
11176
11177
11178
11179
11180
11181
11182
11183
11184
11185
11186
11187
11188
11189
11190
11191
11192
11193
11194
11195
11196
11197
11198
11199
11200
11201
11202
11203
11204
11205
11206
11207
11208
11209
11210
11211
11212
11213
11214
11215
11216
11217
11218
11219
11220
11221
11222
11223
11224
11225
11226
11227
11228
11229
11230
11231
11232
11233
11234
11235
11236
11237
11238
11239
11240
11241
11242
11243
11244
11245
11246
11247
11248
11249
11250
11251
11252
11253
11254
11255
11256
11257
11258
11259
11260
11261
11262
11263
11264
11265
11266
11267
11268
11269
11270
11271
11272
11273
11274
11275
11276
11277
11278
11279
11280
11281
11282
11283
11284
11285
11286
11287
11288
11289
11290
11291
11292
11293
11294
11295
11296
11297
11298
11299
11300
11301
11302
11303
11304
11305
11306
11307
11308
11309
11310
11311
11312
11313
11314
11315
11316
11317
11318
11319
11320
11321
11322
11323
11324
11325
11326
11327
11328
11329
11330
11331
11332
11333
11334
11335
11336
11337
11338
11339
11340
11341
11342
11343
11344
11345
11346
11347
11348
11349
11350
11351
11352
11353
11354
11355
11356
11357
11358
11359
11360
11361
11362
11363
11364
11365
11366
11367
11368
11369
11370
11371
11372
11373
11374
11375
11376
11377
11378
11379
11380
11381
11382
11383
11384
11385
11386
11387
11388
11389
11390
11391
11392
11393
11394
11395
11396
11397
11398
11399
11400
11401
11402
11403
11404
11405
11406
11407
11408
11409
11410
11411
11412
11413
11414
11415
11416
11417
11418
11419
11420
11421
11422
11423
11424
11425
11426
11427
11428
11429
11430
11431
11432
11433
11434
11435
11436
11437
11438
11439
11440
11441
11442
11443
11444
11445
11446
11447
11448
11449
11450
11451
11452
11453
11454
11455
11456
11457
11458
11459
11460
11461
11462
11463
11464
11465
11466
11467
11468
11469
11470
11471
11472
11473
11474
11475
11476
11477
11478
11479
11480
11481
11482
11483
11484
11485
11486
11487
11488
11489
11490
11491
11492
11493
11494
11495
11496
11497
11498
11499
11500
11501
11502
11503
11504
11505
11506
11507
11508
11509
11510
11511
11512
11513
11514
11515
11516
11517
11518
11519
11520
11521
11522
11523
11524
11525
11526
11527
11528
11529
11530
11531
11532
11533
11534
11535
11536
11537
11538
11539
11540
11541
11542
11543
11544
11545
11546
11547
11548
11549
11550
11551
11552
11553
11554
11555
11556
11557
11558
11559
11560
11561
11562
11563
11564
11565
11566
11567
11568
11569
11570
11571
11572
11573
11574
11575
11576
11577
11578
11579
11580
11581
11582
11583
11584
11585
11586
11587
11588
11589
11590
11591
11592
11593
11594
11595
11596
11597
11598
11599
11600
11601
11602
11603
11604
11605
11606
11607
11608
11609
11610
11611
11612
11613
11614
11615
11616
11617
11618
11619
11620
11621
11622
11623
11624
11625
11626
11627
11628
11629
11630
11631
11632
11633
11634
11635
11636
11637
11638
11639
11640
11641
11642
11643
11644
11645
11646
11647
11648
11649
11650
11651
11652
11653
11654
11655
11656
11657
11658
11659
11660
11661
11662
11663
11664
11665
11666
11667
11668
11669
11670
11671
11672
11673
11674
11675
11676
11677
11678
11679
11680
11681
11682
11683
11684
11685
11686
11687
11688
11689
11690
11691
11692
11693
11694
11695
11696
11697
11698
11699
11700
11701
11702
11703
11704
11705
11706
11707
11708
11709
11710
11711
11712
11713
11714
11715
11716
11717
11718
11719
11720
11721
11722
11723
11724
11725
11726
11727
11728
11729
11730
11731
11732
11733
11734
11735
11736
11737
11738
11739
11740
11741
11742
11743
11744
11745
11746
11747
11748
11749
11750
11751
11752
11753
11754
11755
11756
11757
11758
11759
11760
11761
11762
11763
11764
11765
11766
11767
11768
11769
11770
11771
11772
11773
11774
11775
11776
11777
11778
11779
11780
11781
11782
11783
11784
11785
11786
11787
11788
11789
11790
11791
11792
11793
11794
11795
11796
11797
11798
11799
11800
11801
11802
11803
11804
11805
11806
11807
11808
11809
11810
11811
11812
11813
11814
11815
11816
11817
11818
11819
11820
11821
11822
11823
11824
11825
11826
11827
11828
11829
11830
11831
11832
11833
11834
11835
11836
11837
11838
11839
11840
11841
11842
11843
11844
11845
11846
11847
11848
11849
11850
11851
11852
11853
11854
11855
11856
11857
11858
11859
11860
11861
11862
11863
11864
11865
11866
11867
11868
11869
11870
11871
11872
11873
11874
11875
11876
11877
11878
11879
11880
11881
11882
11883
11884
11885
11886
11887
11888
11889
11890
11891
11892
11893
11894
11895
11896
11897
11898
11899
11900
11901
11902
11903
11904
11905
11906
11907
11908
11909
11910
11911
11912
11913
11914
11915
11916
11917
11918
11919
11920
11921
11922
11923
11924
11925
11926
11927
11928
11929
11930
11931
11932
11933
11934
11935
11936
11937
11938
11939
11940
11941
11942
11943
11944
11945
11946
11947
11948
11949
11950
11951
11952
11953
11954
11955
11956
11957
11958
11959
11960
11961
11962
11963
11964
11965
11966
11967
11968
11969
11970
11971
11972
11973
11974
11975
11976
11977
11978
11979
11980
11981
11982
11983
11984
11985
11986
11987
11988
11989
11990
11991
11992
11993
11994
11995
11996
11997
11998
11999
12000
12001
12002
12003
12004
12005
12006
12007
12008
12009
12010
12011
12012
12013
12014
12015
12016
12017
12018
12019
12020
12021
12022
12023
12024
12025
12026
12027
12028
12029
12030
12031
12032
12033
12034
12035
12036
12037
12038
12039
12040
12041
12042
12043
12044
12045
12046
12047
12048
12049
12050
12051
12052
12053
12054
12055
12056
12057
12058
12059
12060
12061
12062
12063
12064
12065
12066
12067
12068
12069
12070
12071
12072
12073
12074
12075
12076
12077
12078
12079
12080
12081
12082
12083
12084
12085
12086
12087
12088
12089
12090
12091
12092
12093
12094
12095
12096
12097
12098
12099
12100
12101
12102
12103
12104
12105
12106
12107
12108
12109
12110
12111
12112
12113
12114
12115
12116
12117
12118
12119
12120
12121
12122
12123
12124
12125
12126
12127
12128
12129
12130
12131
12132
12133
12134
12135
12136
12137
12138
12139
12140
12141
12142
12143
12144
12145
12146
12147
12148
12149
12150
12151
12152
12153
12154
12155
12156
12157
12158
12159
12160
12161
12162
12163
12164
12165
12166
12167
12168
12169
12170
12171
12172
12173
12174
12175
12176
12177
12178
12179
12180
12181
12182
12183
12184
12185
12186
12187
12188
12189
12190
12191
12192
12193
12194
12195
12196
12197
12198
12199
12200
12201
12202
12203
12204
12205
12206
12207
12208
12209
12210
12211
12212
12213
12214
12215
12216
12217
12218
12219
12220
12221
12222
12223
12224
12225
12226
12227
 
The distributed sources do not include tests with the CRAN package.  Here we
revert the commit `591d0e8ba1deaaf82445474ec6619c0b43db4e63' which deletes
these tests.  There are plans to not delete tests in future as documented at
https://github.com/vegandevs/vegan/issues/181.

diff --git a/tests/Examples/vegan-Ex.Rout.save b/tests/Examples/vegan-Ex.Rout.save
new file mode 100644
index 0000000..be41f6d
--- /dev/null
+++ b/tests/Examples/vegan-Ex.Rout.save
@@ -0,0 +1,8896 @@
+
+R version 3.3.0 Patched (2016-05-12 r70603) -- "Supposedly Educational"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+  Natural language support but running in an English locale
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> pkgname <- "vegan"
+> source(file.path(R.home("share"), "R", "examples-header.R"))
+> options(warn = 1)
+> library('vegan')
+Loading required package: permute
+Loading required package: lattice
+This is vegan 2.4-0
+> 
+> base::assign(".oldSearch", base::search(), pos = 'CheckExEnv')
+> cleanEx()
+> nameEx("BCI")
+> ### * BCI
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: BCI
+> ### Title: Barro Colorado Island Tree Counts
+> ### Aliases: BCI BCI.env
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> data(BCI, BCI.env)
+> head(BCI.env)
+  UTM.EW  UTM.NS Precipitation Elevation Age.cat Geology  Habitat Stream EnvHet
+1 625754 1011569          2530       120      c3      Tb OldSlope    Yes 0.6272
+2 625754 1011669          2530       120      c3      Tb   OldLow    Yes 0.3936
+3 625754 1011769          2530       120      c3      Tb   OldLow     No 0.0000
+4 625754 1011869          2530       120      c3      Tb   OldLow     No 0.0000
+5 625754 1011969          2530       120      c3      Tb OldSlope     No 0.4608
+6 625854 1011569          2530       120      c3      Tb   OldLow     No 0.0768
+> ## see changed species names
+> oldnames <- attr(BCI, "original.names")
+> taxa <- cbind("Old Names" = oldnames, "Current Names" = names(BCI))
+> noquote(taxa[taxa[,1] != taxa[,2], ])
+      Old Names                     Current Names                 
+ [1,] Abarema.macradenium           Abarema.macradenia            
+ [2,] Acacia.melanoceras            Vachellia.melanoceras         
+ [3,] Apeiba.aspera                 Apeiba.glabra                 
+ [4,] Aspidosperma.cruenta          Aspidosperma.desmanthum       
+ [5,] Cassipourea.elliptica         Cassipourea.guianensis        
+ [6,] Cespedezia.macrophylla        Cespedesia.spathulata         
+ [7,] Chlorophora.tinctoria         Maclura.tinctoria             
+ [8,] Coccoloba.manzanillensis      Coccoloba.manzinellensis      
+ [9,] Coussarea.curvigemmia         Coussarea.curvigemma          
+[10,] Cupania.sylvatica             Cupania.seemannii             
+[11,] Dipteryx.panamensis           Dipteryx.oleifera             
+[12,] Eugenia.coloradensis          Eugenia.florida               
+[13,] Eugenia.oerstedeana           Eugenia.oerstediana           
+[14,] Guapira.standleyana           Guapira.myrtiflora            
+[15,] Hyeronima.alchorneoides       Hieronyma.alchorneoides       
+[16,] Inga.marginata                Inga.semialata                
+[17,] Lonchocarpus.latifolius       Lonchocarpus.heptaphyllus     
+[18,] Maquira.costaricana           Maquira.guianensis.costaricana
+[19,] Phoebe.cinnamomifolia         Cinnamomum.triplinerve        
+[20,] Swartzia.simplex.var.ochnacea Swartzia.simplex.continentalis
+[21,] Tabebuia.guayacan             Handroanthus.guayacan         
+> 
+> 
+> 
+> cleanEx()
+> nameEx("CCorA")
+> ### * CCorA
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: CCorA
+> ### Title: Canonical Correlation Analysis
+> ### Aliases: CCorA biplot.CCorA
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> # Example using two mite groups. The mite data are available in vegan
+> data(mite)
+> # Two mite species associations (Legendre 2005, Fig. 4)
+> group.1 <- c(1,2,4:8,10:15,17,19:22,24,26:30)
+> group.2 <- c(3,9,16,18,23,25,31:35)
+> # Separate Hellinger transformations of the two groups of species 
+> mite.hel.1 <- decostand(mite[,group.1], "hel")
+> mite.hel.2 <- decostand(mite[,group.2], "hel")
+> rownames(mite.hel.1) = paste("S",1:nrow(mite),sep="")
+> rownames(mite.hel.2) = paste("S",1:nrow(mite),sep="")
+> out <- CCorA(mite.hel.1, mite.hel.2)
+> out
+
+Canonical Correlation Analysis
+
+Call:
+CCorA(Y = mite.hel.1, X = mite.hel.2) 
+
+              Y  X
+Matrix Ranks 24 11
+
+Pillai's trace:  4.573009 
+
+Significance of Pillai's trace:
+from F-distribution:   0.0032737 
+                       CanAxis1 CanAxis2 CanAxis3 CanAxis4 CanAxis5 CanAxis6
+Canonical Correlations  0.92810  0.82431  0.81209  0.74981  0.70795  0.65950
+                       CanAxis7 CanAxis8 CanAxis9 CanAxis10 CanAxis11
+Canonical Correlations  0.50189  0.48179  0.41089   0.37823      0.28
+
+                     Y | X  X | Y
+RDA R squares      0.33224 0.5376
+adj. RDA R squares 0.20560 0.2910
+
+> biplot(out, "ob")                 # Two plots of objects
+> biplot(out, "v", cex=c(0.7,0.6))  # Two plots of variables
+> biplot(out, "ov", cex=c(0.7,0.6)) # Four plots (2 for objects, 2 for variables)
+> biplot(out, "b", cex=c(0.7,0.6))  # Two biplots
+> biplot(out, xlabs = NA, plot.axes = c(3,5))    # Plot axes 3, 5. No object names
+> biplot(out, plot.type="biplots", xlabs = NULL) # Replace object names by numbers
+> 
+> # Example using random numbers. No significant relationship is expected
+> mat1 <- matrix(rnorm(60),20,3)
+> mat2 <- matrix(rnorm(100),20,5)
+> out2 = CCorA(mat1, mat2, permutations=99)
+> out2
+
+Canonical Correlation Analysis
+
+Call:
+CCorA(Y = mat1, X = mat2, permutations = 99) 
+
+             Y X
+Matrix Ranks 3 5
+
+Pillai's trace:  0.6455578 
+
+Significance of Pillai's trace:
+from F-distribution:   0.70352 
+based on permutations: 0.69 
+Permutation: free
+Number of permutations: 99
+ 
+                       CanAxis1 CanAxis2 CanAxis3
+Canonical Correlations  0.69691  0.38140     0.12
+
+                      Y | X   X | Y
+RDA R squares       0.17066  0.1368
+adj. RDA R squares -0.12553 -0.0250
+
+> biplot(out2, "b")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("MDSrotate")
+> ### * MDSrotate
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: MDSrotate
+> ### Title: Rotate First MDS Dimension Parallel to an External Variable
+> ### Aliases: MDSrotate
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> data(varechem)
+> mod <- monoMDS(vegdist(varespec))
+> mod <- with(varechem, MDSrotate(mod, pH))
+> plot(mod)
+> ef <- envfit(mod ~ pH, varechem, permutations = 0)
+> plot(ef)
+> ordisurf(mod ~ pH, varechem, knots = 1, add = TRUE)
+
+Family: gaussian 
+Link function: identity 
+
+Formula:
+y ~ poly(x1, 1) + poly(x2, 1)
+Total model degrees of freedom 3 
+
+REML score: -3.185099     
+> 
+> 
+> 
+> cleanEx()
+> nameEx("MOStest")
+> ### * MOStest
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: MOStest
+> ### Title: Mitchell-Olds & Shaw Test for the Location of Quadratic Extreme
+> ### Aliases: MOStest plot.MOStest fieller.MOStest profile.MOStest
+> ###   confint.MOStest
+> ### Keywords: models regression
+> 
+> ### ** Examples
+> 
+> ## The Al-Mufti data analysed in humpfit():
+> mass <- c(140,230,310,310,400,510,610,670,860,900,1050,1160,1900,2480)
+> spno <- c(1,  4,  3,  9, 18, 30, 20, 14,  3,  2,  3,  2,  5,  2)
+> mod <- MOStest(mass, spno)
+> ## Insignificant
+> mod
+
+Mitchell-Olds and Shaw test
+Null: hump of a quadratic linear predictor is at min or max
+
+Family: gaussian 
+Link function: identity 
+
+      hump        min        max 
+  46.89749  140.00000 2480.00000 
+***** Caution: hump/pit not bracketed by the data ******
+
+            min/max      F Pr(>F)
+hump at min     140 0.0006 0.9816
+hump at max    2480 0.3161 0.5852
+Combined                   0.9924
+> ## ... but inadequate shape of the curve
+> op <- par(mfrow=c(2,2), mar=c(4,4,1,1)+.1)
+> plot(mod)
+> ## Looks rather like log-link with Poisson error and logarithmic biomass
+> mod <- MOStest(log(mass), spno, family=quasipoisson)
+> mod
+
+Mitchell-Olds and Shaw test
+Null: hump of a quadratic linear predictor is at min or max
+
+Family: quasipoisson 
+Link function: log 
+
+     min     hump      max 
+4.941642 6.243371 7.816014 
+
+            min/max      F  Pr(>F)  
+hump at min  4.9416 7.1367 0.02174 *
+hump at max  7.8160 9.0487 0.01191 *
+Combined                   0.03338 *
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> plot(mod)
+> par(op)
+> ## Confidence Limits
+> fieller.MOStest(mod)
+   2.5 %   97.5 % 
+5.255827 6.782979 
+> confint(mod)
+   2.5 %   97.5 % 
+5.816021 6.574378 
+> plot(profile(mod))
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("RsquareAdj")
+> ### * RsquareAdj
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: RsquareAdj
+> ### Title: Adjusted R-square
+> ### Aliases: RsquareAdj RsquareAdj.default RsquareAdj.rda RsquareAdj.cca
+> ###   RsquareAdj.lm RsquareAdj.glm
+> ### Keywords: univar multivariate
+> 
+> ### ** Examples
+> 
+> data(mite)
+> data(mite.env)
+> ## rda
+> m <- rda(decostand(mite, "hell") ~  ., mite.env)
+> RsquareAdj(m)
+$r.squared
+[1] 0.5265047
+
+$adj.r.squared
+[1] 0.4367038
+
+> ## cca
+> m <- cca(decostand(mite, "hell") ~  ., mite.env)
+> RsquareAdj(m)
+$r.squared
+[1] 0.4471676
+
+$adj.r.squared
+[1] 0.34442
+
+> ## default method
+> RsquareAdj(0.8, 20, 5)
+[1] 0.7285714
+> 
+> 
+> 
+> cleanEx()
+> nameEx("SSarrhenius")
+> ### * SSarrhenius
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: SSarrhenius
+> ### Title: Self-Starting nls Species-Area Models
+> ### Aliases: SSarrhenius SSlomolino SSgitay SSgleason
+> ### Keywords: models
+> 
+> ### ** Examples
+> 
+> ## Get species area data: sipoo.area gives the areas of islands
+> example(sipoo)
+
+sipoo> data(sipoo)
+
+sipoo> ## Areas of the islands in hectares
+sipoo> sipoo.area <-  c(1.1, 2.1, 2.2, 3.1, 3.5, 5.8, 6, 6.1, 6.5, 11.4, 13,
+sipoo+ 14.5, 16.1 ,17.5, 28.7, 40.5, 104.5, 233) 
+> S <- specnumber(sipoo)
+> plot(S ~ sipoo.area, xlab = "Island Area (ha)", ylab = "Number of Species",
++     ylim = c(1, max(S)))
+> ## The Arrhenius model
+> marr <- nls(S ~ SSarrhenius(sipoo.area, k, z))
+> marr
+Nonlinear regression model
+  model: S ~ SSarrhenius(sipoo.area, k, z)
+   data: parent.frame()
+     k      z 
+3.4062 0.4364 
+ residual sum-of-squares: 78.1
+
+Number of iterations to convergence: 5 
+Achieved convergence tolerance: 1.056e-06
+> ## confidence limits from profile likelihood
+> confint(marr)
+Waiting for profiling to be done...
+       2.5%     97.5%
+k 2.6220312 4.3033906
+z 0.3813576 0.4944693
+> ## draw a line
+> xtmp <- seq(min(sipoo.area), max(sipoo.area), len=51)
+> lines(xtmp, predict(marr, newdata=data.frame(sipoo.area = xtmp)), lwd=2)
+> ## The normal way is to use linear regression on log-log data,
+> ## but this will be different from the previous:
+> mloglog <- lm(log(S) ~ log(sipoo.area))
+> mloglog
+
+Call:
+lm(formula = log(S) ~ log(sipoo.area))
+
+Coefficients:
+    (Intercept)  log(sipoo.area)  
+         1.0111           0.4925  
+
+> lines(xtmp, exp(predict(mloglog, newdata=data.frame(sipoo.area=xtmp))),
++    lty=2)
+> ## Gleason: log-linear
+> mgle <- nls(S ~ SSgleason(sipoo.area, k, slope))
+> lines(xtmp, predict(mgle, newdata=data.frame(sipoo.area=xtmp)),
++   lwd=2, col=2)
+> ## Gitay: quadratic of log-linear
+> mgit <- nls(S ~ SSgitay(sipoo.area, k, slope))
+> lines(xtmp, predict(mgit, newdata=data.frame(sipoo.area=xtmp)), 
++   lwd=2, col = 3)
+> ## Lomolino: using original names of the parameters (Lomolino 2000):
+> mlom <- nls(S ~ SSlomolino(sipoo.area, Smax, A50, Hill))
+> mlom
+Nonlinear regression model
+  model: S ~ SSlomolino(sipoo.area, Smax, A50, Hill)
+   data: parent.frame()
+  Smax    A50   Hill 
+53.493 94.697  2.018 
+ residual sum-of-squares: 55.37
+
+Number of iterations to convergence: 6 
+Achieved convergence tolerance: 9.715e-07
+> lines(xtmp, predict(mlom, newdata=data.frame(sipoo.area=xtmp)), 
++   lwd=2, col = 4)
+> ## One canned model of standard R:
+> mmic <- nls(S ~ SSmicmen(sipoo.area, slope, Asym))
+> lines(xtmp, predict(mmic, newdata = data.frame(sipoo.area=xtmp)),
++   lwd =2, col = 5)
+> legend("bottomright", c("Arrhenius", "log-log linear", "Gleason", "Gitay", 
++   "Lomolino", "Michaelis-Menten"), col=c(1,1,2,3,4,5), lwd=c(2,1,2,2,2,2), 
++    lty=c(1,2,1,1,1,1))
+> ## compare models (AIC)
+> allmods <- list(Arrhenius = marr, Gleason = mgle, Gitay = mgit, 
++    Lomolino = mlom, MicMen= mmic)
+> sapply(allmods, AIC)
+Arrhenius   Gleason     Gitay  Lomolino    MicMen 
+ 83.49847  96.94018  80.54984  79.30718  83.02003 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("add1.cca")
+> ### * add1.cca
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: add1.cca
+> ### Title: Add or Drop Single Terms to a Constrained Ordination Model
+> ### Aliases: add1.cca drop1.cca
+> ### Keywords: multivariate models
+> 
+> ### ** Examples
+> 
+> data(dune)
+> data(dune.env)
+> ## Automatic model building based on AIC but with permutation tests
+> step(cca(dune ~  1, dune.env), reformulate(names(dune.env)), test="perm")
+Start:  AIC=87.66
+dune ~ 1
+
+             Df    AIC      F Pr(>F)   
++ Moisture    3 86.608 2.2536  0.005 **
++ Management  3 86.935 2.1307  0.005 **
++ A1          1 87.411 2.1400  0.025 * 
+<none>          87.657                 
++ Manure      4 88.832 1.5251  0.045 * 
++ Use         2 89.134 1.1431  0.295   
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Step:  AIC=86.61
+dune ~ Moisture
+
+             Df    AIC      F Pr(>F)   
+<none>          86.608                 
++ Management  3 86.813 1.4565  0.045 * 
++ A1          1 86.992 1.2624  0.150   
++ Use         2 87.259 1.2760  0.120   
++ Manure      4 87.342 1.3143  0.040 * 
+- Moisture    3 87.657 2.2536  0.010 **
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+Call: cca(formula = dune ~ Moisture, data = dune.env)
+
+              Inertia Proportion Rank
+Total          2.1153     1.0000     
+Constrained    0.6283     0.2970    3
+Unconstrained  1.4870     0.7030   16
+Inertia is mean squared contingency coefficient 
+
+Eigenvalues for constrained axes:
+  CCA1   CCA2   CCA3 
+0.4187 0.1330 0.0766 
+
+Eigenvalues for unconstrained axes:
+   CA1    CA2    CA3    CA4    CA5    CA6    CA7    CA8    CA9   CA10   CA11 
+0.4098 0.2259 0.1761 0.1234 0.1082 0.0908 0.0859 0.0609 0.0566 0.0467 0.0419 
+  CA12   CA13   CA14   CA15   CA16 
+0.0201 0.0143 0.0099 0.0085 0.0080 
+
+> ## see ?ordistep to do the same, but based on permutation P-values
+> ## Not run: 
+> ##D ordistep(cca(dune ~  1, dune.env), reformulate(names(dune.env)), perm.max=200)
+> ## End(Not run)
+> ## Manual model building
+> ## -- define the maximal model for scope
+> mbig <- rda(dune ~  ., dune.env)
+> ## -- define an empty model to start with
+> m0 <- rda(dune ~ 1, dune.env)
+> ## -- manual selection and updating
+> add1(m0, scope=formula(mbig), test="perm")
+           Df    AIC      F Pr(>F)   
+<none>        89.620                 
+A1          1 89.591 1.9217  0.060 . 
+Moisture    3 87.707 2.5883  0.005 **
+Management  3 87.082 2.8400  0.005 **
+Use         2 91.032 1.1741  0.280   
+Manure      4 89.232 1.9539  0.015 * 
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> m0 <- update(m0, . ~ . + Management)
+> add1(m0, scope=formula(mbig), test="perm")
+         Df    AIC      F Pr(>F)   
+<none>      87.082                 
+A1        1 87.424 1.2965  0.175   
+Moisture  3 85.567 1.9764  0.005 **
+Use       2 88.284 1.0510  0.440   
+Manure    3 87.517 1.3902  0.095 . 
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> m0 <- update(m0, . ~ . + Moisture)
+> ## -- included variables still significant?
+> drop1(m0, test="perm")
+           Df    AIC      F Pr(>F)   
+<none>        85.567                 
+Management  3 87.707 2.1769  0.010 **
+Moisture    3 87.082 1.9764  0.005 **
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> add1(m0, scope=formula(mbig), test="perm")
+       Df    AIC      F Pr(>F)
+<none>    85.567              
+A1      1 86.220 0.8359  0.645
+Use     2 86.842 0.8027  0.700
+Manure  3 85.762 1.1225  0.320
+> 
+> 
+> 
+> cleanEx()
+> nameEx("adipart")
+> ### * adipart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: adipart
+> ### Title: Additive Diversity Partitioning and Hierarchical Null Model
+> ###   Testing
+> ### Aliases: adipart adipart.default adipart.formula hiersimu
+> ###   hiersimu.default hiersimu.formula
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> ## NOTE: 'nsimul' argument usually needs to be >= 99
+> ## here much lower value is used for demonstration
+> 
+> data(mite)
+> data(mite.xy)
+> data(mite.env)
+> ## Function to get equal area partitions of the mite data
+> cutter <- function (x, cut = seq(0, 10, by = 2.5)) {
++     out <- rep(1, length(x))
++     for (i in 2:(length(cut) - 1))
++         out[which(x > cut[i] & x <= cut[(i + 1)])] <- i
++     return(out)}
+> ## The hierarchy of sample aggregation
+> levsm <- with(mite.xy, data.frame(
++     l1=1:nrow(mite),
++     l2=cutter(y, cut = seq(0, 10, by = 2.5)),
++     l3=cutter(y, cut = seq(0, 10, by = 5)),
++     l4=cutter(y, cut = seq(0, 10, by = 10))))
+> ## Let's see in a map
+> par(mfrow=c(1,3))
+> plot(mite.xy, main="l1", col=as.numeric(levsm$l1)+1, asp = 1)
+> plot(mite.xy, main="l2", col=as.numeric(levsm$l2)+1, asp = 1)
+> plot(mite.xy, main="l3", col=as.numeric(levsm$l3)+1, asp = 1)
+> par(mfrow=c(1,1))
+> ## Additive diversity partitioning
+> adipart(mite, index="richness", nsimul=19)
+adipart object
+
+Call: adipart(y = mite, index = "richness", nsimul = 19)
+
+nullmodel method ‘r2dtable’ with 19 simulations
+options:  index richness, weights unif
+alternative hypothesis: statistic is less or greater than simulated values
+
+        statistic    SES   mean   2.5%    50%  97.5% Pr(sim.)  
+alpha.1    15.114 -38.43 22.344 22.032 22.300 22.608     0.05 *
+gamma      35.000   0.00 35.000 35.000 35.000 35.000     1.00  
+beta.1     19.886  38.43 12.656 12.392 12.700 12.968     0.05 *
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> adipart(mite ~ ., levsm, index="richness", nsimul=19)
+adipart object
+
+Call: adipart(formula = mite ~ ., data = levsm, index = "richness",
+nsimul = 19)
+
+nullmodel method ‘r2dtable’ with 19 simulations
+options:  index richness, weights unif
+alternative hypothesis: statistic is less or greater than simulated values
+
+        statistic      SES     mean     2.5%      50%   97.5% Pr(sim.)  
+alpha.1    15.114 -46.2370 22.39624 22.12571 22.44286 22.6236     0.05 *
+alpha.2    29.750 -21.7076 34.81579 34.36250 35.00000 35.0000     0.05 *
+alpha.3    33.000   0.0000 35.00000 35.00000 35.00000 35.0000     0.05 *
+gamma      35.000   0.0000 35.00000 35.00000 35.00000 35.0000     1.00  
+beta.1     14.636   9.0407 12.41955 12.00750 12.42857 12.8743     0.05 *
+beta.2      3.250  13.1373  0.18421  0.00000  0.00000  0.6375     0.05 *
+beta.3      2.000   0.0000  0.00000  0.00000  0.00000  0.0000     0.05 *
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> ## Hierarchical null model testing
+> ## diversity analysis (similar to adipart)
+> hiersimu(mite, FUN=diversity, relative=TRUE, nsimul=19)
+hiersimu object
+
+Call: hiersimu(y = mite, FUN = diversity, relative = TRUE, nsimul = 19)
+
+nullmodel method ‘r2dtable’ with 19 simulations
+
+alternative hypothesis: statistic is less or greater than simulated values
+
+        statistic     SES    mean    2.5%     50%  97.5% Pr(sim.)  
+level_1   0.76064 -71.195 0.93904 0.93487 0.93856 0.9444     0.05 *
+leve_2    1.00000   0.000 1.00000 1.00000 1.00000 1.0000     1.00  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> hiersimu(mite ~., levsm, FUN=diversity, relative=TRUE, nsimul=19)
+hiersimu object
+
+Call: hiersimu(formula = mite ~ ., data = levsm, FUN = diversity,
+relative = TRUE, nsimul = 19)
+
+nullmodel method ‘r2dtable’ with 19 simulations
+
+alternative hypothesis: statistic is less or greater than simulated values
+
+   statistic      SES    mean    2.5%     50%  97.5% Pr(sim.)  
+l1   0.76064  -75.139 0.93833 0.93389 0.93819 0.9427     0.05 *
+l2   0.89736 -110.968 0.99811 0.99699 0.99814 0.9999     0.05 *
+l3   0.92791 -417.338 0.99940 0.99904 0.99943 0.9996     0.05 *
+l4   1.00000    0.000 1.00000 1.00000 1.00000 1.0000     1.00  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> ## Hierarchical testing with the Morisita index
+> morfun <- function(x) dispindmorisita(x)$imst
+> hiersimu(mite ~., levsm, morfun, drop.highest=TRUE, nsimul=19)
+hiersimu object
+
+Call: hiersimu(formula = mite ~ ., data = levsm, FUN = morfun,
+drop.highest = TRUE, nsimul = 19)
+
+nullmodel method ‘r2dtable’ with 19 simulations
+
+alternative hypothesis: statistic is less or greater than simulated values
+
+   statistic     SES      mean      2.5%       50%   97.5% Pr(sim.)  
+l1   0.52070  8.5216  0.353253  0.322624  0.351073  0.3848     0.05 *
+l2   0.60234 14.3854  0.153047  0.096700  0.150434  0.1969     0.05 *
+l3   0.67509 20.3162 -0.182473 -0.234793 -0.195937 -0.0988     0.05 *
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("adonis")
+> ### * adonis
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: adonis
+> ### Title: Permutational Multivariate Analysis of Variance Using Distance
+> ###   Matrices
+> ### Aliases: adonis adonis2
+> ### Keywords: multivariate nonparametric
+> 
+> ### ** Examples
+> 
+> data(dune)
+> data(dune.env)
+> ## default test by terms
+> adonis2(dune ~ Management*A1, data = dune.env)
+Permutation test for adonis under reduced model
+Terms added sequentially (first to last)
+Permutation: free
+Number of permutations: 999
+
+adonis2(formula = dune ~ Management * A1, data = dune.env)
+              Df SumOfSqs      F Pr(>F)   
+Management     3  1.46859 3.2629  0.002 **
+A1             1  0.44089 2.9387  0.022 * 
+Management:A1  3  0.58918 1.3090  0.191   
+Residual      12  1.80036                 
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> ## overall tests
+> adonis2(dune ~ Management*A1, data = dune.env, by = NULL)
+Permutation test for adonis under reduced model
+Permutation: free
+Number of permutations: 999
+
+adonis2(formula = dune ~ Management * A1, data = dune.env, by = NULL)
+         Df SumOfSqs      F Pr(>F)   
+Model     7   2.4987 2.3792  0.003 **
+Residual 12   1.8004                 
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> ### Example of use with strata, for nested (e.g., block) designs.
+> dat <- expand.grid(rep=gl(2,1), NO3=factor(c(0,10)),field=gl(3,1) )
+> dat
+   rep NO3 field
+1    1   0     1
+2    2   0     1
+3    1  10     1
+4    2  10     1
+5    1   0     2
+6    2   0     2
+7    1  10     2
+8    2  10     2
+9    1   0     3
+10   2   0     3
+11   1  10     3
+12   2  10     3
+> Agropyron <- with(dat, as.numeric(field) + as.numeric(NO3)+2) +rnorm(12)/2
+> Schizachyrium <- with(dat, as.numeric(field) - as.numeric(NO3)+2) +rnorm(12)/2
+> total <- Agropyron + Schizachyrium
+> dotplot(total ~ NO3, dat, jitter.x=TRUE, groups=field,
++         type=c('p','a'), xlab="NO3", auto.key=list(columns=3, lines=TRUE) )
+> 
+> Y <- data.frame(Agropyron, Schizachyrium)
+> mod <- metaMDS(Y)
+Run 0 stress 0.06065252 
+Run 1 stress 0.06065252 
+... New best solution
+... Procrustes: rmse 3.164024e-06  max resid 6.043669e-06 
+... Similar to previous best
+Run 2 stress 0.06065252 
+... Procrustes: rmse 1.938469e-06  max resid 3.61423e-06 
+... Similar to previous best
+Run 3 stress 0.142919 
+Run 4 stress 0.1670077 
+Run 5 stress 0.175151 
+Run 6 stress 0.1751507 
+Run 7 stress 0.06065252 
+... Procrustes: rmse 3.943561e-06  max resid 7.519499e-06 
+... Similar to previous best
+Run 8 stress 0.06065252 
+... New best solution
+... Procrustes: rmse 2.172863e-06  max resid 4.032152e-06 
+... Similar to previous best
+Run 9 stress 0.1820814 
+Run 10 stress 0.06065252 
+... New best solution
+... Procrustes: rmse 1.026253e-06  max resid 1.4719e-06 
+... Similar to previous best
+Run 11 stress 0.06065252 
+... New best solution
+... Procrustes: rmse 1.828471e-06  max resid 3.763468e-06 
+... Similar to previous best
+Run 12 stress 0.06065252 
+... Procrustes: rmse 3.138136e-06  max resid 6.223657e-06 
+... Similar to previous best
+Run 13 stress 0.06065252 
+... Procrustes: rmse 3.415889e-06  max resid 6.880638e-06 
+... Similar to previous best
+Run 14 stress 0.06065252 
+... Procrustes: rmse 3.066271e-06  max resid 5.908388e-06 
+... Similar to previous best
+Run 15 stress 0.06065252 
+... Procrustes: rmse 1.945053e-06  max resid 3.557283e-06 
+... Similar to previous best
+Run 16 stress 0.06065252 
+... Procrustes: rmse 5.441366e-06  max resid 9.82099e-06 
+... Similar to previous best
+Run 17 stress 0.1820814 
+Run 18 stress 0.1659224 
+Run 19 stress 0.1820814 
+Run 20 stress 0.2291418 
+*** Solution reached
+> plot(mod)
+> ### Ellipsoid hulls show treatment
+> with(dat, ordiellipse(mod, field, kind = "ehull", label = TRUE))
+> ### Spider shows fields
+> with(dat, ordispider(mod, field, lty=3, col="red"))
+> 
+> ### Incorrect (no strata)
+> perm <- how(nperm = 199)
+> adonis2 (Y ~ NO3, data = dat, permutations = perm)
+Permutation test for adonis under reduced model
+Terms added sequentially (first to last)
+Permutation: free
+Number of permutations: 199
+
+adonis2(formula = Y ~ NO3, data = dat, permutations = perm)
+         Df SumOfSqs      F Pr(>F)  
+NO3       1 0.036334 3.5509   0.04 *
+Residual 10 0.102324                
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> ## Correct with strata
+> setBlocks(perm) <- with(dat, field)
+> adonis2(Y ~ NO3, data = dat, permutations = perm)
+Permutation test for adonis under reduced model
+Terms added sequentially (first to last)
+Blocks:  with(dat, field) 
+Permutation: free
+Number of permutations: 199
+
+adonis2(formula = Y ~ NO3, data = dat, permutations = perm)
+         Df SumOfSqs      F Pr(>F)  
+NO3       1 0.036334 3.5509   0.02 *
+Residual 10 0.102324                
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> 
+> 
+> cleanEx()
+> nameEx("anosim")
+> ### * anosim
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: anosim
+> ### Title: Analysis of Similarities
+> ### Aliases: anosim summary.anosim plot.anosim
+> ### Keywords: multivariate nonparametric htest
+> 
+> ### ** Examples
+> 
+> data(dune)
+> data(dune.env)
+> dune.dist <- vegdist(dune)
+> attach(dune.env)
+> dune.ano <- anosim(dune.dist, Management)
+> summary(dune.ano)
+
+Call:
+anosim(dat = dune.dist, grouping = Management) 
+Dissimilarity: bray 
+
+ANOSIM statistic R: 0.2579 
+      Significance: 0.017 
+
+Permutation: free
+Number of permutations: 999
+
+Upper quantiles of permutations (null model):
+  90%   95% 97.5%   99% 
+0.121 0.174 0.222 0.276 
+
+Dissimilarity ranks between and within classes:
+        0%   25%    50%     75%  100%   N
+Between  4 58.50 104.00 145.500 188.0 147
+BF       5 15.25  25.50  41.250  57.0   3
+HF       1  7.25  46.25  68.125  89.5  10
+NM       6 64.75 124.50 156.250 181.0  15
+SF       3 32.75  53.50  99.250 184.0  15
+
+> plot(dune.ano)
+Warning in bxp(list(stats = c(4, 58.5, 104, 145.5, 188, 5, 15.25, 25.5,  :
+  some notches went outside hinges ('box'): maybe set notch=FALSE
+> 
+> 
+> 
+> cleanEx()
+
+detaching ‘dune.env’
+
+> nameEx("anova.cca")
+> ### * anova.cca
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: anova.cca
+> ### Title: Permutation Test for Constrained Correspondence Analysis,
+> ###   Redundancy Analysis and Constrained Analysis of Principal Coordinates
+> ### Aliases: anova.cca permutest permutest.cca
+> ### Keywords: multivariate htest
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> data(varechem)
+> vare.cca <- cca(varespec ~ Al + P + K, varechem)
+> ## overall test
+> anova(vare.cca)
+Permutation test for cca under reduced model
+Permutation: free
+Number of permutations: 999
+
+Model: cca(formula = varespec ~ Al + P + K, data = varechem)
+         Df ChiSquare     F Pr(>F)    
+Model     3   0.64413 2.984  0.001 ***
+Residual 20   1.43906                 
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> 
+> 
+> cleanEx()
+> nameEx("as.mlm")
+> ### * as.mlm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: as.mlm.cca
+> ### Title: Refit Constrained Ordination as a Multiple Response Linear Model
+> ### Aliases: as.mlm as.mlm.cca as.mlm.rda
+> ### Keywords: models multivariate
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> data(varechem)
+> mod <- cca(varespec ~ Al + P + K, data=varechem)
+> lmod <- as.mlm(mod)
+> ## Coefficients
+> lmod
+
+Call:
+lm(formula = wa ~ . - 1, data = as.data.frame(X))
+
+Coefficients:
+    CCA1       CCA2       CCA3     
+Al   0.007479  -0.001884   0.003381
+P   -0.006491  -0.102190  -0.022307
+K   -0.006756   0.015344   0.017067
+
+> coef(mod)
+           CCA1         CCA2         CCA3
+Al  0.007478556 -0.001883637  0.003380774
+P  -0.006491081 -0.102189737 -0.022306682
+K  -0.006755568  0.015343662  0.017067351
+> ## Influential observations
+> influence.measures(lmod)
+Influence measures of
+	 lm(formula = wa ~ . - 1, data = as.data.frame(X)) :
+
+      dfb.Al    dfb.P    dfb.K     CCA1    CCA2      CCA3  cov.r   CCA1.1
+18 -0.251387  0.00976 -0.06310  0.27401  0.1806 -0.118754 0.0265 7.38e-03
+15  0.099858  0.13864 -0.11781 -0.16542 -0.0935  0.006898 0.0319 2.86e-03
+24 -0.003448 -0.44078  0.20788 -0.48239 -0.1750 -0.260788 0.0307 2.33e-02
+27  0.071682 -0.01707 -0.03516 -0.10185 -0.1676  0.022271 0.0406 1.13e-03
+23 -0.116533  0.06900 -0.02545  0.14407  0.2918 -0.220457 0.0355 2.23e-03
+19 -0.007394 -0.01169  0.01080  0.01360 -0.2318 -0.000417 0.0359 2.02e-05
+22  0.150916  0.14845 -0.13091 -0.20466  0.3815  0.168914 0.0376 4.50e-03
+16  0.107456  0.17900 -0.09917 -0.21196  0.2250  0.194432 0.0338 4.75e-03
+28  0.332161 -0.34398 -0.05414 -0.67745  0.0742  0.620990 0.0364 4.65e-02
+13  0.366880 -1.00834  1.23685  1.33919  0.4102  0.277067 0.1124 1.89e-01
+14  0.024147  0.02512 -0.01161 -0.03608  0.1491  0.053638 0.0355 1.42e-04
+20  0.000747 -0.00560  0.00205 -0.00661  0.2935 -0.190351 0.0368 4.77e-06
+25  0.166736 -0.11049  0.09341 -0.20954 -0.1627 -0.070753 0.0346 4.66e-03
+7  -0.397145  0.15747  0.15662 -0.59116  0.5842 -0.838287 0.0327 3.51e-02
+5  -0.279996 -0.09119 -0.35616  0.73579  0.3694 -0.326563 0.0281 5.18e-02
+6   0.003191 -0.00168 -0.01550  0.02590  0.3447  0.201072 0.0400 7.34e-05
+3  -0.302851 -0.07889  0.25932 -0.41958 -0.2766  0.536017 0.0386 1.85e-02
+4  -0.058151 -0.02719  0.00870 -0.06644  0.8199  0.131003 0.0486 4.83e-04
+2   0.020380  0.00416 -0.00373  0.02055 -0.4158 -0.160401 0.0395 4.62e-05
+9   0.074217  0.09551 -0.10857  0.12712 -0.3481  0.644579 0.0383 1.75e-03
+12 -0.097825 -0.20830  0.04637  0.28644 -0.6601  0.270324 0.0280 8.19e-03
+10  0.149178  0.66594 -0.12975  0.89348 -0.2510  0.000571 0.0118 5.90e-02
+11  0.014687  0.00691  0.00105  0.01913  0.1838 -0.301086 0.0377 4.00e-05
+21  0.148213  0.15461 -0.02915 -0.25306 -0.1892 -0.318491 0.0361 6.81e-03
+     CCA2.1   CCA3.1    hat inf
+18 0.003207 1.39e-03 0.0321    
+15 0.000915 4.98e-06 0.0295    
+24 0.003071 6.82e-03 0.1135    
+27 0.003062 5.41e-05 0.1375    
+23 0.009151 5.22e-03 0.0555    
+19 0.005873 1.90e-08 0.0176    
+22 0.015648 3.07e-03 0.1077    
+16 0.005348 3.99e-03 0.0594    
+28 0.000559 3.91e-02 0.2256    
+13 0.017773 8.11e-03 0.7168   *
+14 0.002424 3.13e-04 0.0158    
+20 0.009421 3.96e-03 0.0393    
+25 0.002810 5.31e-04 0.0670    
+7  0.034274 7.06e-02 0.1635    
+5  0.013057 1.02e-02 0.1588    
+6  0.012996 4.42e-03 0.1169    
+3  0.008056 3.02e-02 0.1833    
+4  0.073491 1.88e-03 0.2741    
+2  0.018909 2.81e-03 0.1063    
+9  0.013158 4.51e-02 0.0978    
+12 0.043487 7.29e-03 0.0409    
+10 0.004658 2.41e-08 0.0768    
+11 0.003694 9.91e-03 0.0632    
+21 0.003807 1.08e-02 0.1009    
+> plot(mod, type = "n")
+> points(mod, cex = 10*hatvalues(lmod), pch=16, xpd = TRUE)
+> text(mod, display = "bp", col = "blue") 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("beals")
+> ### * beals
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: beals
+> ### Title: Beals Smoothing and Degree of Absence
+> ### Aliases: beals swan
+> ### Keywords: manip smooth
+> 
+> ### ** Examples
+> 
+> data(dune)
+> ## Default
+> x <- beals(dune)
+> ## Remove target species
+> x <- beals(dune, include = FALSE)
+> ## Smoothed values against presence or absence of species
+> pa <- decostand(dune, "pa")
+> boxplot(as.vector(x) ~ unlist(pa), xlab="Presence", ylab="Beals")
+> ## Remove the bias of tarbet species: Yields lower values.
+> beals(dune, type =3, include = FALSE)
+     Achimill   Agrostol   Airaprae  Alopgeni   Anthodor  Bellpere   Bromhord
+1  0.49590853 0.38333415 0.01157407 0.4923280 0.30827883 0.4935662 0.43263047
+2  0.47083676 0.39501120 0.03361524 0.4718807 0.34723984 0.4917791 0.42000984
+3  0.34063019 0.52738394 0.01520046 0.5309152 0.21609954 0.4033301 0.33010938
+4  0.30816435 0.51198853 0.02876960 0.5971801 0.21542662 0.4398775 0.35732610
+5  0.59949785 0.27622698 0.06632771 0.3349203 0.48876285 0.4322142 0.44309579
+6  0.58819821 0.26299306 0.05967771 0.2700508 0.53154426 0.3696613 0.39760652
+7  0.56496165 0.29412293 0.05329633 0.3403047 0.48010987 0.4051777 0.40471531
+8  0.21230502 0.66906674 0.02588333 0.5187956 0.16247716 0.2720122 0.21219877
+9  0.30323659 0.59744543 0.02213662 0.5792855 0.21896113 0.3292320 0.28613526
+10 0.54083871 0.26902092 0.07349127 0.3372958 0.42671693 0.4705094 0.42934344
+11 0.40509331 0.31656550 0.10259239 0.3185489 0.38766111 0.3713794 0.31413659
+12 0.21008725 0.66278454 0.03625297 0.5753377 0.20078932 0.2802946 0.22974415
+13 0.21850759 0.68239707 0.02191119 0.6404427 0.16737280 0.2939740 0.24942466
+14 0.13570397 0.76284476 0.02298398 0.4107645 0.12128973 0.1682755 0.13757552
+15 0.09168815 0.79412733 0.02538032 0.4505613 0.10117099 0.1420251 0.09794548
+16 0.06335463 0.87877202 0.00742115 0.5232448 0.05538377 0.1516354 0.09458531
+17 0.55254140 0.07330247 0.29233391 0.1013889 0.69331132 0.3129358 0.34982363
+18 0.37751017 0.34451209 0.08535723 0.2838834 0.36918166 0.3676424 0.30478244
+19 0.29826049 0.25952255 0.35137675 0.1934048 0.51929869 0.2237843 0.18074796
+20 0.05429986 0.76675441 0.06144615 0.4063662 0.10738280 0.1450721 0.06706410
+      Chenalbu   Cirsarve    Comapalu   Eleopalu  Elymrepe   Empenigr
+1  0.025132275 0.09504980 0.000000000 0.05592045 0.4667439 0.00000000
+2  0.043866562 0.08570299 0.026548839 0.08656209 0.4407282 0.01829337
+3  0.065338638 0.08967477 0.031898812 0.16099072 0.4137888 0.01074444
+4  0.057970906 0.12920228 0.039859621 0.16112450 0.4399661 0.02527165
+5  0.026434737 0.05520104 0.015892090 0.05419613 0.3575948 0.03029752
+6  0.021256367 0.03223112 0.030347896 0.08784329 0.3138879 0.03093489
+7  0.038467708 0.04706743 0.017083997 0.06694311 0.3586644 0.02304603
+8  0.063278453 0.06688407 0.100703044 0.29777644 0.3046956 0.02102222
+9  0.069879277 0.07647268 0.045830682 0.19018562 0.3523460 0.01838883
+10 0.025686639 0.06037513 0.029746617 0.07787078 0.3736128 0.03425596
+11 0.021234732 0.05778318 0.035740922 0.11146095 0.2884798 0.07310076
+12 0.103543341 0.07799259 0.045375827 0.19518888 0.3354080 0.03413656
+13 0.122547745 0.07905124 0.056084315 0.22437598 0.3511708 0.01840390
+14 0.042990591 0.03618335 0.241811837 0.55982776 0.1428372 0.01989756
+15 0.035609053 0.04022968 0.198176675 0.53973883 0.1462975 0.02215971
+16 0.056246994 0.05184498 0.201352298 0.51523810 0.1832397 0.00742115
+17 0.007716049 0.01049383 0.009876543 0.02777778 0.1929470 0.21968254
+18 0.014640428 0.04454602 0.042890320 0.17341352 0.2651538 0.06763669
+19 0.019591245 0.03668466 0.031845637 0.12592768 0.1422725 0.26011417
+20 0.037623741 0.03453783 0.185726965 0.58476297 0.1168700 0.05905666
+     Hyporadi   Juncarti  Juncbufo  Lolipere   Planlanc   Poaprat   Poatriv
+1  0.07702746 0.14794933 0.1987270 0.9226190 0.40103107 0.9863946 0.8826329
+2  0.07454127 0.13017869 0.2070478 0.8272395 0.40700777 0.8972046 0.8288385
+3  0.05562332 0.22291082 0.2544828 0.7205525 0.27933493 0.8083020 0.8383185
+4  0.06985986 0.21320122 0.2318440 0.7197924 0.25797285 0.7940926 0.8197302
+5  0.10245961 0.10406655 0.2164230 0.8380779 0.52628928 0.9035899 0.8094632
+6  0.11463153 0.11631772 0.2166255 0.8000021 0.58765018 0.8666677 0.7782619
+7  0.10837376 0.11293676 0.2110045 0.8053380 0.51905808 0.8925059 0.8018775
+8  0.06550319 0.33219882 0.2323566 0.5403355 0.20596764 0.6160461 0.7101299
+9  0.05343787 0.23134366 0.2675624 0.6874068 0.25274756 0.7523318 0.8247374
+10 0.13692492 0.09080902 0.1678040 0.8102783 0.52588347 0.8915882 0.7543592
+11 0.18108995 0.13478872 0.1656396 0.7180948 0.47012501 0.8062720 0.6404351
+12 0.06777311 0.27306206 0.3231724 0.5875943 0.22110550 0.6932541 0.8199960
+13 0.04250245 0.28204736 0.3339728 0.5714581 0.18153869 0.7063028 0.7993754
+14 0.04665747 0.46685537 0.1206518 0.3356311 0.14342002 0.3817081 0.5090703
+15 0.05040404 0.51561767 0.1370235 0.3689922 0.13523214 0.4078219 0.5263520
+16 0.01731602 0.54304667 0.1776781 0.3561752 0.07269979 0.4124222 0.6071083
+17 0.36492870 0.03333333 0.1038156 0.5858415 0.59641331 0.7434618 0.5036834
+18 0.17491099 0.18956922 0.1376386 0.7124388 0.45087176 0.7368632 0.5859071
+19 0.39145281 0.13543701 0.1127832 0.4289185 0.40784415 0.5548077 0.3605827
+20 0.07795311 0.53056145 0.1192488 0.3262685 0.13059496 0.3662817 0.4523029
+     Ranuflam  Rumeacet  Sagiproc   Salirepe  Scorautu   Trifprat  Trifrepe
+1  0.08105273 0.3160963 0.3371121 0.02729885 0.8898317 0.21701279 0.8782576
+2  0.13042865 0.3031318 0.3302063 0.05983781 0.9349640 0.20673650 0.9125666
+3  0.22632936 0.2909068 0.4204104 0.06065155 0.9036443 0.14654749 0.8817430
+4  0.21909541 0.2610006 0.4191908 0.07579199 0.9204237 0.12896524 0.8943213
+5  0.08063087 0.3979230 0.2612828 0.07589611 0.9576838 0.34808957 0.9142360
+6  0.10909966 0.4330705 0.2539380 0.08921540 0.9590466 0.35423465 0.9110822
+7  0.10541081 0.4113622 0.2954682 0.07094548 0.9550487 0.32489503 0.9171688
+8  0.40134447 0.2331043 0.4009544 0.11569906 0.8755515 0.09897600 0.8002526
+9  0.26006489 0.3464870 0.4531178 0.07351827 0.9145996 0.16269563 0.8714833
+10 0.10355742 0.3226025 0.2732735 0.09037489 0.9568824 0.26807372 0.9003730
+11 0.13269569 0.2753878 0.3673397 0.16465286 0.9442707 0.19982976 0.8979262
+12 0.29873222 0.3507140 0.5122033 0.08041977 0.9377963 0.13849854 0.9079979
+13 0.33309468 0.3107471 0.5131337 0.06572594 0.9255312 0.11199114 0.8841739
+14 0.64674225 0.1241545 0.2528665 0.15917563 0.8477706 0.06176123 0.6485949
+15 0.64449081 0.1459458 0.3151199 0.17750323 0.8430677 0.05831084 0.7170446
+16 0.66893881 0.1508409 0.3480368 0.15783292 0.8131968 0.03916718 0.6776273
+17 0.03549383 0.2913631 0.3292030 0.25651777 0.9839744 0.27593101 0.8141660
+18 0.18805395 0.2668100 0.3154533 0.17191937 0.9554011 0.20461193 0.8600701
+19 0.14551892 0.1831168 0.4798245 0.36429493 0.9902041 0.11966159 0.8147968
+20 0.62796060 0.1098600 0.3105433 0.21674174 0.8457313 0.03708580 0.6350394
+     Vicilath  Bracruta    Callcusp
+1  0.17244420 0.7476589 0.003527337
+2  0.18494940 0.7415172 0.034597921
+3  0.12833142 0.7666969 0.075789630
+4  0.12550967 0.7919786 0.081110164
+5  0.16693075 0.8079786 0.023129027
+6  0.18035860 0.8387650 0.040981168
+7  0.19027523 0.8089116 0.024070054
+8  0.10213052 0.8109194 0.201958942
+9  0.08630413 0.7972178 0.092982775
+10 0.23383453 0.7660374 0.033527777
+11 0.24317802 0.8182692 0.043950322
+12 0.08049055 0.8061715 0.100954127
+13 0.06604026 0.7465509 0.122856392
+14 0.07857237 0.7238162 0.347514804
+15 0.07370069 0.7997141 0.381379395
+16 0.03353260 0.8029953 0.364128496
+17 0.20728700 0.7635487 0.009876543
+18 0.26222869 0.8397471 0.109959916
+19 0.18188455 0.8161275 0.082361157
+20 0.09111967 0.8397124 0.397924041
+> ## Uses abundance information.
+> ## Vector with beals smoothing values corresponding to the first species
+> ## in dune.
+> beals(dune, species=1, include=TRUE) 
+        1         2         3         4         5         6         7         8 
+0.5923077 0.5032372 0.3499038 0.3306953 0.5944041 0.5928780 0.5824352 0.2082532 
+        9        10        11        12        13        14        15        16 
+0.2960799 0.5462492 0.3659392 0.2610043 0.1982372 0.0922619 0.1140625 0.1066506 
+       17        18        19        20 
+0.6020408 0.3844577 0.2865741 0.0750000 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("betadisper")
+> ### * betadisper
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: betadisper
+> ### Title: Multivariate homogeneity of groups dispersions (variances)
+> ### Aliases: betadisper scores.betadisper anova.betadisper plot.betadisper
+> ###   boxplot.betadisper TukeyHSD.betadisper eigenvals.betadisper
+> ###   ordimedian
+> ### Keywords: methods multivariate hplot
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> 
+> ## Bray-Curtis distances between samples
+> dis <- vegdist(varespec)
+> 
+> ## First 16 sites grazed, remaining 8 sites ungrazed
+> groups <- factor(c(rep(1,16), rep(2,8)), labels = c("grazed","ungrazed"))
+> 
+> ## Calculate multivariate dispersions
+> mod <- betadisper(dis, groups)
+> mod
+
+	Homogeneity of multivariate dispersions
+
+Call: betadisper(d = dis, group = groups)
+
+No. of Positive Eigenvalues: 15
+No. of Negative Eigenvalues: 8
+
+Average distance to median:
+  grazed ungrazed 
+  0.3926   0.2706 
+
+Eigenvalues for PCoA axes:
+ PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8 
+1.7552 1.1334 0.4429 0.3698 0.2454 0.1961 0.1751 0.1284 
+> 
+> ## Perform test
+> anova(mod)
+Analysis of Variance Table
+
+Response: Distances
+          Df  Sum Sq  Mean Sq F value  Pr(>F)  
+Groups     1 0.07931 0.079306  4.6156 0.04295 *
+Residuals 22 0.37801 0.017182                  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> ## Permutation test for F
+> permutest(mod, pairwise = TRUE, permutations = 99)
+
+Permutation test for homogeneity of multivariate dispersions
+Permutation: free
+Number of permutations: 99
+
+Response: Distances
+          Df  Sum Sq  Mean Sq      F N.Perm Pr(>F)  
+Groups     1 0.07931 0.079306 4.6156     99   0.04 *
+Residuals 22 0.37801 0.017182                       
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Pairwise comparisons:
+(Observed p-value below diagonal, permuted p-value above diagonal)
+          grazed ungrazed
+grazed               0.05
+ungrazed 0.04295         
+> 
+> ## Tukey's Honest Significant Differences
+> (mod.HSD <- TukeyHSD(mod))
+  Tukey multiple comparisons of means
+    95% family-wise confidence level
+
+Fit: aov(formula = distances ~ group, data = df)
+
+$group
+                      diff        lwr          upr     p adj
+ungrazed-grazed -0.1219422 -0.2396552 -0.004229243 0.0429502
+
+> plot(mod.HSD)
+> 
+> ## Plot the groups and distances to centroids on the
+> ## first two PCoA axes
+> plot(mod)
+> 
+> ## with data ellipses instead of hulls
+> plot(mod, ellipse = TRUE, hull = FALSE) # 1 sd data ellipse
+> plot(mod, ellipse = TRUE, hull = FALSE, conf = 0.90) # 90% data ellipse
+> 
+> ## can also specify which axes to plot, ordering respected
+> plot(mod, axes = c(3,1), seg.col = "forestgreen", seg.lty = "dashed")
+> 
+> ## Draw a boxplot of the distances to centroid for each group
+> boxplot(mod)
+> 
+> ## `scores` and `eigenvals` also work
+> scrs <- scores(mod)
+> str(scrs)
+List of 2
+ $ sites    : num [1:24, 1:2] 0.0946 -0.3125 -0.3511 -0.3291 -0.1926 ...
+  ..- attr(*, "dimnames")=List of 2
+  .. ..$ : chr [1:24] "18" "15" "24" "27" ...
+  .. ..$ : chr [1:2] "PCoA1" "PCoA2"
+ $ centroids: num [1:2, 1:2] -0.1455 0.2786 0.0758 -0.2111
+  ..- attr(*, "dimnames")=List of 2
+  .. ..$ : chr [1:2] "grazed" "ungrazed"
+  .. ..$ : chr [1:2] "PCoA1" "PCoA2"
+> head(scores(mod, 1:4, display = "sites"))
+         PCoA1       PCoA2        PCoA3        PCoA4
+18  0.09459373  0.15914576  0.074400844 -0.202466025
+15 -0.31248809  0.10032751 -0.062243360  0.110844864
+24 -0.35106507 -0.05954096 -0.038079447  0.095060928
+27 -0.32914546 -0.17019348  0.231623720  0.019110623
+23 -0.19259443 -0.01459250 -0.005679372 -0.209718312
+19 -0.06794575 -0.14501690 -0.085645653  0.002431355
+> # group centroids/medians 
+> scores(mod, 1:4, display = "centroids")
+              PCoA1       PCoA2       PCoA3      PCoA4
+grazed   -0.1455200  0.07584572 -0.01366220 -0.0178990
+ungrazed  0.2786095 -0.21114993 -0.03475586  0.0220129
+> # eigenvalues from the underlying principal coordinates analysis
+> eigenvals(mod) 
+     PCoA1      PCoA2      PCoA3      PCoA4      PCoA5      PCoA6      PCoA7 
+ 1.7552165  1.1334455  0.4429018  0.3698054  0.2453532  0.1960921  0.1751131 
+     PCoA8      PCoA9     PCoA10     PCoA11     PCoA12     PCoA13     PCoA14 
+ 0.1284467  0.0971594  0.0759601  0.0637178  0.0583225  0.0394934  0.0172699 
+    PCoA15     PCoA16     PCoA17     PCoA18     PCoA19     PCoA20     PCoA21 
+ 0.0051011 -0.0004131 -0.0064654 -0.0133147 -0.0253944 -0.0375105 -0.0480069 
+    PCoA22     PCoA23 
+-0.0537146 -0.0741390 
+> 
+> ## try out bias correction; compare with mod3
+> (mod3B <- betadisper(dis, groups, type = "median", bias.adjust=TRUE))
+
+	Homogeneity of multivariate dispersions
+
+Call: betadisper(d = dis, group = groups, type = "median", bias.adjust
+= TRUE)
+
+No. of Positive Eigenvalues: 15
+No. of Negative Eigenvalues: 8
+
+Average distance to median:
+  grazed ungrazed 
+  0.4055   0.2893 
+
+Eigenvalues for PCoA axes:
+ PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8 
+1.7552 1.1334 0.4429 0.3698 0.2454 0.1961 0.1751 0.1284 
+> 
+> ## should always work for a single group
+> group <- factor(rep("grazed", NROW(varespec)))
+> (tmp <- betadisper(dis, group, type = "median"))
+
+	Homogeneity of multivariate dispersions
+
+Call: betadisper(d = dis, group = group, type = "median")
+
+No. of Positive Eigenvalues: 15
+No. of Negative Eigenvalues: 8
+
+Average distance to median:
+grazed 
+0.4255 
+
+Eigenvalues for PCoA axes:
+ PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8 
+1.7552 1.1334 0.4429 0.3698 0.2454 0.1961 0.1751 0.1284 
+> (tmp <- betadisper(dis, group, type = "centroid"))
+
+	Homogeneity of multivariate dispersions
+
+Call: betadisper(d = dis, group = group, type = "centroid")
+
+No. of Positive Eigenvalues: 15
+No. of Negative Eigenvalues: 8
+
+Average distance to centroid:
+grazed 
+0.4261 
+
+Eigenvalues for PCoA axes:
+ PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8 
+1.7552 1.1334 0.4429 0.3698 0.2454 0.1961 0.1751 0.1284 
+> 
+> ## simulate missing values in 'd' and 'group'
+> ## using spatial medians
+> groups[c(2,20)] <- NA
+> dis[c(2, 20)] <- NA
+> mod2 <- betadisper(dis, groups) ## warnings
+Warning in betadisper(dis, groups) :
+  missing observations due to 'group' removed
+Warning in betadisper(dis, groups) :
+  missing observations due to 'd' removed
+> mod2
+
+	Homogeneity of multivariate dispersions
+
+Call: betadisper(d = dis, group = groups)
+
+No. of Positive Eigenvalues: 14
+No. of Negative Eigenvalues: 5
+
+Average distance to median:
+  grazed ungrazed 
+  0.3984   0.3008 
+
+Eigenvalues for PCoA axes:
+ PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8 
+1.4755 0.8245 0.4218 0.3456 0.2159 0.1688 0.1150 0.1060 
+> permutest(mod2, permutations = 99)
+
+Permutation test for homogeneity of multivariate dispersions
+Permutation: free
+Number of permutations: 99
+
+Response: Distances
+          Df   Sum Sq  Mean Sq      F N.Perm Pr(>F)
+Groups     1 0.039979 0.039979 2.4237     99   0.19
+Residuals 18 0.296910 0.016495                     
+> anova(mod2)
+Analysis of Variance Table
+
+Response: Distances
+          Df   Sum Sq  Mean Sq F value Pr(>F)
+Groups     1 0.039979 0.039979  2.4237 0.1369
+Residuals 18 0.296910 0.016495               
+> plot(mod2)
+> boxplot(mod2)
+> plot(TukeyHSD(mod2))
+> 
+> ## Using group centroids
+> mod3 <- betadisper(dis, groups, type = "centroid")
+Warning in betadisper(dis, groups, type = "centroid") :
+  missing observations due to 'group' removed
+Warning in betadisper(dis, groups, type = "centroid") :
+  missing observations due to 'd' removed
+> mod3
+
+	Homogeneity of multivariate dispersions
+
+Call: betadisper(d = dis, group = groups, type = "centroid")
+
+No. of Positive Eigenvalues: 14
+No. of Negative Eigenvalues: 5
+
+Average distance to centroid:
+  grazed ungrazed 
+  0.4001   0.3108 
+
+Eigenvalues for PCoA axes:
+ PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8 
+1.4755 0.8245 0.4218 0.3456 0.2159 0.1688 0.1150 0.1060 
+> permutest(mod3, permutations = 99)
+
+Permutation test for homogeneity of multivariate dispersions
+Permutation: free
+Number of permutations: 99
+
+Response: Distances
+          Df   Sum Sq  Mean Sq      F N.Perm Pr(>F)
+Groups     1 0.033468 0.033468 3.1749     99    0.1
+Residuals 18 0.189749 0.010542                     
+> anova(mod3)
+Analysis of Variance Table
+
+Response: Distances
+          Df   Sum Sq  Mean Sq F value  Pr(>F)  
+Groups     1 0.033468 0.033468  3.1749 0.09166 .
+Residuals 18 0.189749 0.010542                  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> plot(mod3)
+> boxplot(mod3)
+> plot(TukeyHSD(mod3))
+> 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("betadiver")
+> ### * betadiver
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: betadiver
+> ### Title: Indices of beta Diversity
+> ### Aliases: betadiver scores.betadiver plot.betadiver
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> ## Raw data and plotting
+> data(sipoo)
+> m <- betadiver(sipoo)
+> plot(m)
+> ## The indices
+> betadiver(help=TRUE)
+1 "w" = (b+c)/(2*a+b+c)
+2 "-1" = (b+c)/(2*a+b+c)
+3 "c" = (b+c)/2
+4 "wb" = b+c
+5 "r" = 2*b*c/((a+b+c)^2-2*b*c)
+6 "I" = log(2*a+b+c) - 2*a*log(2)/(2*a+b+c) - ((a+b)*log(a+b) +
+(a+c)*log(a+c)) / (2*a+b+c)
+7 "e" = exp(log(2*a+b+c) - 2*a*log(2)/(2*a+b+c) - ((a+b)*log(a+b) +
+(a+c)*log(a+c)) / (2*a+b+c))-1
+8 "t" = (b+c)/(2*a+b+c)
+9 "me" = (b+c)/(2*a+b+c)
+10 "j" = a/(a+b+c)
+11 "sor" = 2*a/(2*a+b+c)
+12 "m" = (2*a+b+c)*(b+c)/(a+b+c)
+13 "-2" = pmin(b,c)/(pmax(b,c)+a)
+14 "co" = (a*c+a*b+2*b*c)/(2*(a+b)*(a+c))
+15 "cc" = (b+c)/(a+b+c)
+16 "g" = (b+c)/(a+b+c)
+17 "-3" = pmin(b,c)/(a+b+c)
+18 "l" = (b+c)/2
+19 "19" = 2*(b*c+1)/(a+b+c)/(a+b+c-1)
+20 "hk" = (b+c)/(2*a+b+c)
+21 "rlb" = a/(a+c)
+22 "sim" = pmin(b,c)/(pmin(b,c)+a)
+23 "gl" = 2*abs(b-c)/(2*a+b+c)
+24 "z" = (log(2)-log(2*a+b+c)+log(a+b+c))/log(2)
+> ## The basic Whittaker index
+> d <- betadiver(sipoo, "w")
+> ## This should be equal to Sorensen index (binary Bray-Curtis in
+> ## vegan)
+> range(d - vegdist(sipoo, binary=TRUE))
+[1] 0 0
+> 
+> 
+> 
+> cleanEx()
+> nameEx("bgdispersal")
+> ### * bgdispersal
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: bgdispersal
+> ### Title: Coefficients of Biogeographical Dispersal Direction
+> ### Aliases: bgdispersal
+> ### Keywords: multivariate nonparametric
+> 
+> ### ** Examples
+> 
+> mat <- matrix(c(32,15,14,10,70,30,100,4,10,30,25,0,18,0,40,
++   0,0,20,0,0,0,0,4,0,30,20,0,0,0,0,25,74,42,1,45,89,5,16,16,20),
++   4, 10, byrow=TRUE)
+> bgdispersal(mat)
+$DD1
+      [,1]  [,2] [,3]  [,4]
+[1,]  0.00  0.24 0.21  0.00
+[2,] -0.24  0.00 0.08 -0.24
+[3,] -0.21 -0.08 0.00 -0.21
+[4,]  0.00  0.24 0.21  0.00
+
+$DD2
+           [,1]       [,2]      [,3]       [,4]
+[1,]  0.0000000  0.3428571 0.3230769  0.0000000
+[2,] -0.3428571  0.0000000 0.1142857 -0.3428571
+[3,] -0.3230769 -0.1142857 0.0000000 -0.3230769
+[4,]  0.0000000  0.3428571 0.3230769  0.0000000
+
+$DD3
+            [,1]       [,2]      [,3]        [,4]
+[1,]  0.00000000  0.1567922 0.1420408 -0.01325831
+[2,] -0.15679216  0.0000000 0.1101196 -0.20049485
+[3,] -0.14204082 -0.1101196 0.0000000 -0.13586560
+[4,]  0.01325831  0.2004949 0.1358656  0.00000000
+
+$DD4
+            [,1]       [,2]      [,3]        [,4]
+[1,]  0.00000000  0.2513176 0.2425087 -0.01960102
+[2,] -0.25131757  0.0000000 0.1725441 -0.30993929
+[3,] -0.24250871 -0.1725441 0.0000000 -0.23381521
+[4,]  0.01960102  0.3099393 0.2338152  0.00000000
+
+$McNemar
+     [,1]     [,2]      [,3]     [,4]
+[1,]   NA 7.677938 9.0571232 0.000000
+[2,]   NA       NA 0.2912555 7.677938
+[3,]   NA       NA        NA 9.057123
+[4,]   NA       NA        NA       NA
+
+$prob.McNemar
+     [,1]        [,2]        [,3]        [,4]
+[1,]   NA 0.005590001 0.002616734 1.000000000
+[2,]   NA          NA 0.589417103 0.005590001
+[3,]   NA          NA          NA 0.002616734
+[4,]   NA          NA          NA          NA
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("bioenv")
+> ### * bioenv
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: bioenv
+> ### Title: Best Subset of Environmental Variables with Maximum (Rank)
+> ###   Correlation with Community Dissimilarities
+> ### Aliases: bioenv bioenv.default bioenv.formula summary.bioenv bioenvdist
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> # The method is very slow for large number of possible subsets.
+> # Therefore only 6 variables in this example.
+> data(varespec)
+> data(varechem)
+> sol <- bioenv(wisconsin(varespec) ~ log(N) + P + K + Ca + pH + Al, varechem)
+> sol
+
+Call:
+bioenv(formula = wisconsin(varespec) ~ log(N) + P + K + Ca +      pH + Al, data = varechem) 
+
+Subset of environmental variables with best correlation to community data.
+
+Correlations:    spearman 
+Dissimilarities: bray 
+Metric:          euclidean 
+
+Best model has 3 parameters (max. 6 allowed):
+P Ca Al
+with correlation  0.4004806 
+
+> summary(sol)
+                    size correlation
+P                      1      0.2513
+P Al                   2      0.4004
+P Ca Al                3      0.4005
+P Ca pH Al             4      0.3619
+log(N) P Ca pH Al      5      0.3216
+log(N) P K Ca pH Al    6      0.2822
+> 
+> 
+> 
+> cleanEx()
+> nameEx("biplot.rda")
+> ### * biplot.rda
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: biplot.rda
+> ### Title: PCA biplot
+> ### Aliases: biplot.rda
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> data(dune)
+> mod <- rda(dune, scale = TRUE)
+> biplot(mod, scaling = "symmetric")
+> 
+> ## different type for species and site scores
+> biplot(mod, scaling = "symmetric", type = c("text", "points"))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("capscale")
+> ### * capscale
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: capscale
+> ### Title: [Partial] Distance-based Redundancy Analysis
+> ### Aliases: capscale oldCapscale dbrda
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> data(varechem)
+> ## Basic Analysis
+> vare.cap <- capscale(varespec ~ N + P + K + Condition(Al), varechem,
++                      dist="bray")
+> vare.cap
+Call: capscale(formula = varespec ~ N + P + K + Condition(Al), data =
+varechem, distance = "bray")
+
+              Inertia Proportion Eigenvals Rank
+Total          4.5444     1.0000    4.8034     
+Conditional    0.9726     0.2140    0.9772    1
+Constrained    0.9731     0.2141    0.9972    3
+Unconstrained  2.5987     0.5718    2.8290   15
+Imaginary                          -0.2590    8
+Inertia is squared Bray distance 
+
+Eigenvalues for constrained axes:
+  CAP1   CAP2   CAP3 
+0.5413 0.3265 0.1293 
+
+Eigenvalues for unconstrained axes:
+  MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8   MDS9  MDS10  MDS11 
+0.9065 0.5127 0.3379 0.2626 0.2032 0.1618 0.1242 0.0856 0.0689 0.0583 0.0501 
+ MDS12  MDS13  MDS14  MDS15 
+0.0277 0.0208 0.0073 0.0013 
+
+> plot(vare.cap)
+> anova(vare.cap)
+Permutation test for capscale under reduced model
+Permutation: free
+Number of permutations: 999
+
+Model: capscale(formula = varespec ~ N + P + K + Condition(Al), data = varechem, distance = "bray")
+         Df SumOfSqs      F Pr(>F)   
+Model     3  0.97314 2.3717  0.002 **
+Residual 19  2.59866                 
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> ## Avoid negative eigenvalues with additive constant
+> capscale(varespec ~ N + P + K + Condition(Al), varechem,
++                      dist="bray", add =TRUE)
+Call: capscale(formula = varespec ~ N + P + K + Condition(Al), data =
+varechem, distance = "bray", add = TRUE)
+
+              Inertia Proportion Rank
+Total          6.2496     1.0000     
+Conditional    1.0468     0.1675    1
+Constrained    1.1956     0.1913    3
+Unconstrained  4.0073     0.6412   19
+Inertia is Lingoes adjusted squared Bray distance 
+
+Eigenvalues for constrained axes:
+  CAP1   CAP2   CAP3 
+0.6103 0.3940 0.1913 
+
+Eigenvalues for unconstrained axes:
+  MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8 
+0.9796 0.5811 0.4077 0.3322 0.2769 0.2346 0.1962 0.1566 
+(Showed only 8 of all 19 unconstrained eigenvalues)
+
+Constant added to distances: 0.07413903 
+
+> ## Avoid negative eigenvalues by taking square roots of dissimilarities
+> capscale(varespec ~ N + P + K + Condition(Al), varechem,
++                      dist = "bray", sqrt.dist= TRUE)
+Call: capscale(formula = varespec ~ N + P + K + Condition(Al), data =
+varechem, distance = "bray", sqrt.dist = TRUE)
+
+              Inertia Proportion Rank
+Total          6.9500     1.0000     
+Conditional    0.9535     0.1372    1
+Constrained    1.2267     0.1765    3
+Unconstrained  4.7698     0.6863   19
+Inertia is Bray distance 
+
+Eigenvalues for constrained axes:
+  CAP1   CAP2   CAP3 
+0.5817 0.4086 0.2365 
+
+Eigenvalues for unconstrained axes:
+  MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8 
+0.9680 0.6100 0.4469 0.3837 0.3371 0.3012 0.2558 0.2010 
+(Showed only 8 of all 19 unconstrained eigenvalues)
+
+> ## Principal coordinates analysis with extended dissimilarities
+> capscale(varespec ~ 1, dist="bray", metaMDS = TRUE)
+Square root transformation
+Wisconsin double standardization
+Call: capscale(formula = varespec ~ 1, distance = "bray", metaMDSdist =
+TRUE)
+
+               Inertia Eigenvals Rank
+Total          2.54753   2.59500     
+Unconstrained  2.54753   2.59500   19
+Imaginary               -0.04747    4
+Inertia is squared Bray distance 
+
+Eigenvalues for unconstrained axes:
+  MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8 
+0.6075 0.3820 0.3335 0.2046 0.1731 0.1684 0.1505 0.1163 
+(Showed only 8 of all 19 unconstrained eigenvalues)
+
+metaMDSdist transformed data: wisconsin(sqrt(varespec)) 
+
+> ## dbrda
+> dbrda(varespec ~ N + P + K + Condition(Al), varechem,
++                      dist="bray")
+Call: dbrda(formula = varespec ~ N + P + K + Condition(Al), data =
+varechem, distance = "bray")
+
+              Inertia Proportion Rank RealDims
+Total          4.5444     1.0000              
+Conditional    0.9726     0.2140    1         
+Constrained    0.9731     0.2141    3        3
+Unconstrained  2.5987     0.5718   19       13
+Inertia is squared Bray distance 
+
+Eigenvalues for constrained axes:
+dbRDA1 dbRDA2 dbRDA3 
+0.5362 0.3198 0.1171 
+
+Eigenvalues for unconstrained axes:
+  MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8 
+0.9054 0.5070 0.3336 0.2581 0.2027 0.1605 0.1221 0.0825 
+(Showed only 8 of all 19 unconstrained eigenvalues)
+
+> ## avoid negative eigenvalues also with Jaccard distances
+> dbrda(varespec ~ N + P + K + Condition(Al), varechem,
++                      dist="jaccard")
+Call: dbrda(formula = varespec ~ N + P + K + Condition(Al), data =
+varechem, distance = "jaccard")
+
+              Inertia Proportion Rank
+Total          6.5044     1.0000     
+Conditional    1.0330     0.1588    1
+Constrained    1.2068     0.1855    3
+Unconstrained  4.2646     0.6557   19
+Inertia is squared Jaccard distance 
+
+Eigenvalues for constrained axes:
+dbRDA1 dbRDA2 dbRDA3 
+0.5992 0.3994 0.2082 
+
+Eigenvalues for unconstrained axes:
+  MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8 
+1.0388 0.6441 0.4518 0.3759 0.3239 0.2785 0.2279 0.1644 
+(Showed only 8 of all 19 unconstrained eigenvalues)
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("cascadeKM")
+> ### * cascadeKM
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: cascadeKM
+> ### Title: K-means partitioning using a range of values of K
+> ### Aliases: cascadeKM cIndexKM plot.cascadeKM orderingKM pregraphKM
+> ### Keywords: cluster
+> 
+> ### ** Examples
+> 
+>  # Partitioning a (10 x 10) data matrix of random numbers
+>  mat <- matrix(runif(100),10,10)
+>  res <- cascadeKM(mat, 2, 5, iter = 25, criterion = 'calinski') 
+>  toto <- plot(res)
+>  
+>  # Partitioning an autocorrelated time series
+>  vec <- sort(matrix(runif(30),30,1))
+>  res <- cascadeKM(vec, 2, 5, iter = 25, criterion = 'calinski')
+>  toto <- plot(res)
+>  
+>  # Partitioning a large autocorrelated time series
+>  # Note that we remove the grid lines
+>  vec <- sort(matrix(runif(1000),1000,1))
+>  res <- cascadeKM(vec, 2, 7, iter = 10, criterion = 'calinski')
+>  toto <- plot(res, gridcol=NA)
+>  
+> 
+> 
+> 
+> cleanEx()
+> nameEx("cca")
+> ### * cca
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: cca
+> ### Title: [Partial] [Constrained] Correspondence Analysis and Redundancy
+> ###   Analysis
+> ### Aliases: cca cca.default cca.formula rda rda.default rda.formula
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> data(varechem)
+> ## Common but bad way: use all variables you happen to have in your
+> ## environmental data matrix
+> vare.cca <- cca(varespec, varechem)
+> vare.cca
+Call: cca(X = varespec, Y = varechem)
+
+              Inertia Proportion Rank
+Total          2.0832     1.0000     
+Constrained    1.4415     0.6920   14
+Unconstrained  0.6417     0.3080    9
+Inertia is mean squared contingency coefficient 
+
+Eigenvalues for constrained axes:
+  CCA1   CCA2   CCA3   CCA4   CCA5   CCA6   CCA7   CCA8   CCA9  CCA10  CCA11 
+0.4389 0.2918 0.1628 0.1421 0.1180 0.0890 0.0703 0.0584 0.0311 0.0133 0.0084 
+ CCA12  CCA13  CCA14 
+0.0065 0.0062 0.0047 
+
+Eigenvalues for unconstrained axes:
+    CA1     CA2     CA3     CA4     CA5     CA6     CA7     CA8     CA9 
+0.19776 0.14193 0.10117 0.07079 0.05330 0.03330 0.01887 0.01510 0.00949 
+
+> plot(vare.cca)
+> ## Formula interface and a better model
+> vare.cca <- cca(varespec ~ Al + P*(K + Baresoil), data=varechem)
+> vare.cca
+Call: cca(formula = varespec ~ Al + P * (K + Baresoil), data =
+varechem)
+
+              Inertia Proportion Rank
+Total           2.083      1.000     
+Constrained     1.046      0.502    6
+Unconstrained   1.038      0.498   17
+Inertia is mean squared contingency coefficient 
+
+Eigenvalues for constrained axes:
+  CCA1   CCA2   CCA3   CCA4   CCA5   CCA6 
+0.3756 0.2342 0.1407 0.1323 0.1068 0.0561 
+
+Eigenvalues for unconstrained axes:
+    CA1     CA2     CA3     CA4     CA5     CA6     CA7     CA8 
+0.27577 0.15411 0.13536 0.11803 0.08887 0.05511 0.04919 0.03781 
+(Showed only 8 of all 17 unconstrained eigenvalues)
+
+> plot(vare.cca)
+> ## `Partialling out' and `negative components of variance'
+> cca(varespec ~ Ca, varechem)
+Call: cca(formula = varespec ~ Ca, data = varechem)
+
+              Inertia Proportion Rank
+Total         2.08320    1.00000     
+Constrained   0.15722    0.07547    1
+Unconstrained 1.92598    0.92453   22
+Inertia is mean squared contingency coefficient 
+
+Eigenvalues for constrained axes:
+   CCA1 
+0.15722 
+
+Eigenvalues for unconstrained axes:
+   CA1    CA2    CA3    CA4    CA5    CA6    CA7    CA8 
+0.4745 0.2939 0.2140 0.1954 0.1748 0.1171 0.1121 0.0880 
+(Showed only 8 of all 22 unconstrained eigenvalues)
+
+> cca(varespec ~ Ca + Condition(pH), varechem)
+Call: cca(formula = varespec ~ Ca + Condition(pH), data = varechem)
+
+              Inertia Proportion Rank
+Total          2.0832     1.0000     
+Conditional    0.1458     0.0700    1
+Constrained    0.1827     0.0877    1
+Unconstrained  1.7547     0.8423   21
+Inertia is mean squared contingency coefficient 
+
+Eigenvalues for constrained axes:
+   CCA1 
+0.18269 
+
+Eigenvalues for unconstrained axes:
+   CA1    CA2    CA3    CA4    CA5    CA6    CA7    CA8 
+0.3834 0.2749 0.2123 0.1760 0.1701 0.1161 0.1089 0.0880 
+(Showed only 8 of all 21 unconstrained eigenvalues)
+
+> ## RDA
+> data(dune)
+> data(dune.env)
+> dune.Manure <- rda(dune ~ Manure, dune.env)
+> plot(dune.Manure) 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("cca.object")
+> ### * cca.object
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: cca.object
+> ### Title: Result Object from Constrained Ordination with cca, rda or
+> ###   capscale
+> ### Aliases: cca.object
+> ### Keywords: models multivariate
+> 
+> ### ** Examples
+> 
+> # Some species will be missing in the analysis, because only a subset
+> # of sites is used below.
+> data(dune)
+> data(dune.env)
+> mod <- cca(dune[1:15,] ~ ., dune.env[1:15,])
+> # Look at the names of missing species
+> attr(mod$CCA$v, "na.action")
+Airaprae Empenigr Salirepe 
+       3       13       24 
+attr(,"class")
+[1] "exclude"
+> # Look at the names of the aliased variables:
+> mod$CCA$alias
+[1] "Manure^4"
+> # Access directly constrained weighted orthonormal species and site
+> # scores, constrained eigenvalues and margin sums.
+> spec <- mod$CCA$v
+> sites <- mod$CCA$u
+> eig <- mod$CCA$eig
+> rsum <- mod$rowsum
+> csum <- mod$colsum
+> 
+> 
+> 
+> cleanEx()
+> nameEx("clamtest")
+> ### * clamtest
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: clamtest
+> ### Title: Multinomial Species Classification Method (CLAM)
+> ### Aliases: clamtest summary.clamtest plot.clamtest
+> ### Keywords: htest
+> 
+> ### ** Examples
+> 
+> data(mite)
+> data(mite.env)
+> sol <- with(mite.env, clamtest(mite, Shrub=="None", alpha=0.005))
+> summary(sol)
+Two Groups Species Classification Method (CLAM)
+
+Specialization threshold = 0.6666667
+Alpha level = 0.005
+
+Estimated sample coverage:
+ FALSE   TRUE 
+1.0000 0.9996 
+
+Minimum abundance for classification:
+FALSE  TRUE 
+   27     9 
+
+                 Species Proportion
+Generalist            10      0.286
+Specialist_FALSE      14      0.400
+Specialist_TRUE        4      0.114
+Too_rare               7      0.200
+> head(sol)
+  Species Total_FALSE Total_TRUE          Classes
+1  Brachy         534         77       Generalist
+2    PHTH          89          0 Specialist_FALSE
+3    HPAV         389        207       Generalist
+4    RARD          85          0 Specialist_FALSE
+5    SSTR          22          0         Too_rare
+6 Protopl          26          0         Too_rare
+> plot(sol)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("commsim")
+> ### * commsim
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: commsim
+> ### Title: Create an Object for Null Model Algorithms
+> ### Aliases: commsim make.commsim print.commsim
+> ### Keywords: multivariate datagen
+> 
+> ### ** Examples
+> 
+> ## write the r00 algorithm
+> f <- function(x, n, ...) 
++     array(replicate(n, sample(x)), c(dim(x), n))
+> (cs <- commsim("r00", fun=f, binary=TRUE, 
++     isSeq=FALSE, mode="integer"))
+An object of class “commsim” 
+‘r00’ method (binary, non-sequential, integer mode)
+
+> 
+> ## retrieving the sequential swap algorithm
+> (cs <- make.commsim("swap"))
+An object of class “commsim” 
+‘swap’ method (binary, sequential, integer mode)
+
+> 
+> ## feeding a commsim object as argument
+> make.commsim(cs)
+An object of class “commsim” 
+‘swap’ method (binary, sequential, integer mode)
+
+> 
+> ## structural constraints
+> diagfun <- function(x, y) {
++     c(sum = sum(y) == sum(x),
++         fill = sum(y > 0) == sum(x > 0),
++         rowSums = all(rowSums(y) == rowSums(x)),
++         colSums = all(colSums(y) == colSums(x)),
++         rowFreq = all(rowSums(y > 0) == rowSums(x > 0)),
++         colFreq = all(colSums(y > 0) == colSums(x > 0)))
++ }
+> evalfun <- function(meth, x, n) {
++     m <- nullmodel(x, meth)
++     y <- simulate(m, nsim=n)
++     out <- rowMeans(sapply(1:dim(y)[3], 
++         function(i) diagfun(attr(y, "data"), y[,,i])))
++     z <- as.numeric(c(attr(y, "binary"), attr(y, "isSeq"),
++         attr(y, "mode") == "double"))
++     names(z) <- c("binary", "isSeq", "double")
++     c(z, out)
++ }
+> x <- matrix(rbinom(10*12, 1, 0.5)*rpois(10*12, 3), 12, 10)
+> algos <- make.commsim()
+> a <- t(sapply(algos, evalfun, x=x, n=10))
+> print(as.table(ifelse(a==1,1,0)), zero.print = ".")
+                binary isSeq double sum fill rowSums colSums rowFreq colFreq
+r00                  1     .      .   1    1       .       .       .       .
+c0                   1     .      .   1    1       .       1       .       1
+r0                   1     .      .   1    1       1       .       1       .
+r0_old               1     .      .   1    1       1       .       1       .
+r1                   1     .      .   1    1       1       .       1       .
+r2                   1     .      .   1    1       1       .       1       .
+quasiswap            1     .      .   1    1       1       1       1       1
+swap                 1     1      .   1    1       1       1       1       1
+tswap                1     1      .   1    1       1       1       1       1
+curveball            1     1      .   1    1       1       1       1       1
+backtrack            1     .      .   1    1       1       1       1       1
+r2dtable             .     .      .   1    .       1       1       .       .
+swap_count           .     1      .   1    1       1       1       .       .
+quasiswap_count      .     .      .   1    1       1       1       .       .
+swsh_samp            .     .      1   1    1       .       .       1       1
+swsh_both            .     .      .   1    1       .       .       1       1
+swsh_samp_r          .     .      1   1    1       1       .       1       1
+swsh_samp_c          .     .      1   1    1       .       1       1       1
+swsh_both_r          .     .      .   1    1       1       .       1       1
+swsh_both_c          .     .      .   1    1       .       1       1       1
+abuswap_r            .     1      1   1    1       1       .       1       1
+abuswap_c            .     1      1   1    1       .       1       1       1
+r00_samp             .     .      1   1    1       .       .       .       .
+c0_samp              .     .      1   1    1       .       1       .       1
+r0_samp              .     .      1   1    1       1       .       1       .
+r00_ind              .     .      .   1    .       .       .       .       .
+c0_ind               .     .      .   1    .       .       1       .       .
+r0_ind               .     .      .   1    .       1       .       .       .
+r00_both             .     .      .   1    1       .       .       .       .
+c0_both              .     .      .   1    1       .       1       .       1
+r0_both              .     .      .   1    1       1       .       1       .
+> 
+> 
+> 
+> cleanEx()
+> nameEx("contribdiv")
+> ### * contribdiv
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: contribdiv
+> ### Title: Contribution Diversity Approach
+> ### Aliases: contribdiv plot.contribdiv
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> ## Artificial example given in
+> ## Table 2 in Lu et al. 2007
+> x <- matrix(c(
++ 1/3,1/3,1/3,0,0,0,
++ 0,0,1/3,1/3,1/3,0,
++ 0,0,0,1/3,1/3,1/3),
++ 3, 6, byrow = TRUE,
++ dimnames = list(LETTERS[1:3],letters[1:6]))
+> x
+          a         b         c         d         e         f
+A 0.3333333 0.3333333 0.3333333 0.0000000 0.0000000 0.0000000
+B 0.0000000 0.0000000 0.3333333 0.3333333 0.3333333 0.0000000
+C 0.0000000 0.0000000 0.0000000 0.3333333 0.3333333 0.3333333
+> ## Compare results with Table 2
+> contribdiv(x, "richness")
+  alpha beta gamma
+A     1  1.5   2.5
+B     1  0.5   1.5
+C     1  1.0   2.0
+> contribdiv(x, "simpson")
+      alpha      beta     gamma
+A 0.6666667 0.1851852 0.8518519
+B 0.6666667 0.1111111 0.7777778
+C 0.6666667 0.1481481 0.8148148
+> ## Relative contribution (C values), compare with Table 2
+> (cd1 <- contribdiv(x, "richness", relative = TRUE, scaled = FALSE))
+  alpha beta gamma
+A     0  0.5   0.5
+B     0 -0.5  -0.5
+C     0  0.0   0.0
+> (cd2 <- contribdiv(x, "simpson", relative = TRUE, scaled = FALSE))
+  alpha        beta       gamma
+A     0  0.03703704  0.03703704
+B     0 -0.03703704 -0.03703704
+C     0  0.00000000  0.00000000
+> ## Differentiation coefficients
+> attr(cd1, "diff.coef") # D_ST
+[1] 0.5
+> attr(cd2, "diff.coef") # D_DT
+[1] 0.1818182
+> ## BCI data set
+> data(BCI)
+> opar <- par(mfrow=c(2,2))
+> plot(contribdiv(BCI, "richness"), main = "Absolute")
+> plot(contribdiv(BCI, "richness", relative = TRUE), main = "Relative")
+> plot(contribdiv(BCI, "simpson"))
+> plot(contribdiv(BCI, "simpson", relative = TRUE))
+> par(opar)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("decorana")
+> ### * decorana
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: decorana
+> ### Title: Detrended Correspondence Analysis and Basic Reciprocal Averaging
+> ### Aliases: decorana summary.decorana print.summary.decorana plot.decorana
+> ###   downweight scores.decorana points.decorana text.decorana
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> vare.dca <- decorana(varespec)
+> vare.dca
+
+Call:
+decorana(veg = varespec) 
+
+Detrended correspondence analysis with 26 segments.
+Rescaling of axes with 4 iterations.
+
+                  DCA1   DCA2    DCA3    DCA4
+Eigenvalues     0.5235 0.3253 0.20010 0.19176
+Decorana values 0.5249 0.1572 0.09669 0.06075
+Axis lengths    2.8161 2.2054 1.54650 1.64864
+
+> summary(vare.dca)
+
+Call:
+decorana(veg = varespec) 
+
+Detrended correspondence analysis with 26 segments.
+Rescaling of axes with 4 iterations.
+
+                  DCA1   DCA2    DCA3    DCA4
+Eigenvalues     0.5235 0.3253 0.20010 0.19176
+Decorana values 0.5249 0.1572 0.09669 0.06075
+Axis lengths    2.8161 2.2054 1.54650 1.64864
+
+Species scores:
+
+             DCA1     DCA2     DCA3     DCA4 Totals
+Callvulg  0.04119 -1.53268 -2.55101  1.32277  45.07
+Empenigr  0.09019  0.82274  0.20569  0.30631 151.99
+Rhodtome  1.34533  2.47141 -0.34970 -1.13823   8.39
+Vaccmyrt  1.86298  1.71424 -0.60535 -0.40205  50.71
+Vaccviti  0.16641  0.71095  0.00313 -0.55801 275.03
+Pinusylv -0.73490  1.62050 -1.60275 -2.10199   4.11
+Descflex  1.97061  1.81651  1.74896 -0.91463   5.60
+Betupube  0.79745  3.36374 -0.94546 -1.01741   0.29
+Vacculig -0.08912 -1.17478  2.86624  0.87025  15.22
+Diphcomp -0.82669 -0.44195  2.58579 -0.38459   3.24
+Dicrsp    2.37743 -0.27373 -0.47099 -1.89036  40.50
+Dicrfusc  1.58267 -1.33770 -1.33563  1.47417 113.52
+Dicrpoly  0.86689  2.39519 -0.82064 -3.41534   6.06
+Hylosple  2.66242  1.19669  1.48288 -0.69978  18.04
+Pleuschr  1.64098  0.15607  0.30044 -0.26717 377.97
+Polypili -0.56213  0.14009  0.25198  0.49177   0.61
+Polyjuni  1.22244 -0.89173  0.61287  3.60066  13.85
+Polycomm  1.01545  2.08388  0.06402  0.84199   0.71
+Pohlnuta -0.00712  1.09704 -0.82126 -1.59862   2.62
+Ptilcili  0.48093  2.86420 -0.71801 -1.02698  14.01
+Barbhatc  0.58303  3.71792 -0.84212 -1.88837   3.19
+Cladarbu -0.18554 -1.18973  0.68113  0.55399 255.05
+Cladrang -0.83427 -0.78085  0.90603  0.70057 388.71
+Cladstel -1.67768  0.98907 -0.83789 -0.60206 486.71
+Cladunci  0.97686 -1.70859 -1.68281 -2.26756  56.28
+Cladcocc -0.27221 -0.76713 -0.63836  0.66927   2.79
+Cladcorn  0.29068 -0.97039  0.50414  0.95738   6.22
+Cladgrac  0.21778 -0.41879  0.06530 -0.31472   5.14
+Cladfimb  0.00889 -0.23922 -0.26505  0.33123   3.96
+Cladcris  0.37774 -1.09161 -0.55627  0.23868   7.47
+Cladchlo -0.91983  1.54955 -0.58109 -1.48643   1.16
+Cladbotr  0.66438  2.19584 -0.90331 -0.91391   0.47
+Cladamau -0.96418 -0.98992  2.71458  0.52352   0.14
+Cladsp   -1.12318 -0.15330 -0.69833  0.44040   0.52
+Cetreric  0.27163 -1.28867 -0.81682 -1.93935   3.60
+Cetrisla -0.50158  2.22098 -1.16461 -1.89349   2.03
+Flavniva -1.67937 -3.67985  4.15644  3.18919  11.85
+Nepharct  2.18561 -0.82837  0.71958  5.81930   5.26
+Stersp   -0.78699 -2.01214  2.31212  2.03946  17.52
+Peltapht  0.45763 -0.34395  0.09916  1.34695   0.76
+Icmaeric  0.04950 -1.97605  1.41509  2.10154   0.22
+Cladcerv -1.21585 -2.30519  2.55186  3.41532   0.10
+Claddefo  0.60517 -1.19771 -0.33388  0.22585  10.23
+Cladphyl -1.53959  1.48574 -1.43209 -1.52387   0.80
+
+Site scores:
+
+      DCA1    DCA2    DCA3    DCA4 Totals
+18 -0.1729 -0.2841  0.4775  0.2521   89.2
+15  0.8539 -0.3360  0.0708  0.0924   89.8
+24  1.2467 -0.1183 -0.1211 -0.8718   94.2
+27  1.0675  0.4169  0.2897 -0.1758  125.6
+23  0.4234  0.0112  0.2179  0.1265   90.5
+19  0.0252  0.3600 -0.0263 -0.1168   81.3
+22  1.0695 -0.3707 -0.4285  0.4145  109.8
+16  0.7724 -0.5325 -0.2856  0.5269   88.5
+28  1.6189  0.5482  0.2342 -0.3333  110.7
+13 -0.2642 -0.6851 -0.3777  0.5003  101.9
+14  0.6431 -0.9604 -0.6000 -0.2885   81.7
+20  0.4504 -0.1666  0.1850 -0.1291   64.1
+25  1.2501 -0.2248  0.0244  0.3741   94.1
+7  -0.3910 -0.7618  0.8640  0.5557  103.4
+5  -0.6407 -0.9427  0.9465  0.7769   94.8
+6  -0.4523 -0.5529  0.3988  0.2781  110.9
+3  -1.1043  0.2106 -0.0653 -0.0539  106.7
+4  -0.9454 -0.5974  0.4639  0.4889   84.8
+2  -1.1971  0.5691 -0.3246 -0.2522  119.1
+9  -1.0983  0.7850 -0.5274 -0.4848  122.6
+12 -0.8673  0.5621 -0.3254 -0.3217  119.8
+10 -1.1842  0.7442 -0.4995 -0.3917  122.4
+11 -0.4134  0.0260  0.0107 -0.0682  112.8
+21  0.3210  1.2450 -0.2541 -0.5253   99.2
+
+> plot(vare.dca)
+> 
+> ### the detrending rationale:
+> gaussresp <- function(x,u) exp(-(x-u)^2/2)
+> x <- seq(0,6,length=15) ## The gradient
+> u <- seq(-2,8,len=23)   ## The optima
+> pack <- outer(x,u,gaussresp)
+> matplot(x, pack, type="l", main="Species packing")
+> opar <- par(mfrow=c(2,2))
+> plot(scores(prcomp(pack)), asp=1, type="b", main="PCA")
+> plot(scores(decorana(pack, ira=1)), asp=1, type="b", main="CA")
+> plot(scores(decorana(pack)), asp=1, type="b", main="DCA")
+> plot(scores(cca(pack ~ x), dis="sites"), asp=1, type="b", main="CCA")
+> 
+> ### Let's add some noise:
+> noisy <- (0.5 + runif(length(pack)))*pack
+> par(mfrow=c(2,1))
+> matplot(x, pack, type="l", main="Ideal model")
+> matplot(x, noisy, type="l", main="Noisy model")
+> par(mfrow=c(2,2))
+> plot(scores(prcomp(noisy)), type="b", main="PCA", asp=1)
+> plot(scores(decorana(noisy, ira=1)), type="b", main="CA", asp=1)
+> plot(scores(decorana(noisy)), type="b", main="DCA", asp=1)
+> plot(scores(cca(noisy ~ x), dis="sites"), asp=1, type="b", main="CCA")
+> par(opar)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("decostand")
+> ### * decostand
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: decostand
+> ### Title: Standardization Methods for Community Ecology
+> ### Aliases: decostand wisconsin
+> ### Keywords: multivariate manip
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> sptrans <- decostand(varespec, "max")
+> apply(sptrans, 2, max)
+Callvulg Empenigr Rhodtome Vaccmyrt Vaccviti Pinusylv Descflex Betupube 
+       1        1        1        1        1        1        1        1 
+Vacculig Diphcomp   Dicrsp Dicrfusc Dicrpoly Hylosple Pleuschr Polypili 
+       1        1        1        1        1        1        1        1 
+Polyjuni Polycomm Pohlnuta Ptilcili Barbhatc Cladarbu Cladrang Cladstel 
+       1        1        1        1        1        1        1        1 
+Cladunci Cladcocc Cladcorn Cladgrac Cladfimb Cladcris Cladchlo Cladbotr 
+       1        1        1        1        1        1        1        1 
+Cladamau   Cladsp Cetreric Cetrisla Flavniva Nepharct   Stersp Peltapht 
+       1        1        1        1        1        1        1        1 
+Icmaeric Cladcerv Claddefo Cladphyl 
+       1        1        1        1 
+> sptrans <- wisconsin(varespec)
+> 
+> ## Chi-square: PCA similar but not identical to CA.
+> ## Use wcmdscale for weighted analysis and identical results.
+> sptrans <- decostand(varespec, "chi.square")
+> plot(procrustes(rda(sptrans), cca(varespec)))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("designdist")
+> ### * designdist
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Encoding: UTF-8
+> 
+> ### Name: designdist
+> ### Title: Design your own Dissimilarities
+> ### Aliases: designdist
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> data(BCI)
+> ## Four ways of calculating the same Sørensen dissimilarity
+> d0 <- vegdist(BCI, "bray", binary = TRUE)
+> d1 <- designdist(BCI, "(A+B-2*J)/(A+B)")
+> d2 <- designdist(BCI, "(b+c)/(2*a+b+c)", abcd = TRUE)
+> d3 <- designdist(BCI, "gamma/alpha - 1", alphagamma = TRUE)
+> ## Arrhenius dissimilarity: the value of z in the species-area model
+> ## S = c*A^z when combining two sites of equal areas, where S is the
+> ## number of species, A is the area, and c and z are model parameters.
+> ## The A below is not the area (which cancels out), but number of
+> ## species in one of the sites, as defined in designdist().
+> dis <- designdist(BCI, "(log(A+B-J)-log(A+B)+log(2))/log(2)")
+> ## This can be used in clustering or ordination...
+> ordiplot(cmdscale(dis))
+Warning in ordiplot(cmdscale(dis)) : Species scores not available
+> ## ... or in analysing beta diversity (without gradients)
+> summary(dis)
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+ 0.2733  0.3895  0.4192  0.4213  0.4537  0.5906 
+>   
+> 
+> 
+> cleanEx()
+> nameEx("deviance.cca")
+> ### * deviance.cca
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: deviance.cca
+> ### Title: Statistics Resembling Deviance and AIC for Constrained
+> ###   Ordination
+> ### Aliases: deviance.cca deviance.rda extractAIC.cca
+> ### Keywords: multivariate models
+> 
+> ### ** Examples
+> 
+> # The deviance of correspondence analysis equals Chi-square
+> data(dune)
+> data(dune.env)
+> chisq.test(dune)
+Warning in chisq.test(dune) :
+  Chi-squared approximation may be incorrect
+
+	Pearson's Chi-squared test
+
+data:  dune
+X-squared = 1449, df = 551, p-value < 2.2e-16
+
+> deviance(cca(dune))
+[1] 1448.956
+> # Stepwise selection (forward from an empty model "dune ~ 1")
+> ord <- cca(dune ~ ., dune.env)
+> step(cca(dune ~ 1, dune.env), scope = formula(ord))
+Start:  AIC=87.66
+dune ~ 1
+
+             Df    AIC
++ Moisture    3 86.608
++ Management  3 86.935
++ A1          1 87.411
+<none>          87.657
++ Manure      4 88.832
++ Use         2 89.134
+
+Step:  AIC=86.61
+dune ~ Moisture
+
+             Df    AIC
+<none>          86.608
++ Management  3 86.813
++ A1          1 86.992
++ Use         2 87.259
++ Manure      4 87.342
+- Moisture    3 87.657
+Call: cca(formula = dune ~ Moisture, data = dune.env)
+
+              Inertia Proportion Rank
+Total          2.1153     1.0000     
+Constrained    0.6283     0.2970    3
+Unconstrained  1.4870     0.7030   16
+Inertia is mean squared contingency coefficient 
+
+Eigenvalues for constrained axes:
+  CCA1   CCA2   CCA3 
+0.4187 0.1330 0.0766 
+
+Eigenvalues for unconstrained axes:
+   CA1    CA2    CA3    CA4    CA5    CA6    CA7    CA8    CA9   CA10   CA11 
+0.4098 0.2259 0.1761 0.1234 0.1082 0.0908 0.0859 0.0609 0.0566 0.0467 0.0419 
+  CA12   CA13   CA14   CA15   CA16 
+0.0201 0.0143 0.0099 0.0085 0.0080 
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("dispindmorisita")
+> ### * dispindmorisita
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: dispindmorisita
+> ### Title: Morisita index of intraspecific aggregation
+> ### Aliases: dispindmorisita
+> ### Keywords: multivariate spatial
+> 
+> ### ** Examples
+> 
+> data(dune)
+> x <- dispindmorisita(dune)
+> x
+               imor      mclu         muni        imst       pchisq
+Achimill  2.1666667  1.923488  0.327101099  0.50672636 9.157890e-03
+Agrostol  1.8085106  1.294730  0.785245032  0.51373357 1.142619e-05
+Airaprae  8.0000000  4.463082 -1.523370880  0.61382303 3.571702e-04
+Alopgeni  2.5396825  1.395781  0.711614757  0.53074307 3.024441e-08
+Anthodor  2.6666667  1.692616  0.495325824  0.52660266 5.897217e-05
+Bellpere  2.0512821  2.154361  0.158876373  0.45535255 3.451547e-02
+Bromhord  3.2380952  1.989452  0.279036892  0.53466422 1.170437e-04
+Chenalbu        NaN       Inf         -Inf         NaN          NaN
+Cirsarve 20.0000000 14.852327 -9.093483518  1.00000000 5.934709e-03
+Comapalu  6.6666667  5.617442 -2.364494506  0.53647558 1.055552e-02
+Eleopalu  3.7333333  1.577180  0.579438187  0.55851854 2.958285e-10
+Elymrepe  2.7692308  1.554093  0.596260659  0.53293787 1.180195e-06
+Empenigr 20.0000000 14.852327 -9.093483518  1.00000000 5.934709e-03
+Hyporadi  6.6666667  2.731541 -0.261685440  0.61393969 7.832274e-07
+Juncarti  3.1372549  1.814843  0.406265675  0.53635966 2.066336e-05
+Juncbufo  4.1025641  2.154361  0.158876373  0.55458486 1.503205e-05
+Lolipere  1.5849970  1.243023  0.822921342  0.50911591 5.873839e-05
+Planlanc  2.4615385  1.554093  0.596260659  0.52459747 1.921730e-05
+Poaprat   1.1702128  1.294730  0.785245032  0.28876015 1.046531e-01
+Poatriv   1.4644137  1.223425  0.837201879  0.50641728 2.747301e-04
+Ranuflam  2.4175824  2.065564  0.223578191  0.50981405 7.010483e-03
+Rumeacet  3.9215686  1.814843  0.406265675  0.55792432 1.530085e-07
+Sagiproc  2.4210526  1.729070  0.468764025  0.51893672 4.956394e-04
+Salirepe  5.8181818  2.385233 -0.009348352  0.59744520 2.687397e-07
+Scorautu  0.9643606  1.261365  0.809556915 -0.09356972 5.823404e-01
+Trifprat  6.6666667  2.731541 -0.261685440  0.61393969 7.832274e-07
+Trifrepe  1.2210916  1.301138  0.780576445  0.36709402 6.335449e-02
+Vicilath  3.3333333  5.617442 -2.364494506  0.25266513 1.301890e-01
+Bracruta  1.1904762  1.288590  0.789719093  0.33001160 8.071762e-02
+Callcusp  5.3333333  2.539147 -0.121498169  0.58001287 7.982634e-06
+> y <- dispindmorisita(dune, unique.rm = TRUE)
+> y
+              imor     mclu         muni        imst       pchisq
+Achimill 2.1666667 1.923488  0.327101099  0.50672636 9.157890e-03
+Agrostol 1.8085106 1.294730  0.785245032  0.51373357 1.142619e-05
+Airaprae 8.0000000 4.463082 -1.523370880  0.61382303 3.571702e-04
+Alopgeni 2.5396825 1.395781  0.711614757  0.53074307 3.024441e-08
+Anthodor 2.6666667 1.692616  0.495325824  0.52660266 5.897217e-05
+Bellpere 2.0512821 2.154361  0.158876373  0.45535255 3.451547e-02
+Bromhord 3.2380952 1.989452  0.279036892  0.53466422 1.170437e-04
+Comapalu 6.6666667 5.617442 -2.364494506  0.53647558 1.055552e-02
+Eleopalu 3.7333333 1.577180  0.579438187  0.55851854 2.958285e-10
+Elymrepe 2.7692308 1.554093  0.596260659  0.53293787 1.180195e-06
+Hyporadi 6.6666667 2.731541 -0.261685440  0.61393969 7.832274e-07
+Juncarti 3.1372549 1.814843  0.406265675  0.53635966 2.066336e-05
+Juncbufo 4.1025641 2.154361  0.158876373  0.55458486 1.503205e-05
+Lolipere 1.5849970 1.243023  0.822921342  0.50911591 5.873839e-05
+Planlanc 2.4615385 1.554093  0.596260659  0.52459747 1.921730e-05
+Poaprat  1.1702128 1.294730  0.785245032  0.28876015 1.046531e-01
+Poatriv  1.4644137 1.223425  0.837201879  0.50641728 2.747301e-04
+Ranuflam 2.4175824 2.065564  0.223578191  0.50981405 7.010483e-03
+Rumeacet 3.9215686 1.814843  0.406265675  0.55792432 1.530085e-07
+Sagiproc 2.4210526 1.729070  0.468764025  0.51893672 4.956394e-04
+Salirepe 5.8181818 2.385233 -0.009348352  0.59744520 2.687397e-07
+Scorautu 0.9643606 1.261365  0.809556915 -0.09356972 5.823404e-01
+Trifprat 6.6666667 2.731541 -0.261685440  0.61393969 7.832274e-07
+Trifrepe 1.2210916 1.301138  0.780576445  0.36709402 6.335449e-02
+Vicilath 3.3333333 5.617442 -2.364494506  0.25266513 1.301890e-01
+Bracruta 1.1904762 1.288590  0.789719093  0.33001160 8.071762e-02
+Callcusp 5.3333333 2.539147 -0.121498169  0.58001287 7.982634e-06
+> dim(x) ## with unique species
+[1] 30  5
+> dim(y) ## unique species removed
+[1] 27  5
+> 
+> 
+> 
+> cleanEx()
+> nameEx("dispweight")
+> ### * dispweight
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: dispweight
+> ### Title: Dispersion-based weighting of species counts
+> ### Aliases: dispweight gdispweight summary.dispweight
+> ### Keywords: multivariate manip
+> 
+> ### ** Examples
+> 
+> data(mite, mite.env)
+> ## dispweight and its summary
+> mite.dw <- with(mite.env, dispweight(mite, Shrub, nsimul = 99))
+> summary(mite.dw)
+         Dispersion    Weight Df Pr(Disp.)   
+Brachy       9.6908 0.1031909 67      0.01 **
+PHTH         3.2809 0.3047900 49      0.01 **
+HPAV         6.5263 0.1532264 67      0.01 **
+RARD         6.0477 0.1653525 49      0.01 **
+SSTR         2.2619 0.4421053 49      0.01 **
+Protopl      5.4229 0.1844031 49      0.01 **
+MEGR         4.5354 0.2204860 67      0.01 **
+MPRO         1.2687 1.0000000 67      0.07 . 
+TVIE         2.5956 0.3852706 67      0.01 **
+HMIN        10.0714 0.0992906 67      0.01 **
+HMIN2        7.5674 0.1321466 49      0.01 **
+NPRA         2.6743 0.3739344 67      0.01 **
+TVEL         9.6295 0.1038474 49      0.01 **
+ONOV        11.3628 0.0880064 67      0.01 **
+SUCT         8.7372 0.1144533 67      0.01 **
+LCIL       129.4436 0.0077254 67      0.01 **
+Oribatl1     4.1250 0.2424248 67      0.01 **
+Ceratoz1     1.7150 0.5830768 67      0.01 **
+PWIL         2.2943 0.4358538 67      0.01 **
+Galumna1     2.8777 0.3474943 49      0.01 **
+Stgncrs2     3.8242 0.2614953 49      0.01 **
+HRUF         1.7575 0.5690021 67      0.01 **
+Trhypch1    14.9225 0.0670128 67      0.01 **
+PPEL         1.3628 1.0000000 49      0.07 . 
+NCOR         2.5875 0.3864771 67      0.01 **
+SLAT         2.7857 0.3589744 49      0.01 **
+FSET         4.8901 0.2044944 49      0.01 **
+Lepidzts     1.6577 0.6032360 49      0.02 * 
+Eupelops     1.4611 0.6844033 67      0.03 * 
+Miniglmn     1.6505 0.6058733 49      0.01 **
+LRUG        12.0658 0.0828790 67      0.01 **
+PLAG2        3.2403 0.3086090 67      0.01 **
+Ceratoz3     3.5125 0.2846947 67      0.01 **
+Oppiminu     3.1680 0.3156525 67      0.01 **
+Trimalc2    10.5927 0.0944046 67      0.01 **
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+Based on 99 simulations on 'c0_ind' nullmodel
+> ## generalized dispersion weighting
+> mite.dw <- gdispweight(mite ~ Shrub + WatrCont, data = mite.env)
+> rda(mite.dw ~ Shrub + WatrCont, data = mite.env)
+Call: rda(formula = mite.dw ~ Shrub + WatrCont, data = mite.env)
+
+              Inertia Proportion Rank
+Total         38.1640     1.0000     
+Constrained    9.2129     0.2414    3
+Unconstrained 28.9511     0.7586   35
+Inertia is variance 
+
+Eigenvalues for constrained axes:
+ RDA1  RDA2  RDA3 
+7.986 0.748 0.480 
+
+Eigenvalues for unconstrained axes:
+  PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8 
+5.886 3.634 2.791 2.592 1.932 1.573 1.210 1.078 
+(Showed only 8 of all 35 unconstrained eigenvalues)
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("distconnected")
+> ### * distconnected
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: distconnected
+> ### Title: Connectedness of Dissimilarities
+> ### Aliases: distconnected no.shared
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> ## There are no disconnected data in vegan, and the following uses an
+> ## extremely low threshold limit for connectedness. This is for
+> ## illustration only, and not a recommended practice.
+> data(dune)
+> dis <- vegdist(dune)
+> gr <- distconnected(dis, toolong=0.4)
+Connectivity of distance matrix with threshold dissimilarity 0.4 
+Data are disconnected: 6 groups
+Groups sizes
+ 1  2  3  4  5  6 
+ 1 11  2  4  1  1 
+> # Make sites with no shared species as NA in Manhattan dissimilarities
+> dis <- vegdist(dune, "manhattan")
+> is.na(dis) <- no.shared(dune)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("diversity")
+> ### * diversity
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: diversity
+> ### Title: Ecological Diversity Indices
+> ### Aliases: diversity fisher.alpha specnumber
+> ### Keywords: univar
+> 
+> ### ** Examples
+> 
+> data(BCI)
+> H <- diversity(BCI)
+> simp <- diversity(BCI, "simpson")
+> invsimp <- diversity(BCI, "inv")
+> ## Unbiased Simpson (Hurlbert 1971, eq. 5) with rarefy:
+> unbias.simp <- rarefy(BCI, 2) - 1
+> ## Fisher alpha
+> alpha <- fisher.alpha(BCI)
+> ## Plot all
+> pairs(cbind(H, simp, invsimp, unbias.simp, alpha), pch="+", col="blue")
+> ## Species richness (S) and Pielou's evenness (J):
+> S <- specnumber(BCI) ## rowSums(BCI > 0) does the same...
+> J <- H/log(S)
+> ## beta diversity defined as gamma/alpha - 1:
+> data(dune)
+> data(dune.env)
+> alpha <- with(dune.env, tapply(specnumber(dune), Management, mean))
+> gamma <- with(dune.env, specnumber(dune, Management))
+> gamma/alpha - 1
+       BF        HF        NM        SF 
+0.5483871 0.6666667 1.6250000 1.2909091 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("dune")
+> ### * dune
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: dune
+> ### Title: Vegetation and Environment in Dutch Dune Meadows.
+> ### Aliases: dune dune.env
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> data(dune)
+> data(dune.env)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("dune.taxon")
+> ### * dune.taxon
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: dune.taxon
+> ### Title: Taxonomic Classification and Phylogeny of Dune Meadow Species
+> ### Aliases: dune.taxon dune.phylodis
+> ### Keywords: datasets
+> 
+> ### ** Examples
+>  
+>   data(dune.taxon) 
+>   data(dune.phylodis)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("eigenvals")
+> ### * eigenvals
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: eigenvals
+> ### Title: Extract Eigenvalues from an Ordination Object
+> ### Aliases: eigenvals eigenvals.default eigenvals.prcomp
+> ###   eigenvals.princomp eigenvals.cca eigenvals.wcmdscale eigenvals.pcnm
+> ###   eigenvals.dudi eigenvals.pca eigenvals.pco summary.eigenvals
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> data(varechem)
+> mod <- cca(varespec ~ Al + P + K, varechem)
+> ev <- eigenvals(mod)
+> ev
+     CCA1      CCA2      CCA3       CA1       CA2       CA3       CA4       CA5 
+0.3615566 0.1699600 0.1126167 0.3500372 0.2200788 0.1850741 0.1551179 0.1351054 
+      CA6       CA7       CA8       CA9      CA10      CA11      CA12      CA13 
+0.1002670 0.0772991 0.0536938 0.0365603 0.0350887 0.0282291 0.0170651 0.0122474 
+     CA14      CA15      CA16      CA17      CA18      CA19      CA20 
+0.0101910 0.0094701 0.0055090 0.0030529 0.0025118 0.0019485 0.0005178 
+> summary(ev)
+Importance of components:
+                        CCA1    CCA2    CCA3    CA1    CA2     CA3     CA4
+Eigenvalue            0.3616 0.16996 0.11262 0.3500 0.2201 0.18507 0.15512
+Proportion Explained  0.1736 0.08159 0.05406 0.1680 0.1056 0.08884 0.07446
+Cumulative Proportion 0.1736 0.25514 0.30920 0.4772 0.5829 0.67172 0.74618
+                          CA5     CA6     CA7     CA8     CA9    CA10    CA11
+Eigenvalue            0.13511 0.10027 0.07730 0.05369 0.03656 0.03509 0.02823
+Proportion Explained  0.06485 0.04813 0.03711 0.02577 0.01755 0.01684 0.01355
+Cumulative Proportion 0.81104 0.85917 0.89627 0.92205 0.93960 0.95644 0.96999
+                         CA12    CA13    CA14    CA15     CA16     CA17
+Eigenvalue            0.01707 0.01225 0.01019 0.00947 0.005509 0.003053
+Proportion Explained  0.00819 0.00588 0.00489 0.00455 0.002640 0.001470
+Cumulative Proportion 0.97818 0.98406 0.98895 0.99350 0.996140 0.997610
+                          CA18     CA19      CA20
+Eigenvalue            0.002512 0.001948 0.0005178
+Proportion Explained  0.001210 0.000940 0.0002500
+Cumulative Proportion 0.998820 0.999750 1.0000000
+> 
+> 
+> 
+> cleanEx()
+> nameEx("envfit")
+> ### * envfit
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: envfit
+> ### Title: Fits an Environmental Vector or Factor onto an Ordination
+> ### Aliases: envfit envfit.default envfit.formula vectorfit factorfit
+> ###   plot.envfit scores.envfit labels.envfit
+> ### Keywords: multivariate aplot htest
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> data(varechem)
+> library(MASS)
+> ord <- metaMDS(varespec)
+Square root transformation
+Wisconsin double standardization
+Run 0 stress 0.1843196 
+Run 1 stress 0.2455912 
+Run 2 stress 0.2169407 
+Run 3 stress 0.2313231 
+Run 4 stress 0.1974406 
+Run 5 stress 0.1858402 
+Run 6 stress 0.1948414 
+Run 7 stress 0.2265717 
+Run 8 stress 0.222507 
+Run 9 stress 0.2023215 
+Run 10 stress 0.2673177 
+Run 11 stress 0.1976151 
+Run 12 stress 0.1852397 
+Run 13 stress 0.2341085 
+Run 14 stress 0.1955867 
+Run 15 stress 0.2137409 
+Run 16 stress 0.2109638 
+Run 17 stress 0.1825658 
+... New best solution
+... Procrustes: rmse 0.04169825  max resid 0.1521436 
+Run 18 stress 0.1843197 
+Run 19 stress 0.2570119 
+Run 20 stress 0.3760596 
+*** No convergence -- monoMDS stopping criteria:
+    20: stress ratio > sratmax
+> (fit <- envfit(ord, varechem, perm = 999))
+
+***VECTORS
+
+            NMDS1    NMDS2     r2 Pr(>r)    
+N        -0.05719 -0.99836 0.2537  0.039 *  
+P         0.61959  0.78492 0.1938  0.129    
+K         0.76629  0.64249 0.1809  0.138    
+Ca        0.68506  0.72849 0.4119  0.005 ** 
+Mg        0.63240  0.77464 0.4271  0.005 ** 
+S         0.19123  0.98155 0.1752  0.133    
+Al       -0.87169  0.49006 0.5269  0.001 ***
+Fe       -0.93613  0.35164 0.4451  0.001 ***
+Mn        0.79873 -0.60169 0.5230  0.002 ** 
+Zn        0.61750  0.78657 0.1879  0.122    
+Mo       -0.90304  0.42955 0.0609  0.524    
+Baresoil  0.92503 -0.37988 0.2508  0.043 *  
+Humdepth  0.93291 -0.36011 0.5200  0.001 ***
+pH       -0.64809  0.76156 0.2308  0.064 .  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+Permutation: free
+Number of permutations: 999
+
+
+> scores(fit, "vectors")
+               NMDS1      NMDS2
+N        -0.02880854 -0.5028710
+P         0.27276629  0.3455503
+K         0.32594190  0.2732833
+Ca        0.43965251  0.4675260
+Mg        0.41327822  0.5062343
+S         0.08004855  0.4108725
+Al       -0.63277161  0.3557376
+Fe       -0.62453266  0.2345938
+Mn        0.57765765 -0.4351493
+Zn        0.26766914  0.3409611
+Mo       -0.22292390  0.1060370
+Baresoil  0.46323932 -0.1902392
+Humdepth  0.67274437 -0.2596855
+pH       -0.31133604  0.3658438
+> plot(ord)
+> plot(fit)
+> plot(fit, p.max = 0.05, col = "red")
+> ## Adding fitted arrows to CCA. We use "lc" scores, and hope
+> ## that arrows are scaled similarly in cca and envfit plots
+> 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")
+> 
+> ## Class variables, formula interface, and displaying the
+> ## inter-class variability with `ordispider', and semitransparent
+> ## white background for labels (semitransparent colours are not
+> ## supported by all graphics devices)
+> data(dune)
+> data(dune.env)
+> attach(dune.env)
+> ord <- cca(dune)
+> fit <- envfit(ord ~ Moisture + A1, dune.env, perm = 0)
+> plot(ord, type = "n")
+> ordispider(ord, Moisture, col="skyblue")
+> points(ord, display = "sites", col = as.numeric(Moisture), pch=16)
+> plot(fit, cex=1.2, axis=TRUE, bg = rgb(1, 1, 1, 0.5))
+> ## Use shorter labels for factor centroids
+> labels(fit)
+$vectors
+[1] "A1"
+
+$factors
+[1] "Moisture1" "Moisture2" "Moisture4" "Moisture5"
+
+> plot(ord)
+> plot(fit, labels=list(factors = paste("M", c(1,2,4,5), sep = "")),
++    bg = rgb(1,1,0,0.5))
+> detach(dune.env)
+> 
+> 
+> 
+> cleanEx()
+
+detaching ‘package:MASS’
+
+> nameEx("eventstar")
+> ### * eventstar
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: eventstar
+> ### Title: Scale Parameter at the Minimum of the Tsallis Evenness Profile
+> ### Aliases: eventstar
+> ### Keywords: optimize multivariate utilities
+> 
+> ### ** Examples
+> 
+> data(BCI)
+> (x <- eventstar(BCI[1:5,]))
+      qstar     Estar     Hstar    Dstar
+1 0.6146389 0.4263687 10.524584 67.03551
+2 0.6249249 0.4080263  9.534034 57.66840
+3 0.6380858 0.4062032  9.225458 57.69174
+4 0.6245808 0.4062213 10.140189 65.50247
+5 0.6404825 0.4219957  9.828138 66.96440
+> ## profiling
+> y <- as.numeric(BCI[10,])
+> (z <- eventstar(y))
+      qstar     Estar    Hstar    Dstar
+1 0.6372529 0.4117557 9.546332 61.77715
+> q <- seq(0, 2, 0.05)
+> Eprof <- tsallis(y, scales=q, norm=TRUE)
+> Hprof <- tsallis(y, scales=q)
+> Dprof <- tsallis(y, scales=q, hill=TRUE)
+> opar <- par(mfrow=c(3,1))
+> plot(q, Eprof, type="l", main="Evenness")
+> abline(v=z$qstar, h=tsallis(y, scales=z$qstar, norm=TRUE), col=2)
+> plot(q, Hprof, type="l", main="Diversity")
+> abline(v=z$qstar, h=tsallis(y, scales=z$qstar), col=2)
+> plot(q, Dprof, type="l", main="Effective number of species")
+> abline(v=z$qstar, h=tsallis(y, scales=z$qstar, hill=TRUE), col=2)
+> par(opar)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("fisherfit")
+> ### * fisherfit
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: fisherfit
+> ### Title: Fit Fisher's Logseries and Preston's Lognormal Model to
+> ###   Abundance Data
+> ### Aliases: fisherfit as.fisher plot.fisherfit prestonfit prestondistr
+> ###   as.preston plot.prestonfit lines.prestonfit plot.preston
+> ###   lines.preston plot.fisher veiledspec
+> ### Keywords: univar distribution
+> 
+> ### ** Examples
+> 
+> data(BCI)
+> mod <- fisherfit(BCI[5,])
+> mod
+
+Fisher log series model
+No. of species: 101 
+Fisher alpha:   37.96423 
+
+> # prestonfit seems to need large samples
+> mod.oct <- prestonfit(colSums(BCI))
+> mod.ll <- prestondistr(colSums(BCI))
+> mod.oct
+
+Preston lognormal model
+Method: Quasi-Poisson fit to octaves 
+No. of species: 225 
+
+     mode     width        S0 
+ 4.885798  2.932690 32.022923 
+
+Frequencies by Octave
+                0        1        2      3        4        5        6        7
+Observed 9.500000 16.00000 18.00000 19.000 30.00000 35.00000 31.00000 26.50000
+Fitted   7.994154 13.31175 19.73342 26.042 30.59502 31.99865 29.79321 24.69491
+                8        9       10     11
+Observed 18.00000 13.00000 7.000000 2.0000
+Fitted   18.22226 11.97021 7.000122 3.6443
+
+> mod.ll
+
+Preston lognormal model
+Method: maximized likelihood to log2 abundances 
+No. of species: 225 
+
+     mode     width        S0 
+ 4.365002  2.753531 33.458185 
+
+Frequencies by Octave
+               0        1        2        3        4        5        6        7
+Observed 9.50000 16.00000 18.00000 19.00000 30.00000 35.00000 31.00000 26.50000
+Fitted   9.52392 15.85637 23.13724 29.58961 33.16552 32.58022 28.05054 21.16645
+                8         9       10      11
+Observed 18.00000 13.000000 7.000000 2.00000
+Fitted   13.99829  8.113746 4.121808 1.83516
+
+> plot(mod.oct)  
+> lines(mod.ll, line.col="blue3") # Different
+> ## Smoothed density
+> den <- density(log2(colSums(BCI)))
+> lines(den$x, ncol(BCI)*den$y, lwd=2) # Fairly similar to mod.oct
+> ## Extrapolated richness
+> veiledspec(mod.oct)
+Extrapolated     Observed       Veiled 
+   235.40577    225.00000     10.40577 
+> veiledspec(mod.ll)
+Extrapolated     Observed       Veiled 
+  230.931018   225.000000     5.931018 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("goodness.cca")
+> ### * goodness.cca
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: goodness.cca
+> ### Title: Diagnostic Tools for [Constrained] Ordination (CCA, RDA, DCA,
+> ###   CA, PCA)
+> ### Aliases: goodness goodness.cca inertcomp spenvcor intersetcor vif.cca
+> ###   alias.cca
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> data(dune)
+> data(dune.env)
+> mod <- cca(dune ~ A1 + Management + Condition(Moisture), data=dune.env)
+> goodness(mod, addprevious = TRUE)
+               CCA1      CCA2      CCA3      CCA4
+Achimill 0.36630013 0.3822685 0.3838616 0.4934158
+Agrostol 0.67247051 0.6724758 0.6779597 0.7773267
+Airaprae 0.36213737 0.3698100 0.3816619 0.3908018
+Alopgeni 0.61547145 0.6966105 0.7042650 0.7212918
+Anthodor 0.24619147 0.2795001 0.3509172 0.3609709
+Bellpere 0.41185412 0.4179432 0.4847618 0.4849622
+Bromhord 0.33487622 0.3397416 0.3870032 0.5505037
+Chenalbu 0.23594716 0.2684323 0.2828928 0.2885321
+Cirsarve 0.29041563 0.3013655 0.3080671 0.3591280
+Comapalu 0.16338257 0.6836790 0.7390659 0.7963425
+Eleopalu 0.55132024 0.6099415 0.6193301 0.6259818
+Elymrepe 0.25239595 0.2710266 0.2761491 0.2882666
+Empenigr 0.27089495 0.3132399 0.3153052 0.3154203
+Hyporadi 0.31349648 0.3371809 0.3387669 0.3388716
+Juncarti 0.43923609 0.4492937 0.4871043 0.5224072
+Juncbufo 0.70439967 0.7226263 0.7228786 0.7257471
+Lolipere 0.48141171 0.5720410 0.5727299 0.6034007
+Planlanc 0.54969676 0.6084389 0.6802195 0.6826265
+Poaprat  0.40267189 0.4944813 0.5014516 0.5326546
+Poatriv  0.49694972 0.5409439 0.5468830 0.5594817
+Ranuflam 0.68677962 0.6983001 0.7020461 0.7064850
+Rumeacet 0.44788204 0.5211145 0.7673956 0.7691199
+Sagiproc 0.27039747 0.3497634 0.3553109 0.3613746
+Salirepe 0.64788354 0.7264891 0.7276110 0.7639711
+Scorautu 0.54312496 0.5510319 0.6078931 0.6140593
+Trifprat 0.37328840 0.4101104 0.6624199 0.6625703
+Trifrepe 0.03048149 0.2115857 0.3300132 0.4207437
+Vicilath 0.17824132 0.1784611 0.3762406 0.4279428
+Bracruta 0.15585567 0.1641095 0.1672797 0.2449864
+Callcusp 0.30771429 0.3143582 0.3308502 0.3518027
+> goodness(mod, addprevious = TRUE, summ = TRUE)
+ Achimill  Agrostol  Airaprae  Alopgeni  Anthodor  Bellpere  Bromhord  Chenalbu 
+0.4934158 0.7773267 0.3908018 0.7212918 0.3609709 0.4849622 0.5505037 0.2885321 
+ Cirsarve  Comapalu  Eleopalu  Elymrepe  Empenigr  Hyporadi  Juncarti  Juncbufo 
+0.3591280 0.7963425 0.6259818 0.2882666 0.3154203 0.3388716 0.5224072 0.7257471 
+ Lolipere  Planlanc   Poaprat   Poatriv  Ranuflam  Rumeacet  Sagiproc  Salirepe 
+0.6034007 0.6826265 0.5326546 0.5594817 0.7064850 0.7691199 0.3613746 0.7639711 
+ Scorautu  Trifprat  Trifrepe  Vicilath  Bracruta  Callcusp 
+0.6140593 0.6625703 0.4207437 0.4279428 0.2449864 0.3518027 
+> # Inertia components
+> inertcomp(mod, prop = TRUE)
+               pCCA        CCA        CA
+Achimill 0.34271900 0.15069678 0.5065842
+Agrostol 0.55602406 0.22130269 0.2226733
+Airaprae 0.06404726 0.32675457 0.6091982
+Alopgeni 0.34238968 0.37890210 0.2787082
+Anthodor 0.10259139 0.25837947 0.6390291
+Bellpere 0.40972447 0.07523776 0.5150378
+Bromhord 0.33046684 0.22003683 0.4494963
+Chenalbu 0.11064346 0.17788865 0.7114679
+Cirsarve 0.26649913 0.09262886 0.6408720
+Comapalu 0.16096277 0.63537969 0.2036575
+Eleopalu 0.53954819 0.08643366 0.3740182
+Elymrepe 0.22234322 0.06592337 0.7117334
+Empenigr 0.10361994 0.21180040 0.6845797
+Hyporadi 0.03889627 0.29997533 0.6611284
+Juncarti 0.43439190 0.08801527 0.4775928
+Juncbufo 0.66622672 0.05952038 0.2742529
+Lolipere 0.46273045 0.14067027 0.3965993
+Planlanc 0.51993753 0.16268893 0.3173735
+Poaprat  0.39408053 0.13857406 0.4673454
+Poatriv  0.05598349 0.50349824 0.4405183
+Ranuflam 0.68509904 0.02138594 0.2935150
+Rumeacet 0.40125987 0.36786003 0.2308801
+Sagiproc 0.26050435 0.10087025 0.6386254
+Salirepe 0.12527838 0.63869277 0.2360289
+Scorautu 0.10895437 0.50510492 0.3859407
+Trifprat 0.34544815 0.31712212 0.3374297
+Trifrepe 0.02132183 0.39942191 0.5792563
+Vicilath 0.12125433 0.30668844 0.5720572
+Bracruta 0.07222706 0.17275938 0.7550136
+Callcusp 0.29447422 0.05732850 0.6481973
+> inertcomp(mod, stat="d")
+               pCCA        CCA         CA
+Achimill 0.74393575 0.32711556  1.0996359
+Agrostol 0.65154706 0.25932172  0.2609277
+Airaprae 0.91341031 4.66001211  8.6880830
+Alopgeni 0.62026287 0.68640768  0.5048995
+Anthodor 0.31403667 0.79091068  1.9560957
+Bellpere 0.81483759 0.14962874  1.0242789
+Bromhord 0.82257902 0.54770300  1.1188603
+Chenalbu 2.18604651 3.51464840 14.0568809
+Cirsarve 3.79020979 1.31738817  9.1146243
+Comapalu 2.18604651 8.62913533  2.7658870
+Eleopalu 2.18604651 0.35019669  1.5153810
+Elymrepe 0.51093664 0.15148951  1.6355375
+Empenigr 2.18604651 4.46830527 14.4424224
+Hyporadi 0.35520990 2.73944513  6.0375798
+Juncarti 1.36667524 0.27691192  1.5025932
+Juncbufo 2.60346194 0.23259205  1.0717177
+Lolipere 0.43502729 0.13224850  0.3728553
+Planlanc 0.96463794 0.30183609  0.5888218
+Poaprat  0.20406096 0.07175578  0.2419987
+Poatriv  0.03136359 0.28207442  0.2467912
+Ranuflam 2.18604651 0.06823926  0.9365617
+Rumeacet 1.09684464 1.00554611  0.6311112
+Sagiproc 0.51772816 0.20047024  1.2692085
+Salirepe 0.88898328 4.53220433  1.6748757
+Scorautu 0.03887246 0.18021004  0.1376949
+Trifprat 1.74000000 1.59732360  1.6996117
+Trifrepe 0.01215418 0.22768437  0.3301962
+Vicilath 0.84063811 2.12622500  3.9659871
+Bracruta 0.04517898 0.10806328  0.4722710
+Callcusp 2.18604651 0.42558147  4.8119302
+> # vif.cca 
+> vif.cca(mod)
+  Moisture.L   Moisture.Q   Moisture.C           A1 ManagementHF ManagementNM 
+    1.504327     1.284489     1.347660     1.367328     2.238653     2.570972 
+ManagementSF 
+    2.424444 
+> # Aliased constraints
+> mod <- cca(dune ~ ., dune.env)
+> mod
+Call: cca(formula = dune ~ A1 + Moisture + Management + Use + Manure,
+data = dune.env)
+
+              Inertia Proportion Rank
+Total          2.1153     1.0000     
+Constrained    1.5032     0.7106   12
+Unconstrained  0.6121     0.2894    7
+Inertia is mean squared contingency coefficient 
+Some constraints were aliased because they were collinear (redundant)
+
+Eigenvalues for constrained axes:
+  CCA1   CCA2   CCA3   CCA4   CCA5   CCA6   CCA7   CCA8   CCA9  CCA10  CCA11 
+0.4671 0.3410 0.1761 0.1532 0.0953 0.0703 0.0589 0.0499 0.0318 0.0260 0.0228 
+ CCA12 
+0.0108 
+
+Eigenvalues for unconstrained axes:
+    CA1     CA2     CA3     CA4     CA5     CA6     CA7 
+0.27237 0.10876 0.08975 0.06305 0.03489 0.02529 0.01798 
+
+> vif.cca(mod)
+          A1   Moisture.L   Moisture.Q   Moisture.C ManagementHF ManagementNM 
+    2.208249     2.858927     3.072715     3.587087     6.608315   142.359372 
+ManagementSF        Use.L        Use.Q     Manure.L     Manure.Q     Manure.C 
+   12.862713     2.642718     3.007238    80.828330    49.294455    21.433337 
+    Manure^4 
+          NA 
+> alias(mod)
+Model :
+dune ~ A1 + Moisture + Management + Use + Manure
+
+Complete :
+         A1 Moisture.L Moisture.Q Moisture.C ManagementHF ManagementNM
+Manure^4                                                   8.366600   
+         ManagementSF Use.L Use.Q Manure.L  Manure.Q  Manure.C 
+Manure^4                           5.291503 -4.472136  2.645751
+
+> with(dune.env, table(Management, Manure))
+          Manure
+Management 0 1 2 3 4
+        BF 0 2 1 0 0
+        HF 0 1 2 2 0
+        NM 6 0 0 0 0
+        SF 0 0 1 2 3
+> # The standard correlations (not recommended)
+> spenvcor(mod)
+     CCA1      CCA2      CCA3      CCA4      CCA5      CCA6      CCA7      CCA8 
+0.9636021 0.9486511 0.9330434 0.8734524 0.9374495 0.8362375 0.9748848 0.8392780 
+     CCA9     CCA10     CCA11     CCA12 
+0.8747389 0.6096594 0.6637148 0.7579916 
+> intersetcor(mod)
+                   CCA1        CCA2        CCA3         CCA4        CCA5
+A1           -0.5321996 -0.13912207 -0.48150939 -0.259433707  0.09911786
+Moisture.L   -0.8785172 -0.18040189  0.03644505  0.182602811  0.09837305
+Moisture.Q   -0.1946874  0.32977037 -0.27391819 -0.180009911 -0.26613363
+Moisture.C   -0.2019848  0.09650383  0.28577179 -0.261556870  0.49109525
+ManagementHF  0.3451922 -0.01403625 -0.51180235  0.193533258 -0.30824886
+ManagementNM -0.5683132  0.61018732  0.14614372 -0.012375462 -0.04575256
+ManagementSF -0.1197518 -0.64162158  0.19778688  0.134961914  0.09680582
+Use.L        -0.1875733 -0.33013591 -0.30944066 -0.372831885 -0.09587365
+Use.Q        -0.1814760  0.48858573 -0.02033145 -0.009560403 -0.04810528
+Manure.L      0.3156026 -0.65867454  0.03849174 -0.026284481  0.04074238
+Manure.Q     -0.4052775  0.20889368  0.49284523 -0.175984063 -0.11995731
+Manure.C      0.4667289 -0.11239457  0.29234452 -0.174073605 -0.14234406
+Manure^4      0.2220470  0.12845556 -0.12903663  0.108230657  0.02558063
+                    CCA6        CCA7        CCA8        CCA9        CCA10
+A1           -0.15308984 -0.25797100 -0.19234827  0.27570098 -0.116893686
+Moisture.L   -0.02975258 -0.07850852  0.10802259 -0.07239493  0.094640487
+Moisture.Q   -0.11254617 -0.05055234  0.48336992 -0.06243695 -0.205959907
+Moisture.C   -0.23606190  0.38701844  0.10155264  0.21874286  0.187345861
+ManagementHF -0.24233160 -0.16420200  0.14035917 -0.30903312  0.132635464
+ManagementNM -0.06594907 -0.23981367 -0.14368858  0.26879033 -0.001606144
+ManagementSF -0.01616968  0.49727982 -0.08071454  0.30247100 -0.138224363
+Use.L         0.19132865  0.44624441  0.18449673 -0.12952535  0.045337916
+Use.Q         0.13464687 -0.10362907  0.11033206 -0.41344859 -0.077048641
+Manure.L     -0.22218417  0.49678602  0.16957558  0.04161905 -0.003418114
+Manure.Q     -0.19580363  0.12001390 -0.17608393  0.43863133  0.089074448
+Manure.C      0.14824215 -0.07859941 -0.37823472 -0.10058265  0.106319365
+Manure^4     -0.36675058 -0.05957188 -0.40937365  0.06097317 -0.149858571
+                   CCA11       CCA12
+A1            0.03742925  0.08998648
+Moisture.L   -0.06274844  0.08674397
+Moisture.Q    0.21943291 -0.16867562
+Moisture.C   -0.13658737  0.14298295
+ManagementHF -0.17603113 -0.13480899
+ManagementNM  0.01749194 -0.09355925
+ManagementSF  0.01483251  0.06624422
+Use.L         0.08583483 -0.32574274
+Use.Q        -0.41869776 -0.04845019
+Manure.L     -0.02629234 -0.13200710
+Manure.Q     -0.12708874 -0.06972694
+Manure.C     -0.05332901  0.41503090
+Manure^4      0.41602035 -0.01685222
+> 
+> 
+> 
+> cleanEx()
+> nameEx("goodness.metaMDS")
+> ### * goodness.metaMDS
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: goodness.metaMDS
+> ### Title: Goodness of Fit and Shepard Plot for Nonmetric Multidimensional
+> ###   Scaling
+> ### Aliases: goodness.metaMDS goodness.monoMDS stressplot
+> ###   stressplot.default stressplot.monoMDS
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> mod <- metaMDS(varespec)
+Square root transformation
+Wisconsin double standardization
+Run 0 stress 0.1843196 
+Run 1 stress 0.2455912 
+Run 2 stress 0.2169407 
+Run 3 stress 0.2313231 
+Run 4 stress 0.1974406 
+Run 5 stress 0.1858402 
+Run 6 stress 0.1948414 
+Run 7 stress 0.2265717 
+Run 8 stress 0.222507 
+Run 9 stress 0.2023215 
+Run 10 stress 0.2673177 
+Run 11 stress 0.1976151 
+Run 12 stress 0.1852397 
+Run 13 stress 0.2341085 
+Run 14 stress 0.1955867 
+Run 15 stress 0.2137409 
+Run 16 stress 0.2109638 
+Run 17 stress 0.1825658 
+... New best solution
+... Procrustes: rmse 0.04169825  max resid 0.1521436 
+Run 18 stress 0.1843197 
+Run 19 stress 0.2570119 
+Run 20 stress 0.3760596 
+*** No convergence -- monoMDS stopping criteria:
+    20: stress ratio > sratmax
+> stressplot(mod)
+> gof <- goodness(mod)
+> gof
+ [1] 0.02984480 0.03513719 0.04188277 0.04598591 0.04003418 0.03441705
+ [7] 0.03294386 0.03050002 0.03060565 0.02993891 0.03526891 0.02621276
+[13] 0.03831284 0.02980754 0.03370603 0.02225802 0.03561193 0.03505161
+[19] 0.06577544 0.03268484 0.03503582 0.02956571 0.05167231 0.04602312
+> plot(mod, display = "sites", type = "n")
+> points(mod, display = "sites", cex = 2*gof/mean(gof))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("humpfit")
+> ### * humpfit
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: humpfit
+> ### Title: No-interaction Model for Hump-backed Species Richness vs.
+> ###   Biomass
+> ### Aliases: humpfit summary.humpfit lines.humpfit plot.humpfit
+> ###   points.humpfit predict.humpfit profile.humpfit
+> ### Keywords: models regression nonlinear
+> 
+> ### ** Examples
+> 
+> ##
+> ## Data approximated from Al-Mufti et al. (1977)
+> ##
+> 
+> 
+> 
+> cleanEx()
+> nameEx("indpower")
+> ### * indpower
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: indpower
+> ### Title: Indicator Power of Species
+> ### Aliases: indpower
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> data(dune)
+> ## IP values
+> ip <- indpower(dune)
+> ## and TIP values
+> diag(ip) <- NA
+> (TIP <- rowMeans(ip, na.rm=TRUE))
+i.Achimill i.Agrostol i.Airaprae i.Alopgeni i.Anthodor i.Bellpere i.Bromhord 
+ 0.3186250  0.3342800  0.2168133  0.3416198  0.3567884  0.3432281  0.3665632 
+i.Chenalbu i.Cirsarve i.Comapalu i.Eleopalu i.Elymrepe i.Empenigr i.Hyporadi 
+ 0.2095044  0.2781640  0.1713273  0.2414787  0.3263516  0.2016196  0.2378197 
+i.Juncarti i.Juncbufo i.Lolipere i.Planlanc  i.Poaprat  i.Poatriv i.Ranuflam 
+ 0.2915850  0.3331330  0.3998442  0.3426064  0.4094319  0.3929520  0.2663080 
+i.Rumeacet i.Sagiproc i.Salirepe i.Scorautu i.Trifprat i.Trifrepe i.Vicilath 
+ 0.3484684  0.3788905  0.2898512  0.4362493  0.3145854  0.4503764  0.2605349 
+i.Bracruta i.Callcusp 
+ 0.4252676  0.2070766 
+> 
+> ## p value calculation for a species
+> ## from Halme et al. 2009
+> ## i is ID for the species
+> i <- 1
+> fun <- function(x, i) indpower(x)[i,-i]
+> ## 'c0' randomizes species occurrences
+> os <- oecosimu(dune, fun, "c0", i=i, nsimul=99)
+Warning in oecosimu(dune, fun, "c0", i = i, nsimul = 99) :
+  nullmodel transformed 'comm' to binary data
+> ## get z values from oecosimu output
+> z <- os$oecosimu$z
+> ## p-value
+> (p <- sum(z) / sqrt(length(z)))
+[1] -2.051592
+> ## 'heterogeneity' measure
+> (chi2 <- sum((z - mean(z))^2))
+[1] 100.6288
+> pchisq(chi2, df=length(z)-1)
+[1] 1
+> ## Halme et al.'s suggested output
+> out <- c(TIP=TIP[i], 
++     significance=p,
++     heterogeneity=chi2,
++     minIP=min(fun(dune, i=i)),
++     varIP=sd(fun(dune, i=i)^2))
+> out
+TIP.i.Achimill   significance  heterogeneity          minIP          varIP 
+     0.3186250     -2.0515917    100.6288432      0.0000000      0.2142097 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("isomap")
+> ### * isomap
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: isomap
+> ### Title: Isometric Feature Mapping Ordination
+> ### Aliases: isomap isomapdist plot.isomap summary.isomap
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> ## The following examples also overlay minimum spanning tree to
+> ## the graphics in red.
+> op <- par(mar=c(4,4,1,1)+0.2, mfrow=c(2,2))
+> data(BCI)
+> dis <- vegdist(BCI)
+> tr <- spantree(dis)
+> pl <- ordiplot(cmdscale(dis), main="cmdscale")
+Warning in ordiplot(cmdscale(dis), main = "cmdscale") :
+  Species scores not available
+> lines(tr, pl, col="red")
+> ord <- isomap(dis, k=3)
+> ord
+
+Isometric Feature Mapping (isomap)
+
+Call:
+isomap(dist = dis, k = 3) 
+
+Distance method: bray shortest isomap 
+Criterion: k = 3 
+> pl <- plot(ord, main="isomap k=3")
+> lines(tr, pl, col="red")
+> pl <- plot(isomap(dis, k=5), main="isomap k=5")
+> lines(tr, pl, col="red")
+> pl <- plot(isomap(dis, epsilon=0.45), main="isomap epsilon=0.45")
+> lines(tr, pl, col="red")
+> par(op)
+> ## colour points and web by the dominant species
+> dom <- apply(BCI, 1, which.max)
+> ## need nine colours, but default palette  has only eight
+> op <- palette(c(palette("default"), "sienna"))
+> plot(ord, pch = 16, col = dom, n.col = dom) 
+> palette(op)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("kendall.global")
+> ### * kendall.global
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: kendall.global
+> ### Title: Kendall coefficient of concordance
+> ### Aliases: kendall.global kendall.post
+> ### Keywords: multivariate nonparametric
+> 
+> ### ** Examples
+> 
+> data(mite)
+> mite.hel <- decostand(mite, "hel")
+> 
+> # Reproduce the results shown in Table 2 of Legendre (2005), a single group
+> mite.small <- mite.hel[c(4,9,14,22,31,34,45,53,61,69),c(13:15,23)]
+> kendall.global(mite.small, nperm=49)
+$Concordance_analysis
+              Group.1
+W          0.44160305
+F          2.37252221
+Prob.F     0.04403791
+Chi2      15.89770992
+Prob.perm  0.04000000
+
+attr(,"class")
+[1] "kendall.global"
+> kendall.post(mite.small, mult="holm", nperm=49)
+$A_posteriori_tests
+                    TVEL      ONOV      SUCT   Trhypch1
+Spearman.mean  0.3265678 0.3965503 0.4570402 -0.1681251
+W.per.species  0.4949258 0.5474127 0.5927802  0.1239061
+Prob           0.1400000 0.0200000 0.0200000  0.7200000
+Corrected prob 0.2800000 0.0800000 0.0800000  0.7200000
+
+$Correction.type
+[1] "holm"
+
+attr(,"class")
+[1] "kendall.post"
+> 
+> # Reproduce the results shown in Tables 3 and 4 of Legendre (2005), 2 groups
+> group <-c(1,1,2,1,1,1,1,1,2,1,1,1,1,1,1,2,1,2,1,1,1,1,2,1,2,1,1,1,1,1,2,2,2,2,2)
+> kendall.global(mite.hel, group=group, nperm=49)
+$Concordance_analysis
+                         Group.1      Group.2
+W                   3.097870e-01 2.911888e-01
+F                   1.032305e+01 4.108130e+00
+Prob.F              1.177138e-85 4.676566e-22
+Corrected prob.F    2.354275e-85 4.676566e-22
+Chi2                5.130073e+02 2.210123e+02
+Prob.perm           2.000000e-02 2.000000e-02
+Corrected prob.perm 4.000000e-02 4.000000e-02
+
+$Correction.type
+[1] "holm"
+
+attr(,"class")
+[1] "kendall.global"
+> kendall.post(mite.hel, group=group, mult="holm", nperm=49)
+$A_posteriori_tests_Group
+$A_posteriori_tests_Group[[1]]
+                  Brachy      PHTH     RARD      SSTR   Protopl      MEGR
+Spearman.mean  0.1851177 0.4258111 0.359058 0.2505486 0.1802160 0.2833298
+W.per.species  0.2190711 0.4497357 0.385764 0.2817757 0.2143736 0.3131911
+Prob           0.0200000 0.0200000 0.020000 0.0200000 0.0200000 0.0200000
+Corrected prob 0.7000000 0.7000000 0.700000 0.7000000 0.7000000 0.7000000
+                     MPRO      HMIN     HMIN2      NPRA      TVEL      ONOV
+Spearman.mean  0.09248024 0.2444656 0.4138494 0.1263751 0.4177343 0.3301159
+W.per.species  0.13029357 0.2759462 0.4382723 0.1627761 0.4419954 0.3580278
+Prob           0.22000000 0.0200000 0.0200000 0.0400000 0.0200000 0.0200000
+Corrected prob 0.70000000 0.7000000 0.7000000 0.7000000 0.7000000 0.7000000
+                    SUCT Oribatl1      PWIL  Galumna1  Stgncrs2      HRUF
+Spearman.mean  0.2185421 0.421216 0.2574779 0.4180699 0.3623428 0.1250230
+W.per.species  0.2511028 0.445332 0.2884163 0.4423170 0.3889118 0.1614804
+Prob           0.0200000 0.020000 0.0200000 0.0200000 0.0200000 0.0400000
+Corrected prob 0.7000000 0.700000 0.7000000 0.7000000 0.7000000 0.7000000
+                    PPEL      SLAT      FSET  Lepidzts  Eupelops  Miniglmn
+Spearman.mean  0.2188216 0.3016159 0.4217606 0.2577037 0.1108022 0.2301430
+W.per.species  0.2513707 0.3307153 0.4458539 0.2886327 0.1478521 0.2622203
+Prob           0.0200000 0.0200000 0.0200000 0.0200000 0.0600000 0.0200000
+Corrected prob 0.7000000 0.7000000 0.7000000 0.7000000 0.7000000 0.7000000
+
+$A_posteriori_tests_Group[[2]]
+                    HPAV      TVIE      LCIL  Ceratoz1  Trhypch1      NCOR
+Spearman.mean  0.1222579 0.2712078 0.1906408 0.1375601 0.1342409 0.3342345
+W.per.species  0.2020527 0.3374616 0.2642189 0.2159637 0.2129463 0.3947586
+Prob           0.0800000 0.0200000 0.0200000 0.0200000 0.0400000 0.0200000
+Corrected prob 0.7000000 0.7000000 0.7000000 0.7000000 0.7000000 0.7000000
+                    LRUG     PLAG2  Ceratoz3  Oppiminu  Trimalc2
+Spearman.mean  0.3446561 0.1833099 0.3188922 0.1764232 0.2498877
+W.per.species  0.4042328 0.2575544 0.3808111 0.2512938 0.3180797
+Prob           0.0200000 0.0200000 0.0200000 0.0200000 0.0200000
+Corrected prob 0.7000000 0.7000000 0.7000000 0.7000000 0.7000000
+
+
+$Correction.type
+[1] "holm"
+
+attr(,"class")
+[1] "kendall.post"
+> 
+> # NOTE: 'nperm' argument usually needs to be larger than 49.
+> # It was set to this low value for demonstration purposes.
+> 
+> 
+> 
+> cleanEx()
+> nameEx("linestack")
+> ### * linestack
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: linestack
+> ### Title: Plots One-dimensional Diagrams without Overwriting Labels
+> ### Aliases: linestack
+> ### Keywords: hplot aplot
+> 
+> ### ** Examples
+> 
+> ## First DCA axis
+> data(dune)
+> ord <- decorana(dune)
+> linestack(scores(ord, choices=1, display="sp"))
+> linestack(scores(ord, choices=1, display="si"), side="left", add=TRUE)
+> title(main="DCA axis 1")
+> 
+> ## Expressions as labels
+> N <- 10					# Number of sites
+> df <- data.frame(Ca = rlnorm(N, 2), NO3 = rlnorm(N, 4),
++                  SO4 = rlnorm(N, 10), K = rlnorm(N, 3))
+> ord <- rda(df, scale = TRUE)
+> ### vector of expressions for labels
+> labs <- expression(Ca^{2+phantom()},
++                    NO[3]^{-phantom()},
++                    SO[4]^{-2},
++                    K^{+phantom()})
+> scl <- "sites"
+> linestack(scores(ord, choices = 1, display = "species", scaling = scl),
++           labels = labs, air = 2)
+> linestack(scores(ord, choices = 1, display = "site", scaling = scl),
++           side = "left", add = TRUE)
+> title(main = "PCA axis 1")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("make.cepnames")
+> ### * make.cepnames
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: make.cepnames
+> ### Title: Abbreviates a Botanical or Zoological Latin Name into an
+> ###   Eight-character Name
+> ### Aliases: make.cepnames
+> ### Keywords: character
+> 
+> ### ** Examples
+> 
+> make.cepnames(c("Aa maderoi", "Poa sp.", "Cladina rangiferina",
++ "Cladonia cornuta", "Cladonia cornuta var. groenlandica",
++ "Cladonia rangiformis", "Bryoerythrophyllum"))
+[1] "Aamade"     "Poasp"      "Cladrang"   "Cladcorn"   "Cladgroe"  
+[6] "Cladrang.1" "Bryrythr"  
+> data(BCI)
+> colnames(BCI) <- make.cepnames(colnames(BCI))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("mantel")
+> ### * mantel
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: mantel
+> ### Title: Mantel and Partial Mantel Tests for Dissimilarity Matrices
+> ### Aliases: mantel mantel.partial
+> ### Keywords: multivariate htest
+> 
+> ### ** Examples
+> 
+> ## Is vegetation related to environment?
+> data(varespec)
+> data(varechem)
+> veg.dist <- vegdist(varespec) # Bray-Curtis
+> env.dist <- vegdist(scale(varechem), "euclid")
+> mantel(veg.dist, env.dist)
+
+Mantel statistic based on Pearson's product-moment correlation 
+
+Call:
+mantel(xdis = veg.dist, ydis = env.dist) 
+
+Mantel statistic r: 0.3047 
+      Significance: 0.001 
+
+Upper quantiles of permutations (null model):
+  90%   95% 97.5%   99% 
+0.107 0.145 0.169 0.200 
+Permutation: free
+Number of permutations: 999
+
+> mantel(veg.dist, env.dist, method="spear")
+
+Mantel statistic based on Spearman's rank correlation rho 
+
+Call:
+mantel(xdis = veg.dist, ydis = env.dist, method = "spear") 
+
+Mantel statistic r: 0.2838 
+      Significance: 0.001 
+
+Upper quantiles of permutations (null model):
+  90%   95% 97.5%   99% 
+0.108 0.141 0.169 0.196 
+Permutation: free
+Number of permutations: 999
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("mantel.correlog")
+> ### * mantel.correlog
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: mantel.correlog
+> ### Title: Mantel Correlogram
+> ### Aliases: mantel.correlog plot.mantel.correlog
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+>    
+> # Mite data available in "vegan"
+> data(mite)        
+> data(mite.xy)  
+> mite.hel <- decostand(mite, "hellinger")
+> 
+> # Detrend the species data by regression on the site coordinates
+> mite.hel.resid <- resid(lm(as.matrix(mite.hel) ~ ., data=mite.xy))
+> 
+> # Compute the detrended species distance matrix
+> mite.hel.D <- dist(mite.hel.resid)
+> 
+> # Compute Mantel correlogram with cutoff, Pearson statistic
+> mite.correlog <- mantel.correlog(mite.hel.D, XY=mite.xy, nperm=49)
+> summary(mite.correlog)
+           Length Class  Mode     
+mantel.res 65     -none- numeric  
+n.class     1     -none- numeric  
+break.pts  14     -none- numeric  
+mult        1     -none- character
+n.tests     1     -none- numeric  
+call        4     -none- call     
+> mite.correlog   
+
+Mantel Correlogram Analysis
+
+Call:
+ 
+mantel.correlog(D.eco = mite.hel.D, XY = mite.xy, nperm = 49) 
+
+        class.index     n.dist Mantel.cor Pr(Mantel) Pr(corrected)  
+D.cl.1     0.514182 358.000000   0.135713       0.02          0.02 *
+D.cl.2     1.242546 650.000000   0.118174       0.02          0.04 *
+D.cl.3     1.970910 796.000000   0.037820       0.04          0.06 .
+D.cl.4     2.699274 696.000000  -0.098605       0.02          0.08 .
+D.cl.5     3.427638 500.000000  -0.112682       0.02          0.10 .
+D.cl.6     4.156002 468.000000  -0.107603       0.02          0.12  
+D.cl.7     4.884366 364.000000  -0.022264       0.16          0.16  
+D.cl.8     5.612730 326.000000         NA         NA            NA  
+D.cl.9     6.341094 260.000000         NA         NA            NA  
+D.cl.10    7.069458 184.000000         NA         NA            NA  
+D.cl.11    7.797822 130.000000         NA         NA            NA  
+D.cl.12    8.526186  66.000000         NA         NA            NA  
+D.cl.13    9.254550  32.000000         NA         NA            NA  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> # or: print(mite.correlog)
+> # or: print.mantel.correlog(mite.correlog)
+> plot(mite.correlog)
+> 
+> # Compute Mantel correlogram without cutoff, Spearman statistic
+> mite.correlog2 <- mantel.correlog(mite.hel.D, XY=mite.xy, cutoff=FALSE, 
++    r.type="spearman", nperm=49)
+> summary(mite.correlog2)
+           Length Class  Mode     
+mantel.res 65     -none- numeric  
+n.class     1     -none- numeric  
+break.pts  14     -none- numeric  
+mult        1     -none- character
+n.tests     1     -none- numeric  
+call        6     -none- call     
+> mite.correlog2
+
+Mantel Correlogram Analysis
+
+Call:
+ 
+mantel.correlog(D.eco = mite.hel.D, XY = mite.xy, cutoff = FALSE,      r.type = "spearman", nperm = 49) 
+
+        class.index     n.dist Mantel.cor Pr(Mantel) Pr(corrected)  
+D.cl.1     0.514182 358.000000   0.134229       0.02          0.02 *
+D.cl.2     1.242546 650.000000   0.121270       0.02          0.04 *
+D.cl.3     1.970910 796.000000   0.035413       0.04          0.06 .
+D.cl.4     2.699274 696.000000  -0.095899       0.02          0.08 .
+D.cl.5     3.427638 500.000000  -0.118692       0.02          0.10 .
+D.cl.6     4.156002 468.000000  -0.117148       0.02          0.12  
+D.cl.7     4.884366 364.000000  -0.031123       0.06          0.14  
+D.cl.8     5.612730 326.000000   0.026064       0.06          0.16  
+D.cl.9     6.341094 260.000000   0.050573       0.04          0.18  
+D.cl.10    7.069458 184.000000   0.057017       0.02          0.20  
+D.cl.11    7.797822 130.000000   0.036195       0.08          0.22  
+D.cl.12    8.526186  66.000000  -0.054242       0.04          0.24  
+D.cl.13    9.254550  32.000000  -0.066677       0.02          0.26  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> plot(mite.correlog2)
+> 
+> # NOTE: 'nperm' argument usually needs to be larger than 49.
+> # It was set to this low value for demonstration purposes.
+> 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("metaMDS")
+> ### * metaMDS
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: metaMDS
+> ### Title: Nonmetric Multidimensional Scaling with Stable Solution from
+> ###   Random Starts, Axis Scaling and Species Scores
+> ### Aliases: metaMDS metaMDSdist metaMDSiter metaMDSredist initMDS postMDS
+> ###   plot.metaMDS points.metaMDS text.metaMDS scores.metaMDS
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> ## The recommended way of running NMDS (Minchin 1987)
+> ##
+> data(dune)
+> # Global NMDS using monoMDS
+> sol <- metaMDS(dune)
+Run 0 stress 0.1192678 
+Run 1 stress 0.1886532 
+Run 2 stress 0.1192678 
+... New best solution
+... Procrustes: rmse 4.497004e-05  max resid 0.0001297349 
+... Similar to previous best
+Run 3 stress 0.1192678 
+... New best solution
+... Procrustes: rmse 1.801542e-05  max resid 5.078152e-05 
+... Similar to previous best
+Run 4 stress 0.1183186 
+... New best solution
+... Procrustes: rmse 0.02025988  max resid 0.06488321 
+Run 5 stress 0.1192685 
+Run 6 stress 0.1939202 
+Run 7 stress 0.1808919 
+Run 8 stress 0.1183186 
+... Procrustes: rmse 1.538285e-05  max resid 4.789705e-05 
+... Similar to previous best
+Run 9 stress 0.1192679 
+Run 10 stress 0.1183186 
+... New best solution
+... Procrustes: rmse 1.244871e-05  max resid 3.745684e-05 
+... Similar to previous best
+Run 11 stress 0.1192686 
+Run 12 stress 0.1192683 
+Run 13 stress 0.1886532 
+Run 14 stress 0.1183186 
+... Procrustes: rmse 2.260742e-06  max resid 5.293932e-06 
+... Similar to previous best
+Run 15 stress 0.1192678 
+Run 16 stress 0.1183186 
+... Procrustes: rmse 3.225938e-06  max resid 7.314283e-06 
+... Similar to previous best
+Run 17 stress 0.2075713 
+Run 18 stress 0.1192678 
+Run 19 stress 0.1192685 
+Run 20 stress 0.1183186 
+... Procrustes: rmse 2.295609e-05  max resid 6.384852e-05 
+... Similar to previous best
+*** Solution reached
+> sol
+
+Call:
+metaMDS(comm = dune) 
+
+global Multidimensional Scaling using monoMDS
+
+Data:     dune 
+Distance: bray 
+
+Dimensions: 2 
+Stress:     0.1183186 
+Stress type 1, weak ties
+Two convergent solutions found after 20 tries
+Scaling: centring, PC rotation, halfchange scaling 
+Species: expanded scores based on ‘dune’ 
+
+> plot(sol, type="t")
+> ## Start from previous best solution
+> sol <- metaMDS(dune, previous.best = sol)
+Starting from 2-dimensional configuration
+Run 0 stress 0.1183186 
+Run 1 stress 0.1183186 
+... Procrustes: rmse 1.39695e-05  max resid 4.609836e-05 
+... Similar to previous best
+Run 2 stress 0.181294 
+Run 3 stress 0.1183186 
+... Procrustes: rmse 1.222929e-05  max resid 3.671397e-05 
+... Similar to previous best
+Run 4 stress 0.1192678 
+Run 5 stress 0.1192679 
+Run 6 stress 0.1183186 
+... Procrustes: rmse 3.046112e-05  max resid 9.621436e-05 
+... Similar to previous best
+Run 7 stress 0.1183186 
+... New best solution
+... Procrustes: rmse 8.248765e-06  max resid 2.709666e-05 
+... Similar to previous best
+Run 8 stress 0.1192679 
+Run 9 stress 0.1183186 
+... Procrustes: rmse 4.987329e-05  max resid 0.0001617922 
+... Similar to previous best
+Run 10 stress 0.1183186 
+... Procrustes: rmse 6.258948e-05  max resid 0.0001841984 
+... Similar to previous best
+Run 11 stress 0.1183186 
+... Procrustes: rmse 2.298969e-05  max resid 7.777073e-05 
+... Similar to previous best
+Run 12 stress 0.1183186 
+... Procrustes: rmse 9.953516e-05  max resid 0.0002971112 
+... Similar to previous best
+Run 13 stress 0.1192679 
+Run 14 stress 0.1183186 
+... Procrustes: rmse 0.0001064944  max resid 0.0003485089 
+... Similar to previous best
+Run 15 stress 0.1192678 
+Run 16 stress 0.1183187 
+... Procrustes: rmse 6.269441e-05  max resid 0.0001989035 
+... Similar to previous best
+Run 17 stress 0.1192685 
+Run 18 stress 0.1192679 
+Run 19 stress 0.1192683 
+Run 20 stress 0.1809581 
+*** Solution reached
+> ## Local NMDS and stress 2 of monoMDS
+> sol2 <- metaMDS(dune, model = "local", stress=2)
+Run 0 stress 0.1928489 
+Run 1 stress 0.1928478 
+... New best solution
+... Procrustes: rmse 0.000227748  max resid 0.0006739712 
+... Similar to previous best
+Run 2 stress 0.1928479 
+... Procrustes: rmse 0.0005683554  max resid 0.001654113 
+... Similar to previous best
+Run 3 stress 0.1928529 
+... Procrustes: rmse 0.001497169  max resid 0.004237256 
+... Similar to previous best
+Run 4 stress 0.1928479 
+... Procrustes: rmse 0.0002205786  max resid 0.000527516 
+... Similar to previous best
+Run 5 stress 0.1928542 
+... Procrustes: rmse 0.001703784  max resid 0.00489439 
+... Similar to previous best
+Run 6 stress 0.192857 
+... Procrustes: rmse 0.002035406  max resid 0.005757312 
+... Similar to previous best
+Run 7 stress 0.1928513 
+... Procrustes: rmse 0.0003555387  max resid 0.0009295202 
+... Similar to previous best
+Run 8 stress 0.1928514 
+... Procrustes: rmse 0.00131401  max resid 0.003754444 
+... Similar to previous best
+Run 9 stress 0.1928527 
+... Procrustes: rmse 0.001508577  max resid 0.004304102 
+... Similar to previous best
+Run 10 stress 0.1928516 
+... Procrustes: rmse 0.001200753  max resid 0.003381483 
+... Similar to previous best
+Run 11 stress 0.1928477 
+... New best solution
+... Procrustes: rmse 0.0002147781  max resid 0.0005379322 
+... Similar to previous best
+Run 12 stress 0.1928476 
+... New best solution
+... Procrustes: rmse 8.797899e-05  max resid 0.0002368433 
+... Similar to previous best
+Run 13 stress 0.1928518 
+... Procrustes: rmse 0.001194318  max resid 0.003382898 
+... Similar to previous best
+Run 14 stress 0.1928479 
+... Procrustes: rmse 0.0001251706  max resid 0.0003371929 
+... Similar to previous best
+Run 15 stress 0.1928498 
+... Procrustes: rmse 0.000713671  max resid 0.002074812 
+... Similar to previous best
+Run 16 stress 0.1928581 
+... Procrustes: rmse 0.001956972  max resid 0.005484317 
+... Similar to previous best
+Run 17 stress 0.1928499 
+... Procrustes: rmse 0.0008529383  max resid 0.002406656 
+... Similar to previous best
+Run 18 stress 0.1928478 
+... Procrustes: rmse 0.0003445826  max resid 0.0009688855 
+... Similar to previous best
+Run 19 stress 0.1928493 
+... Procrustes: rmse 0.0005050439  max resid 0.001350483 
+... Similar to previous best
+Run 20 stress 0.1928475 
+... New best solution
+... Procrustes: rmse 4.656629e-05  max resid 0.0001065303 
+... Similar to previous best
+*** Solution reached
+> sol2
+
+Call:
+metaMDS(comm = dune, model = "local", stress = 2) 
+
+local Multidimensional Scaling using monoMDS
+
+Data:     dune 
+Distance: bray 
+
+Dimensions: 2 
+Stress:     0.1928475 
+Stress type 2, weak ties
+Two convergent solutions found after 20 tries
+Scaling: centring, PC rotation, halfchange scaling 
+Species: expanded scores based on ‘dune’ 
+
+> ## Use Arrhenius exponent 'z' as a binary dissimilarity measure
+> sol <- metaMDS(dune, distfun = betadiver, distance = "z")
+Run 0 stress 0.1067169 
+Run 1 stress 0.1073148 
+Run 2 stress 0.1073148 
+Run 3 stress 0.1067169 
+... New best solution
+... Procrustes: rmse 9.860777e-06  max resid 3.045935e-05 
+... Similar to previous best
+Run 4 stress 0.1067169 
+... Procrustes: rmse 2.720552e-05  max resid 7.599563e-05 
+... Similar to previous best
+Run 5 stress 0.1073148 
+Run 6 stress 0.1653581 
+Run 7 stress 0.1073148 
+Run 8 stress 0.1067169 
+... Procrustes: rmse 1.047284e-05  max resid 2.581037e-05 
+... Similar to previous best
+Run 9 stress 0.1073148 
+Run 10 stress 0.1073148 
+Run 11 stress 0.1067169 
+... Procrustes: rmse 4.569546e-05  max resid 9.658124e-05 
+... Similar to previous best
+Run 12 stress 0.107471 
+Run 13 stress 0.107471 
+Run 14 stress 0.1073148 
+Run 15 stress 0.107471 
+Run 16 stress 0.1073148 
+Run 17 stress 0.1069788 
+... Procrustes: rmse 0.006831076  max resid 0.0241299 
+Run 18 stress 0.1067169 
+... New best solution
+... Procrustes: rmse 4.325792e-06  max resid 1.459835e-05 
+... Similar to previous best
+Run 19 stress 0.1067169 
+... Procrustes: rmse 1.880583e-05  max resid 4.343547e-05 
+... Similar to previous best
+Run 20 stress 0.1067169 
+... New best solution
+... Procrustes: rmse 1.608418e-06  max resid 3.595822e-06 
+... Similar to previous best
+*** Solution reached
+> sol
+
+Call:
+metaMDS(comm = dune, distance = "z", distfun = betadiver) 
+
+global Multidimensional Scaling using monoMDS
+
+Data:     dune 
+Distance: beta.z 
+
+Dimensions: 2 
+Stress:     0.1067169 
+Stress type 1, weak ties
+Two convergent solutions found after 20 tries
+Scaling: centring, PC rotation, halfchange scaling 
+Species: expanded scores based on ‘dune’ 
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("mite")
+> ### * mite
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: mite
+> ### Title: Oribatid Mite Data with Explanatory Variables
+> ### Aliases: mite mite.env mite.pcnm mite.xy
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> data(mite)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("model.matrix.cca")
+> ### * model.matrix.cca
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: model.matrix.cca
+> ### Title: Reconstruct Model Frame and Model Matrices of Constrained
+> ###   Ordination
+> ### Aliases: model.matrix.cca model.frame.cca
+> ### Keywords: models multivariate
+> 
+> ### ** Examples
+> 
+> data(dune)
+> data(dune.env)
+> mod <- cca(dune ~  poly(A1, 2) + Management + Use, dune.env)
+> model.frame(mod)
+   poly(A1, 2).1 poly(A1, 2).2 Management      Use
+1    -0.21581339    0.31584574         SF Haypastu
+2    -0.14212101    0.10689011         BF Haypastu
+3    -0.05790115   -0.08310263         SF Haypastu
+4    -0.06842864   -0.06220100         SF Haypastu
+5     0.15264849   -0.33028722         HF Hayfield
+6    -0.05790115   -0.08310263         HF Haypastu
+7    -0.21581339    0.31584574         HF  Pasture
+8    -0.06842864   -0.06220100         HF  Pasture
+9    -0.12106605    0.05451056         HF Hayfield
+10   -0.16317598    0.16252391         BF Hayfield
+11   -0.14212101    0.10689011         BF  Pasture
+12    0.10001108   -0.29899963         SF Haypastu
+13    0.12106605   -0.31395535         SF Haypastu
+14    0.46847296   -0.09089291         NM  Pasture
+15    0.70007758    0.55002015         NM Haypastu
+16    0.08948360   -0.29030142         SF  Pasture
+17   -0.08948360   -0.01795706         NM Hayfield
+18   -0.02631871   -0.14092613         NM Hayfield
+19   -0.12106605    0.05451056         NM Hayfield
+20   -0.14212101    0.10689011         NM Hayfield
+> model.matrix(mod)
+   poly(A1, 2)1 poly(A1, 2)2 ManagementHF ManagementNM ManagementSF
+1   -0.21581339   0.31584574            0            0            1
+2   -0.14212101   0.10689011            0            0            0
+3   -0.05790115  -0.08310263            0            0            1
+4   -0.06842864  -0.06220100            0            0            1
+5    0.15264849  -0.33028722            1            0            0
+6   -0.05790115  -0.08310263            1            0            0
+7   -0.21581339   0.31584574            1            0            0
+8   -0.06842864  -0.06220100            1            0            0
+9   -0.12106605   0.05451056            1            0            0
+10  -0.16317598   0.16252391            0            0            0
+11  -0.14212101   0.10689011            0            0            0
+12   0.10001108  -0.29899963            0            0            1
+13   0.12106605  -0.31395535            0            0            1
+14   0.46847296  -0.09089291            0            1            0
+15   0.70007758   0.55002015            0            1            0
+16   0.08948360  -0.29030142            0            0            1
+17  -0.08948360  -0.01795706            0            1            0
+18  -0.02631871  -0.14092613            0            1            0
+19  -0.12106605   0.05451056            0            1            0
+20  -0.14212101   0.10689011            0            1            0
+           Use.L      Use.Q
+1  -7.850462e-17 -0.8164966
+2  -7.850462e-17 -0.8164966
+3  -7.850462e-17 -0.8164966
+4  -7.850462e-17 -0.8164966
+5  -7.071068e-01  0.4082483
+6  -7.850462e-17 -0.8164966
+7   7.071068e-01  0.4082483
+8   7.071068e-01  0.4082483
+9  -7.071068e-01  0.4082483
+10 -7.071068e-01  0.4082483
+11  7.071068e-01  0.4082483
+12 -7.850462e-17 -0.8164966
+13 -7.850462e-17 -0.8164966
+14  7.071068e-01  0.4082483
+15 -7.850462e-17 -0.8164966
+16  7.071068e-01  0.4082483
+17 -7.071068e-01  0.4082483
+18 -7.071068e-01  0.4082483
+19 -7.071068e-01  0.4082483
+20 -7.071068e-01  0.4082483
+> 
+> 
+> 
+> cleanEx()
+> nameEx("monoMDS")
+> ### * monoMDS
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: monoMDS
+> ### Title: Global and Local Non-metric Multidimensional Scaling and Linear
+> ###   and Hybrid Scaling
+> ### Aliases: monoMDS scores.monoMDS plot.monoMDS
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> data(dune)
+> dis <- vegdist(dune)
+> m <- monoMDS(dis, model = "loc")
+> m
+
+Call:
+monoMDS(dist = dis, model = "loc") 
+
+Local non-metric Multidimensional Scaling
+
+20 points, dissimilarity ‘bray’, call ‘vegdist(x = dune)’
+
+Dimensions: 2 
+Stress:     0.1238005 
+Stress type 1, weak ties
+Scores scaled to unit root mean square, rotated to principal components
+Stopped after 73 iterations: Stress nearly unchanged (ratio > sratmax)
+> plot(m)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("mrpp")
+> ### * mrpp
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: mrpp
+> ### Title: Multi Response Permutation Procedure and Mean Dissimilarity
+> ###   Matrix
+> ### Aliases: mrpp meandist summary.meandist plot.meandist
+> ### Keywords: multivariate nonparametric htest
+> 
+> ### ** Examples
+> 
+> data(dune)
+> data(dune.env)
+> dune.mrpp <- with(dune.env, mrpp(dune, Management))
+> dune.mrpp
+
+Call:
+mrpp(dat = dune, grouping = Management) 
+
+Dissimilarity index: euclidean 
+Weights for groups:  n 
+
+Class means and counts:
+
+      BF    HF    NM    SF   
+delta 10.03 11.08 10.66 12.27
+n     3     5     6     6    
+
+Chance corrected within-group agreement A: 0.1246 
+Based on observed delta 11.15 and expected delta 12.74 
+
+Significance of delta: 0.002 
+Permutation: free
+Number of permutations: 999
+
+> 
+> # Save and change plotting parameters
+> def.par <- par(no.readonly = TRUE)
+> layout(matrix(1:2,nr=1))
+> 
+> plot(dune.ord <- metaMDS(dune), type="text", display="sites" )
+Run 0 stress 0.1192678 
+Run 1 stress 0.2059799 
+Run 2 stress 0.1192678 
+... New best solution
+... Procrustes: rmse 3.906075e-05  max resid 0.0001192009 
+... Similar to previous best
+Run 3 stress 0.1192679 
+... Procrustes: rmse 0.0001096816  max resid 0.0003383007 
+... Similar to previous best
+Run 4 stress 0.2375284 
+Run 5 stress 0.1183186 
+... New best solution
+... Procrustes: rmse 0.02027545  max resid 0.0650119 
+Run 6 stress 0.1192678 
+Run 7 stress 0.1192678 
+Run 8 stress 0.2069991 
+Run 9 stress 0.1183186 
+... Procrustes: rmse 0.0001003641  max resid 0.0002670036 
+... Similar to previous best
+Run 10 stress 0.1922258 
+Run 11 stress 0.1192682 
+Run 12 stress 0.1192683 
+Run 13 stress 0.1809577 
+Run 14 stress 0.1886532 
+Run 15 stress 0.1192679 
+Run 16 stress 0.1192679 
+Run 17 stress 0.1192679 
+Run 18 stress 0.1192678 
+Run 19 stress 0.1183186 
+... Procrustes: rmse 0.0001010439  max resid 0.00034752 
+... Similar to previous best
+Run 20 stress 0.1192687 
+*** Solution reached
+> with(dune.env, ordihull(dune.ord, Management))
+> 
+> with(dune.mrpp, {
++   fig.dist <- hist(boot.deltas, xlim=range(c(delta,boot.deltas)), 
++                  main="Test of Differences Among Groups")
++   abline(v=delta); 
++   text(delta, 2*mean(fig.dist$counts), adj = -0.5,
++      expression(bold(delta)), cex=1.5 )  }
++ )
+> par(def.par)
+> ## meandist
+> dune.md <- with(dune.env, meandist(vegdist(dune), Management))
+> dune.md
+          BF        HF        NM        SF
+BF 0.4159972 0.4736637 0.7296979 0.6247169
+HF 0.4736637 0.4418115 0.7217933 0.5673664
+NM 0.7296979 0.7217933 0.6882438 0.7723367
+SF 0.6247169 0.5673664 0.7723367 0.5813015
+attr(,"class")
+[1] "meandist" "matrix"  
+attr(,"n")
+grouping
+BF HF NM SF 
+ 3  5  6  6 
+> summary(dune.md)
+
+Mean distances:
+                 Average
+within groups  0.5746346
+between groups 0.6664172
+overall        0.6456454
+
+Summary statistics:
+                        Statistic
+MRPP A weights n        0.1423836
+MRPP A weights n-1      0.1339124
+MRPP A weights n(n-1)   0.1099842
+Classification strength 0.1127012
+> plot(dune.md)
+> plot(dune.md, kind="histogram")
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("mso")
+> ### * mso
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: mso
+> ### Title: Functions for performing and displaying a spatial partitioning
+> ###   of cca or rda results
+> ### Aliases: mso msoplot
+> ### Keywords: spatial multivariate
+> 
+> ### ** Examples
+> 
+> ## Reconstruct worked example of Wagner (submitted):
+> X <- matrix(c(1, 2, 3, 2, 1, 0), 3, 2)
+> Y <- c(3, -1, -2)
+> tmat <- c(1:3)
+> ## Canonical correspondence analysis (cca):
+> Example.cca <- cca(X, Y)
+> Example.cca <- mso(Example.cca, tmat)
+Set of permutations < 'minperm'. Generating entire set.
+> msoplot(Example.cca)
+> Example.cca$vario
+  H Dist n  All       Sum         CA       CCA se
+1 1    1 2 0.25 0.3456633 0.07461735 0.2710459  0
+2 2    2 1 1.00 0.8086735 0.01147959 0.7971939 NA
+> 
+> ## Correspondence analysis (ca):
+> Example.ca <- mso(cca(X), tmat)
+Set of permutations < 'minperm'. Generating entire set.
+> msoplot(Example.ca)
+> 
+> ## Unconstrained ordination with test for autocorrelation
+> ## using oribatid mite data set as in Wagner (2004)
+> data(mite)
+> data(mite.env)
+> data(mite.xy)
+> 
+> mite.cca <- cca(log(mite + 1))
+> mite.cca <- mso(mite.cca, mite.xy, grain =  1, permutations = 99)
+> msoplot(mite.cca)
+> mite.cca
+Call: mso(object.cca = mite.cca, object.xy = mite.xy, grain = 1,
+permutations = 99)
+
+              Inertia Rank
+Total           1.164     
+Unconstrained   1.164   34
+Inertia is mean squared contingency coefficient 
+
+Eigenvalues for unconstrained axes:
+   CA1    CA2    CA3    CA4    CA5    CA6    CA7    CA8 
+0.3662 0.1328 0.0723 0.0658 0.0559 0.0481 0.0418 0.0391 
+(Showed only 8 of all 34 unconstrained eigenvalues)
+
+mso variogram:
+
+    H   Dist   n    All     CA CA.signif
+0   0 0.3555  63 0.6250 0.6250      0.01
+1   1 1.0659 393 0.7556 0.7556      0.01
+2   2 2.0089 534 0.8931 0.8931      0.01
+3   3 2.9786 417 1.0988 1.0988      0.03
+4   4 3.9817 322 1.3321 1.3321      0.01
+5   5 5.0204 245 1.5109 1.5109      0.01
+10 10 6.8069 441 1.7466 1.7466      0.01
+
+Permutation: free
+Number of permutations: 99
+
+> 
+> ## Constrained ordination with test for residual autocorrelation
+> ## and scale-invariance of species-environment relationships
+> mite.cca <- cca(log(mite + 1) ~ SubsDens + WatrCont + Substrate + Shrub + Topo, mite.env)
+> mite.cca <- mso(mite.cca, mite.xy, permutations = 99)
+> msoplot(mite.cca)
+Error variance of regression model underestimated by 0.4 percent 
+> mite.cca
+Call: mso(object.cca = mite.cca, object.xy = mite.xy, permutations =
+99)
+
+              Inertia Proportion Rank
+Total          1.1638     1.0000     
+Constrained    0.5211     0.4478   11
+Unconstrained  0.6427     0.5522   34
+Inertia is mean squared contingency coefficient 
+
+Eigenvalues for constrained axes:
+   CCA1    CCA2    CCA3    CCA4    CCA5    CCA6    CCA7    CCA8    CCA9   CCA10 
+0.31207 0.06601 0.04117 0.02938 0.02438 0.01591 0.01201 0.00752 0.00612 0.00373 
+  CCA11 
+0.00284 
+
+Eigenvalues for unconstrained axes:
+    CA1     CA2     CA3     CA4     CA5     CA6     CA7     CA8 
+0.07888 0.06752 0.05457 0.04023 0.03855 0.03491 0.03233 0.02692 
+(Showed only 8 of all 34 unconstrained eigenvalues)
+
+mso variogram:
+
+    H   Dist   n    All    Sum     CA    CCA      se CA.signif
+0   0 0.3555  63 0.6250 0.7479 0.5512 0.1967 0.03506      0.01
+1   1 1.0659 393 0.7556 0.8820 0.6339 0.2482 0.01573      0.17
+2   2 2.0089 534 0.8931 0.9573 0.6473 0.3100 0.01487      0.71
+3   3 2.9786 417 1.0988 1.1010 0.6403 0.4607 0.01858      0.46
+4   4 3.9817 322 1.3321 1.2548 0.6521 0.6027 0.02439      0.99
+5   5 5.0204 245 1.5109 1.4564 0.6636 0.7928 0.02801      0.42
+10 10 6.8069 441 1.7466 1.6266 0.6914 0.9351 0.02052      0.21
+
+Permutation: free
+Number of permutations: 99
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("multipart")
+> ### * multipart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: multipart
+> ### Title: Multiplicative Diversity Partitioning
+> ### Aliases: multipart multipart.default multipart.formula
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> ## NOTE: 'nsimul' argument usually needs to be >= 99
+> ## here much lower value is used for demonstration
+> 
+> data(mite)
+> data(mite.xy)
+> data(mite.env)
+> ## Function to get equal area partitions of the mite data
+> cutter <- function (x, cut = seq(0, 10, by = 2.5)) {
++     out <- rep(1, length(x))
++     for (i in 2:(length(cut) - 1))
++         out[which(x > cut[i] & x <= cut[(i + 1)])] <- i
++     return(out)}
+> ## The hierarchy of sample aggregation
+> levsm <- with(mite.xy, data.frame(
++     l1=1:nrow(mite),
++     l2=cutter(y, cut = seq(0, 10, by = 2.5)),
++     l3=cutter(y, cut = seq(0, 10, by = 5)),
++     l4=cutter(y, cut = seq(0, 10, by = 10))))
+> ## Multiplicative diversity partitioning
+> multipart(mite, levsm, index="renyi", scales=1, nsimul=19)
+multipart object
+
+Call: multipart(y = mite, x = levsm, index = "renyi", scales = 1,
+nsimul = 19)
+
+nullmodel method ‘r2dtable’ with 19 simulations
+options:  index renyi, scales 1, global FALSE
+alternative hypothesis: statistic is less or greater than simulated values
+
+        statistic      SES     mean     2.5%      50%   97.5% Pr(sim.)  
+alpha.1    8.0555  -50.069 12.19396 12.06155 12.19041 12.3400     0.05 *
+alpha.2   11.2353  -91.662 14.09161 14.05255 14.08685 14.1485     0.05 *
+alpha.3   12.0064 -391.053 14.13939 14.13048 14.13932 14.1485     0.05 *
+gamma     14.1603    0.000 14.16027 14.16027 14.16027 14.1603     1.00  
+beta.1     1.3568   27.320  1.15770  1.14474  1.15859  1.1683     0.05 *
+beta.2     1.0710   30.431  1.00339  0.99912  1.00340  1.0059     0.05 *
+beta.3     1.1794  460.550  1.00148  1.00083  1.00148  1.0021     0.05 *
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> multipart(mite ~ ., levsm, index="renyi", scales=1, nsimul=19)
+multipart object
+
+Call: multipart(formula = mite ~ ., data = levsm, index = "renyi",
+scales = 1, nsimul = 19)
+
+nullmodel method ‘r2dtable’ with 19 simulations
+options:  index renyi, scales 1, global FALSE
+alternative hypothesis: statistic is less or greater than simulated values
+
+        statistic      SES    mean    2.5%     50%   97.5% Pr(sim.)  
+alpha.1    8.0555  -66.643 12.2056 12.1143 12.2120 12.2910     0.05 *
+alpha.2   11.2353  -94.626 14.0818 14.0246 14.0917 14.1193     0.05 *
+alpha.3   12.0064 -355.962 14.1391 14.1283 14.1374 14.1485     0.05 *
+gamma     14.1603    0.000 14.1603 14.1603 14.1603 14.1603     1.00  
+beta.1     1.3568   35.028  1.1566  1.1478  1.1565  1.1660     0.05 *
+beta.2     1.0710   33.423  1.0041  1.0015  1.0035  1.0078     0.05 *
+beta.3     1.1794  419.166  1.0015  1.0008  1.0016  1.0023     0.05 *
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> multipart(mite ~ ., levsm, index="renyi", scales=1, nsimul=19, relative=TRUE)
+multipart object
+
+Call: multipart(formula = mite ~ ., data = levsm, index = "renyi",
+scales = 1, relative = TRUE, nsimul = 19)
+
+nullmodel method ‘r2dtable’ with 19 simulations
+options:  index renyi, scales 1, global FALSE
+alternative hypothesis: statistic is less or greater than simulated values
+
+        statistic      SES      mean      2.5%       50%   97.5% Pr(sim.)  
+alpha.1  8.055481  -53.544 12.204883 12.071168 12.198307 12.3689     0.05 *
+alpha.2 11.235261  -99.506 14.079276 14.032767 14.076147 14.1247     0.05 *
+alpha.3 12.006443 -343.946 14.135245 14.123604 14.136297 14.1438     0.05 *
+gamma   14.160271    0.000 14.160271 14.160271 14.160271 14.1603     1.00  
+beta.1   0.078594   19.568  0.068267  0.067236  0.068392  0.0691     0.05 *
+beta.2   0.535514   35.966  0.501994  0.500294  0.502062  0.5035     0.05 *
+beta.3   0.589695  404.814  0.500885  0.500583  0.500848  0.5013     0.05 *
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> multipart(mite ~ ., levsm, index="renyi", scales=1, nsimul=19, global=TRUE)
+multipart object
+
+Call: multipart(formula = mite ~ ., data = levsm, index = "renyi",
+scales = 1, global = TRUE, nsimul = 19)
+
+nullmodel method ‘r2dtable’ with 19 simulations
+options:  index renyi, scales 1, global TRUE
+alternative hypothesis: statistic is less or greater than simulated values
+
+        statistic      SES     mean     2.5%      50%   97.5% Pr(sim.)  
+alpha.1    8.0555  -69.630 12.19342 12.09434 12.18504 12.3160     0.05 *
+alpha.2   11.2353  -81.676 14.09224 14.05248 14.09208 14.1625     0.05 *
+alpha.3   12.0064 -321.419 14.13850 14.12429 14.13991 14.1456     0.05 *
+gamma     14.1603    0.000 14.16027 14.16027 14.16027 14.1603     1.00  
+beta.1     1.7578  105.552  1.16133  1.14975  1.16210  1.1708     0.05 *
+beta.2     1.2603  102.695  1.00483  0.99985  1.00484  1.0077     0.05 *
+beta.3     1.1794  378.335  1.00154  1.00104  1.00144  1.0025     0.05 *
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> 
+> 
+> cleanEx()
+> nameEx("nestedtemp")
+> ### * nestedtemp
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: nestedtemp
+> ### Title: Nestedness Indices for Communities of Islands or Patches
+> ### Aliases: nestedtemp nestedchecker nestedn0 nesteddisc nestednodf
+> ###   nestedbetasor nestedbetajac plot.nestedtemp plot.nestednodf
+> ### Keywords: univar
+> 
+> ### ** Examples
+> 
+> data(sipoo)
+> ## Matrix temperature
+> out <- nestedtemp(sipoo)
+> out
+nestedness temperature: 10.24036 
+with matrix fill 0.2233333 
+> plot(out)
+> plot(out, kind="incid")
+> ## Use oecosimu to assess the non-randomness of checker board units
+> nestedchecker(sipoo)
+Checkerboard Units    : 2767 
+C-score (species mean): 2.258776 
+> oecosimu(sipoo, nestedchecker, "quasiswap")
+oecosimu object
+
+Call: oecosimu(comm = sipoo, nestfun = nestedchecker, method =
+"quasiswap")
+
+nullmodel method ‘quasiswap’ with 99 simulations
+
+alternative hypothesis: statistic is less or greater than simulated values
+
+Checkerboard Units    : 2767 
+C-score (species mean): 2.258776 
+
+              statistic     SES   mean   2.5%    50%  97.5% Pr(sim.)
+checkerboards      2767 0.84129 2698.1 2584.4 2676.0 2858.1     0.39
+> ## Another Null model and standardized checkerboard score
+> oecosimu(sipoo, nestedchecker, "r00", statistic = "C.score")
+oecosimu object
+
+Call: oecosimu(comm = sipoo, nestfun = nestedchecker, method = "r00",
+statistic = "C.score")
+
+nullmodel method ‘r00’ with 99 simulations
+
+alternative hypothesis: statistic is less or greater than simulated values
+
+Checkerboard Units    : 2767 
+C-score (species mean): 2.258776 
+
+        statistic    SES   mean   2.5%    50%  97.5% Pr(sim.)   
+C.score    2.2588 -28.92 9.2234 8.6935 9.2384 9.6053     0.01 **
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> 
+> 
+> cleanEx()
+> nameEx("nullmodel")
+> ### * nullmodel
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: nullmodel
+> ### Title: Null Model and Simulation
+> ### Aliases: nullmodel simmat print.nullmodel simulate.nullmodel
+> ###   update.nullmodel str.nullmodel print.simmat smbind
+> ### Keywords: multivariate datagen
+> 
+> ### ** Examples
+> 
+> data(mite)
+> x <- as.matrix(mite)[1:12, 21:30]
+> 
+> ## non-sequential nullmodel
+> (nm <- nullmodel(x, "r00"))
+An object of class “nullmodel” 
+‘r00’ method (binary, non-sequential)
+12 x 10 matrix
+
+> (sm <- simulate(nm, nsim=10))
+An object of class “simmat” 
+‘r00’ method (binary, non-sequential)
+12 x 10 matrix
+Number of permuted matrices = 10 
+
+> 
+> ## sequential nullmodel
+> (nm <- nullmodel(x, "swap"))
+An object of class “nullmodel” 
+‘swap’ method (binary, sequential)
+12 x 10 matrix
+Iterations = 0 
+
+> (sm1 <- simulate(nm, nsim=10, thin=5))
+An object of class “simmat” 
+‘swap’ method (binary, sequential)
+12 x 10 matrix
+Number of permuted matrices = 10 
+Start = 5, End = 50, Thin = 5
+
+> (sm2 <- simulate(nm, nsim=10, thin=5))
+An object of class “simmat” 
+‘swap’ method (binary, sequential)
+12 x 10 matrix
+Number of permuted matrices = 10 
+Start = 55, End = 100, Thin = 5
+
+> 
+> ## sequential nullmodel with burnin and extra updating
+> (nm <- nullmodel(x, "swap"))
+An object of class “nullmodel” 
+‘swap’ method (binary, sequential)
+12 x 10 matrix
+Iterations = 0 
+
+> (sm1 <- simulate(nm, burnin=10, nsim=10, thin=5))
+An object of class “simmat” 
+‘swap’ method (binary, sequential)
+12 x 10 matrix
+Number of permuted matrices = 10 
+Start = 15, End = 60, Thin = 5
+
+> (sm2 <- simulate(nm, nsim=10, thin=5))
+An object of class “simmat” 
+‘swap’ method (binary, sequential)
+12 x 10 matrix
+Number of permuted matrices = 10 
+Start = 5, End = 50, Thin = 5
+
+> 
+> ## sequential nullmodel with separate initial burnin
+> (nm <- nullmodel(x, "swap"))
+An object of class “nullmodel” 
+‘swap’ method (binary, sequential)
+12 x 10 matrix
+Iterations = 0 
+
+> nm <- update(nm, nsim=10)
+> (sm2 <- simulate(nm, nsim=10, thin=5))
+An object of class “simmat” 
+‘swap’ method (binary, sequential)
+12 x 10 matrix
+Number of permuted matrices = 10 
+Start = 15, End = 60, Thin = 5
+
+> 
+> ## combining multiple simmat objects
+> 
+> ## stratification
+> nm1 <- nullmodel(x[1:6,], "r00")
+> sm1 <- simulate(nm1, nsim=10)
+> nm2 <- nullmodel(x[7:12,], "r00")
+> sm2 <- simulate(nm2, nsim=10)
+> smbind(sm1, sm2, MARGIN=1)
+An object of class “simmat” 
+‘r00’ method (binary, non-sequential)
+12 x 10 matrix
+Number of permuted matrices = 10 
+
+> 
+> ## binding subsequent samples from sequential algorithms
+> ## start, end, thin retained
+> nm <- nullmodel(x, "swap")
+> nm <- update(nm, nsim=10)
+> sm1 <- simulate(nm, nsim=10, thin=5)
+> sm2 <- simulate(nm, nsim=20, thin=5)
+> sm3 <- simulate(nm, nsim=10, thin=5)
+> smbind(sm3, sm2, sm1, MARGIN=3)
+An object of class “simmat” 
+‘swap’ method (binary, sequential)
+12 x 10 matrix
+Number of permuted matrices = 40 
+Start = 15, End = 210, Thin = 5
+
+> 
+> ## 'replicate' based usage which is similar to the output
+> ## of 'parLapply' or 'mclapply' in the 'parallel' package
+> ## start, end, thin are set, also noting number of chains
+> smfun <- function(x, burnin, nsim, thin) {
++     nm <- nullmodel(x, "swap")
++     nm <- update(nm, nsim=burnin)
++     simulate(nm, nsim=nsim, thin=thin)
++ }
+> smlist <- replicate(3, smfun(x, burnin=50, nsim=10, thin=5), simplify=FALSE)
+> smbind(smlist, MARGIN=3) # Number of permuted matrices = 30
+An object of class “simmat” 
+‘swap’ method (binary, sequential)
+12 x 10 matrix
+Number of permuted matrices = 30 
+Start = 55, End = 100, Thin = 5 (3 chains)
+
+> 
+> ## Not run: 
+> ##D ## parallel null model calculations
+> ##D library(parallel)
+> ##D 
+> ##D if (.Platform$OS.type == "unix") {
+> ##D ## forking on Unix systems
+> ##D smlist <- mclapply(1:3, function(i) smfun(x, burnin=50, nsim=10, thin=5))
+> ##D smbind(smlist, MARGIN=3)
+> ##D }
+> ##D 
+> ##D ## socket type cluster, works on all platforms
+> ##D cl <- makeCluster(3)
+> ##D clusterEvalQ(cl, library(vegan))
+> ##D clusterExport(cl, c("smfun", "x"))
+> ##D smlist <- parLapply(cl, 1:3, function(i) smfun(x, burnin=50, nsim=10, thin=5))
+> ##D stopCluster(cl)
+> ##D smbind(smlist, MARGIN=3)
+> ## End(Not run)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("oecosimu")
+> ### * oecosimu
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: oecosimu
+> ### Title: Evaluate Statistics with Null Models of Biological Communities
+> ### Aliases: oecosimu as.ts.oecosimu as.mcmc.oecosimu
+> ### Keywords: multivariate datagen nonparametric
+> 
+> ### ** Examples
+> 
+> ## Use the first eigenvalue of correspondence analysis as an index
+> ## of structure: a model for making your own functions.
+> data(sipoo)
+> ## Traditional nestedness statistics (number of checkerboard units)
+> oecosimu(sipoo, nestedchecker, "r0")
+oecosimu object
+
+Call: oecosimu(comm = sipoo, nestfun = nestedchecker, method = "r0")
+
+nullmodel method ‘r0’ with 99 simulations
+
+alternative hypothesis: statistic is less or greater than simulated values
+
+Checkerboard Units    : 2767 
+C-score (species mean): 2.258776 
+
+              statistic     SES   mean   2.5%    50%  97.5% Pr(sim.)   
+checkerboards      2767 -17.768 8034.6 7529.9 8052.0 8518.5     0.01 **
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> ## sequential model, one-sided test, a vector statistic
+> out <- oecosimu(sipoo, decorana, "swap", burnin=100, thin=10, 
++    statistic="evals", alt = "greater")
+> out
+oecosimu object
+
+Call: oecosimu(comm = sipoo, nestfun = decorana, method = "swap",
+burnin = 100, thin = 10, statistic = "evals", alternative = "greater")
+
+nullmodel method ‘swap’ with 99 simulations
+options:  thin 10, burnin 100
+alternative hypothesis: statistic is greater than simulated values
+
+
+Call:
+nestfun(veg = comm) 
+
+Detrended correspondence analysis with 26 segments.
+Rescaling of axes with 4 iterations.
+
+                  DCA1   DCA2   DCA3    DCA4
+Eigenvalues     0.3822 0.2612 0.1668 0.08723
+Decorana values 0.4154 0.2465 0.1391 0.04992
+Axis lengths    2.9197 2.5442 2.7546 1.78074
+
+
+     statistic     SES    mean     50%    95% Pr(sim.)  
+DCA1  0.382249  1.8658 0.32404 0.32373 0.3726     0.02 *
+DCA2  0.261208  1.5772 0.21939 0.21617 0.2637     0.09 .
+DCA3  0.166788  0.5209 0.15594 0.15572 0.1859     0.30  
+DCA4  0.087226 -1.9822 0.13015 0.12649 0.1649     0.99  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> ## Inspect the swap sequence as a time series object
+> plot(as.ts(out))
+> lag.plot(as.ts(out))
+> acf(as.ts(out))
+> ## Density plot
+> densityplot(permustats(out), as.table = TRUE, layout = c(1,4))
+> ## Use quantitative null models to compare
+> ## mean Bray-Curtis dissimilarities
+> data(dune)
+> meandist <- function(x) mean(vegdist(x, "bray"))
+> mbc1 <- oecosimu(dune, meandist, "r2dtable")
+> mbc1
+oecosimu object
+
+Call: oecosimu(comm = dune, nestfun = meandist, method = "r2dtable")
+
+nullmodel method ‘r2dtable’ with 99 simulations
+
+alternative hypothesis: statistic is less or greater than simulated values
+
+          statistic    SES    mean    2.5%     50%  97.5% Pr(sim.)   
+statistic   0.64565 16.876 0.46651 0.44565 0.46652 0.4826     0.01 **
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> ## Define your own null model as a 'commsim' function: shuffle cells
+> ## in each row
+> foo <- function(x, n, nr, nc, ...) {
++    out <- array(0, c(nr, nc, n))
++    for (k in seq_len(n))
++       out[,,k] <- apply(x, 2, function(z) sample(z, length(z)))
++    out
++ }
+> cf <- commsim("myshuffle", foo, isSeq = FALSE, binary = FALSE, 
++    mode = "double")
+> oecosimu(dune, meandist, cf)
+oecosimu object
+
+Call: oecosimu(comm = dune, nestfun = meandist, method = cf)
+
+nullmodel method ‘myshuffle’ with 99 simulations
+
+alternative hypothesis: statistic is less or greater than simulated values
+
+          statistic    SES    mean    2.5%     50%  97.5% Pr(sim.)  
+statistic   0.64565 2.7402 0.63542 0.62941 0.63519 0.6433     0.03 *
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ordiArrowTextXY")
+> ### * ordiArrowTextXY
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ordiArrowTextXY
+> ### Title: Support Functions for Drawing Vectors
+> ### Aliases: ordiArrowMul ordiArrowTextXY
+> ### Keywords: utilities
+> 
+> ### ** Examples
+> 
+>     ## Scale arrows by hand to fill 80% of the plot
+>     ## Biplot arrows by hand
+>     data(varespec, varechem)
+>     ord <- cca(varespec ~ Al + P + K, varechem)
+>     plot(ord, display = c("species","sites"))
+> 
+>     ## biplot scores
+>     bip <- scores(ord, choices = 1:2, display = "bp")
+> 
+>     ## scaling factor for arrows to fill 80% of plot
+>     (mul <- ordiArrowMul(bip, fill = 0.8))
+[1] 2.074256
+>     bip.scl <- bip * mul                    # Scale the biplot scores
+>     labs <- rownames(bip)                   # Arrow labels
+> 
+>     ## calculate coordinate of labels for arrows
+>     (bip.lab <- ordiArrowTextXY(bip.scl, rescale = FALSE, labels = labs))
+         [,1]       [,2]
+Al  1.8804734 -0.3506655
+P  -0.9169247 -1.6419989
+K  -0.9932187 -0.3713153
+> 
+>     ## draw arrows and text labels
+>     arrows(0, 0, bip.scl[,1], bip.scl[,2], length = 0.1)
+>     text(bip.lab, labels = labs)
+> 
+>     ## Handling of ordination objects directly
+>     mul2 <- ordiArrowMul(ord, display = "bp", fill = 0.8)
+>     stopifnot(all.equal(mul, mul2))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ordiarrows")
+> ### * ordiarrows
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ordiarrows
+> ### Title: Add Arrows and Line Segments to Ordination Diagrams
+> ### Aliases: ordiarrows ordisegments ordigrid
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> example(pyrifos)
+
+pyrifs> data(pyrifos)
+
+pyrifs> ditch <- gl(12, 1, length=132)
+
+pyrifs> week <- gl(11, 12, labels=c(-4, -1, 0.1, 1, 2, 4, 8, 12, 15, 19, 24))
+
+pyrifs> dose <- factor(rep(c(0.1, 0, 0, 0.9, 0, 44, 6, 0.1, 44, 0.9, 0, 6), 11))
+> mod <- rda(pyrifos)
+> plot(mod, type = "n")
+> ## Annual succession by ditches, colour by dose
+> ordiarrows(mod, ditch, label = TRUE, col = as.numeric(dose))
+> legend("topright", levels(dose), lty=1, col=1:5, title="Dose")
+> ## Show only control and highest Pyrifos treatment
+> plot(mod, type = "n")
+> ordiarrows(mod, ditch, label = TRUE, 
++    show.groups = c("2", "3", "5", "11"))
+> ordiarrows(mod, ditch, label = TRUE, show = c("6", "9"),
++    col = 2)
+> legend("topright", c("Control", "Pyrifos 44"), lty = 1, col = c(1,2))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ordihull")
+> ### * ordihull
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ordihull
+> ### Title: Display Groups or Factor Levels in Ordination Diagrams
+> ### Aliases: ordihull ordispider ordiellipse ordibar ordicluster
+> ###   weights.cca weights.rda weights.decorana summary.ordihull
+> ###   scores.ordihull summary.ordiellipse ordiareatest
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> data(dune)
+> data(dune.env)
+> mod <- cca(dune ~ Management, dune.env)
+> attach(dune.env)
+> plot(mod, type="n", scaling = "symmetric")
+> ## Catch the invisible result of ordihull...
+> pl <- ordihull(mod, Management, scaling = "symmetric", label = TRUE)
+> ## ... and find centres and areas of the hulls
+> summary(pl)
+            BF         HF         NM         SF
+CCA1 0.2917476 0.36826105 -1.3505642  0.2762936
+CCA2 0.8632208 0.09419919  0.2681515 -0.8139398
+Area 0.1951715 0.59943363  1.7398193  1.0144372
+> ## use more colours and add ellipsoid hulls
+> plot(mod, type = "n")
+> pl <- ordihull(mod, Management, scaling = "symmetric", col = 1:4,
++   draw="polygon", label =TRUE)
+> ordiellipse(mod, Management, scaling = "symmetric", kind = "ehull",
++   col = 1:4, lwd=3)
+> ## ordispider to connect WA and LC scores
+> plot(mod, dis=c("wa","lc"), type="p")
+> ordispider(mod)
+> ## Other types of plots
+> plot(mod, type = "p", display="sites")
+> cl <- hclust(vegdist(dune))
+> ordicluster(mod, cl, prune=3, col = cutree(cl, 4))
+> ## confidence ellipse: location of the class centroids
+> plot(mod, type="n", display = "sites")
+> text(mod, display="sites", labels = as.character(Management),
++   col=as.numeric(Management))
+> pl <- ordiellipse(mod, Management, kind="se", conf=0.95, lwd=2,
++   draw = "polygon", col=1:4, border=1:4, alpha=63)
+> summary(pl)
+            BF        HF          NM         SF
+CCA1 0.4312652 0.5583211 -1.87848340  0.5601499
+CCA2 1.3273917 0.6373120 -0.05503211 -1.3859924
+Area 1.4559842 1.3806668  2.73667419  1.5559135
+> ## add confidence bars
+> ordibar(mod, Management, kind="se", conf=0.95, lwd=2, col=1:4, label=TRUE)
+> 
+> 
+> 
+> cleanEx()
+
+detaching ‘dune.env’
+
+> nameEx("ordilabel")
+> ### * ordilabel
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ordilabel
+> ### Title: Add Text on Non-transparent Label to an Ordination Plot.
+> ### Aliases: ordilabel
+> ### Keywords: aplot
+> 
+> ### ** Examples
+> 
+> data(dune)
+> ord <- cca(dune)
+> plot(ord, type = "n")
+> ordilabel(ord, dis="sites", cex=1.2, font=3, fill="hotpink", col="blue")
+> ## You may prefer separate plots, but here species as well
+> ordilabel(ord, dis="sp", font=2, priority=colSums(dune))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ordiplot")
+> ### * ordiplot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ordiplot
+> ### Title: Alternative plot and identify Functions for Ordination
+> ### Aliases: ordiplot identify.ordiplot scores.ordiplot points.ordiplot
+> ###   text.ordiplot
+> ### Keywords: hplot iplot aplot
+> 
+> ### ** Examples
+> 
+> # Draw a plot for a non-vegan ordination (cmdscale).
+> data(dune)
+> dune.dis <- vegdist(wisconsin(dune))
+> dune.mds <- cmdscale(dune.dis, eig = TRUE)
+> dune.mds$species <- wascores(dune.mds$points, dune, expand = TRUE)
+> fig <- ordiplot(dune.mds, type = "none")
+> points(fig, "sites", pch=21, col="red", bg="yellow")
+> text(fig, "species", col="blue", cex=0.9)
+> # Default plot of the previous using identify to label selected points
+> ## Not run: 
+> ##D fig <- ordiplot(dune.mds)
+> ##D identify(fig, "spec")
+> ## End(Not run)
+> 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ordipointlabel")
+> ### * ordipointlabel
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ordipointlabel
+> ### Title: Ordination Plots with Points and Optimized Locations for Text
+> ### Aliases: ordipointlabel plot.ordipointlabel
+> ### Keywords: hplot aplot
+> 
+> ### ** Examples
+> 
+> data(dune)
+> ord <- cca(dune)
+> plt <- ordipointlabel(ord)
+> 
+> ## set scaling - should be no warnings!
+> ordipointlabel(ord, scaling = "sites")
+> 
+> ## plot then add
+> plot(ord, scaling = "symmetric", type = "n")
+> ordipointlabel(ord, display = "species", scaling = "symm", add = TRUE)
+> ordipointlabel(ord, display = "sites", scaling = "symm", add = TRUE)
+> 
+> ## redraw plot without rerunning SANN optimisation
+> plot(plt)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ordiresids")
+> ### * ordiresids
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ordiresids
+> ### Title: Plots of Residuals and Fitted Values for Constrained Ordination
+> ### Aliases: ordiresids
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> data(varechem)
+> mod <- cca(varespec ~ Al + P + K, varechem)
+> ordiresids(mod)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ordistep")
+> ### * ordistep
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ordistep
+> ### Title: Choose a Model by Permutation Tests in Constrained Ordination
+> ### Aliases: ordistep ordiR2step
+> ### Keywords: multivariate models
+> 
+> ### ** Examples
+> 
+> ## See add1.cca for another example
+> 
+> ### Dune data
+> data(dune)
+> data(dune.env)
+> mod0 <- rda(dune ~ 1, dune.env)  # Model with intercept only
+> mod1 <- rda(dune ~ ., dune.env)  # Model with all explanatory variables
+> 
+> ## With scope present, the default direction is "both"
+> ordistep(mod0, scope = formula(mod1), perm.max = 200)
+
+Start: dune ~ 1 
+
+             Df    AIC      F Pr(>F)   
++ Management  3 87.082 2.8400  0.005 **
++ Moisture    3 87.707 2.5883  0.005 **
++ Manure      4 89.232 1.9539  0.015 * 
++ A1          1 89.591 1.9217  0.040 * 
++ Use         2 91.032 1.1741  0.340   
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Step: dune ~ Management 
+
+             Df   AIC    F Pr(>F)   
+- Management  3 89.62 2.84  0.005 **
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+           Df    AIC      F Pr(>F)   
++ Moisture  3 85.567 1.9764  0.010 **
++ Manure    3 87.517 1.3902  0.115   
++ A1        1 87.424 1.2965  0.200   
++ Use       2 88.284 1.0510  0.340   
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Step: dune ~ Management + Moisture 
+
+             Df    AIC      F Pr(>F)   
+- Moisture    3 87.082 1.9764  0.015 * 
+- Management  3 87.707 2.1769  0.005 **
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+         Df    AIC      F Pr(>F)
++ Manure  3 85.762 1.1225  0.275
++ A1      1 86.220 0.8359  0.585
++ Use     2 86.842 0.8027  0.700
+
+Call: rda(formula = dune ~ Management + Moisture, data = dune.env)
+
+              Inertia Proportion Rank
+Total         84.1237     1.0000     
+Constrained   46.4249     0.5519    6
+Unconstrained 37.6988     0.4481   13
+Inertia is variance 
+
+Eigenvalues for constrained axes:
+  RDA1   RDA2   RDA3   RDA4   RDA5   RDA6 
+21.588 14.075  4.123  3.163  2.369  1.107 
+
+Eigenvalues for unconstrained axes:
+  PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8   PC9  PC10  PC11  PC12  PC13 
+8.241 7.138 5.355 4.409 3.143 2.770 1.878 1.741 0.952 0.909 0.627 0.311 0.227 
+
+> 
+> ## Example without scope. Default direction is "backward"
+> ordistep(mod1, perm.max = 200) 
+
+Start: dune ~ A1 + Moisture + Management + Use + Manure 
+
+             Df    AIC      F Pr(>F)
+- Use         2 86.056 0.8330  0.640
+- A1          1 85.933 0.7933  0.580
+- Manure      3 87.357 1.0737  0.400
+- Management  2 87.672 1.1976  0.305
+- Moisture    3 88.818 1.3320  0.175
+
+Step: dune ~ A1 + Moisture + Management + Manure 
+
+             Df    AIC      F Pr(>F)
+- A1          1 85.762 0.8015  0.615
+- Manure      3 86.220 1.0829  0.395
+- Management  2 86.688 1.1728  0.275
+- Moisture    3 87.779 1.4140  0.125
+
+Step: dune ~ Moisture + Management + Manure 
+
+             Df    AIC      F Pr(>F)  
+- Manure      3 85.567 1.1225  0.325  
+- Management  2 86.060 1.1986  0.235  
+- Moisture    3 87.517 1.5788  0.065 .
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Step: dune ~ Moisture + Management 
+
+             Df    AIC      F Pr(>F)   
+- Moisture    3 87.082 1.9764  0.015 * 
+- Management  3 87.707 2.1769  0.010 **
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Call: rda(formula = dune ~ Moisture + Management, data = dune.env)
+
+              Inertia Proportion Rank
+Total         84.1237     1.0000     
+Constrained   46.4249     0.5519    6
+Unconstrained 37.6988     0.4481   13
+Inertia is variance 
+
+Eigenvalues for constrained axes:
+  RDA1   RDA2   RDA3   RDA4   RDA5   RDA6 
+21.588 14.075  4.123  3.163  2.369  1.107 
+
+Eigenvalues for unconstrained axes:
+  PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8   PC9  PC10  PC11  PC12  PC13 
+8.241 7.138 5.355 4.409 3.143 2.770 1.878 1.741 0.952 0.909 0.627 0.311 0.227 
+
+> 
+> ## Example of ordistep, forward
+> ## Not run: 
+> ##D ordistep(mod0, scope = formula(mod1), direction="forward", perm.max = 200)
+> ## End(Not run)
+> ### Mite data
+> data(mite)
+> data(mite.env)
+> mite.hel = decostand(mite, "hel")
+> mod0 <- rda(mite.hel ~ 1, mite.env)  # Model with intercept only
+> mod1 <- rda(mite.hel ~ ., mite.env)  # Model with all explanatory variables
+> 
+> ## Example of ordiR2step with default direction = "both"
+> ## (This never goes "backward" but evaluates included terms.)
+> step.res <- ordiR2step(mod0, mod1, perm.max = 200)
+Step: R2.adj= 0 
+Call: mite.hel ~ 1 
+ 
+                R2.adjusted
+<All variables>  0.43670383
++ WatrCont       0.26084533
++ Shrub          0.20716190
++ Topo           0.15205437
++ Substrate      0.07718348
++ SubsDens       0.02632468
+<none>           0.00000000
+
+           Df     AIC     F Pr(>F)   
++ WatrCont  1 -84.336 25.35  0.002 **
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Step: R2.adj= 0.2608453 
+Call: mite.hel ~ WatrCont 
+ 
+                R2.adjusted
+<All variables>   0.4367038
++ Shrub           0.3177536
++ Topo            0.3120057
++ Substrate       0.3091579
++ SubsDens        0.3066715
+<none>            0.2608453
+- WatrCont        0.0000000
+
+        Df     AIC     F Pr(>F)   
++ Shrub  2 -88.034 3.836  0.002 **
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Step: R2.adj= 0.3177536 
+Call: mite.hel ~ WatrCont + Shrub 
+ 
+                R2.adjusted
+<All variables>   0.4367038
++ Substrate       0.3653551
++ Topo            0.3525851
++ SubsDens        0.3446967
+<none>            0.3177536
+- Shrub           0.2608453
+- WatrCont        0.2071619
+
+            Df     AIC      F Pr(>F)   
++ Substrate  6 -87.768 1.8251  0.002 **
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Step: R2.adj= 0.3653551 
+Call: mite.hel ~ WatrCont + Shrub + Substrate 
+ 
+                R2.adjusted
+<All variables>   0.4367038
++ Topo            0.4004249
++ SubsDens        0.3901844
+<none>            0.3653551
+- Substrate       0.3177536
+- Shrub           0.3091579
+- WatrCont        0.2616484
+
+       Df     AIC      F Pr(>F)   
++ Topo  1 -90.924 4.5095  0.004 **
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Step: R2.adj= 0.4004249 
+Call: mite.hel ~ WatrCont + Shrub + Substrate + Topo 
+ 
+                R2.adjusted
+<All variables>   0.4367038
++ SubsDens        0.4367038
+<none>            0.4004249
+- Topo            0.3653551
+- Shrub           0.3591790
+- Substrate       0.3525851
+- WatrCont        0.3145444
+
+           Df     AIC      F Pr(>F)   
++ SubsDens  1 -94.489 4.7999  0.002 **
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Step: R2.adj= 0.4367038 
+Call: mite.hel ~ WatrCont + Shrub + Substrate + Topo + SubsDens 
+ 
+                R2.adjusted
+<All variables>   0.4367038
+<none>            0.4367038
+- Shrub           0.4079297
+- SubsDens        0.4004249
+- Substrate       0.3951235
+- Topo            0.3901844
+- WatrCont        0.3357858
+
+> step.res$anova  # Summary table
+                 R2.adj Df     AIC       F Pr(>F)   
++ WatrCont      0.26085  1 -84.336 25.3499  0.002 **
++ Shrub         0.31775  2 -88.034  3.8360  0.002 **
++ Substrate     0.36536  6 -87.768  1.8251  0.002 **
++ Topo          0.40042  1 -90.924  4.5095  0.004 **
++ SubsDens      0.43670  1 -94.489  4.7999  0.002 **
+<All variables> 0.43670                             
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> ## Example of ordiR2step with direction = "forward"
+> ## Not run: 
+> ##D step.res <- ordiR2step(mod0, scope = formula(mod1), direction="forward") 
+> ##D step.res$anova  # Summary table
+> ## End(Not run)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ordisurf")
+> ### * ordisurf
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ordisurf
+> ### Title: Fit and Plot Smooth Surfaces of Variables on Ordination.
+> ### Aliases: ordisurf ordisurf.default ordisurf.formula calibrate.ordisurf
+> ###   plot.ordisurf
+> ### Keywords: multivariate aplot
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> data(varechem)
+> vare.dist <- vegdist(varespec)
+> vare.mds <- monoMDS(vare.dist)
+> ordisurf(vare.mds ~ Baresoil, varechem, bubble = 5)
+
+Family: gaussian 
+Link function: identity 
+
+Formula:
+y ~ s(x1, x2, k = 10, bs = "tp", fx = FALSE)
+
+Estimated degrees of freedom:
+5.63  total = 6.63 
+
+REML score: 92.96761     
+> 
+> ## as above but without the extra penalties on smooth terms,
+> ## and using GCV smoothness selection (old behaviour of `ordisurf()`):
+> ordisurf(vare.mds ~ Baresoil, varechem, col = "blue", add = TRUE,
++                         select = FALSE, method = "GCV.Cp")
+
+Family: gaussian 
+Link function: identity 
+
+Formula:
+y ~ s(x1, x2, k = 10, bs = "tp", fx = FALSE)
+
+Estimated degrees of freedom:
+6.45  total = 7.45 
+
+GCV score: 144.0039     
+> 
+> ## Cover of Cladina arbuscula
+> fit <- ordisurf(vare.mds ~ Cladarbu, varespec, family=quasipoisson) 
+> ## Get fitted values
+> calibrate(fit)
+       18        15        24        27        23        19        22        16 
+21.254026  5.675259  3.679616  3.898510  9.643821  7.698310  7.729203  9.758046 
+       28        13        14        20        25         7         5         6 
+ 2.743212 29.700556 11.971747  8.310960  5.390564 24.905994 11.007652 25.330656 
+        3         4         2         9        12        10        11        21 
+ 6.520708  9.410616  4.519672  4.090948 11.557930  4.314850 11.693692 14.243453 
+> 
+> ## Variable selection via additional shrinkage penalties
+> ## This allows non-significant smooths to be selected out
+> ## of the model not just to a linear surface. There are 2
+> ## options available:
+> ##  - option 1: `select = TRUE` --- the *default*
+> ordisurf(vare.mds ~ Baresoil, varechem, method = "REML", select = TRUE)
+
+Family: gaussian 
+Link function: identity 
+
+Formula:
+y ~ s(x1, x2, k = 10, bs = "tp", fx = FALSE)
+
+Estimated degrees of freedom:
+5.63  total = 6.63 
+
+REML score: 92.96761     
+> ##  - option 2: use a basis with shrinkage
+> ordisurf(vare.mds ~ Baresoil, varechem, method = "REML", bs = "ts")
+
+Family: gaussian 
+Link function: identity 
+
+Formula:
+y ~ s(x1, x2, k = 10, bs = "ts", fx = FALSE)
+
+Estimated degrees of freedom:
+4.43  total = 5.43 
+
+REML score: 96.2345     
+> ## or bs = "cs" with `isotropic = FALSE`
+> 
+> ## Plot method
+> plot(fit, what = "contour")
+> 
+> ## Plotting the "gam" object
+> plot(fit, what = "gam") ## 'col' and 'cex' not passed on
+> ## or via plot.gam directly
+> library(mgcv)
+Loading required package: nlme
+This is mgcv 1.8-12. For overview type 'help("mgcv-package")'.
+> plot.gam(fit, cex = 2, pch = 1, col = "blue")
+> ## 'col' effects all objects drawn...
+> 
+> ### controlling the basis functions used
+> ## Use Duchon splines
+> ordisurf(vare.mds ~ Baresoil, varechem, bs = "ds")
+
+Family: gaussian 
+Link function: identity 
+
+Formula:
+y ~ s(x1, x2, k = 10, bs = "ds", fx = FALSE)
+
+Estimated degrees of freedom:
+5.63  total = 6.63 
+
+REML score: 93.17149     
+> 
+> ## A fixed degrees of freedom smooth, must use 'select = FALSE'
+> ordisurf(vare.mds ~ Baresoil, varechem, knots = 4,
++                         fx = TRUE, select = FALSE)
+
+Family: gaussian 
+Link function: identity 
+
+Formula:
+y ~ s(x1, x2, k = 4, bs = "tp", fx = TRUE)
+
+Estimated degrees of freedom:
+3  total = 4 
+
+REML score: 81.86011     
+> 
+> ## An anisotropic smoother with cubic regression spline bases
+> ordisurf(vare.mds ~ Baresoil, varechem, isotropic = FALSE,
++                         bs = "cr", knots = 4)
+
+Family: gaussian 
+Link function: identity 
+
+Formula:
+y ~ te(x1, x2, k = c(4, 4), bs = c("cr", "cr"), fx = c(FALSE, 
+    FALSE))
+
+Estimated degrees of freedom:
+2.99  total = 3.99 
+
+REML score: 90.86099     
+> 
+> ## An anisotropic smoother with cubic regression spline with
+> ## shrinkage bases & different degrees of freedom in each dimension
+> ordisurf(vare.mds ~ Baresoil, varechem, isotropic = FALSE,
++                         bs = "cs", knots = c(3,4), fx = TRUE,
++                         select = FALSE)
+
+Family: gaussian 
+Link function: identity 
+
+Formula:
+y ~ te(x1, x2, k = c(3, 4), bs = c("cs", "cs"), fx = c(TRUE, 
+    TRUE))
+
+Estimated degrees of freedom:
+11  total = 12 
+
+REML score: 39.58245     
+> 
+> 
+> 
+> cleanEx()
+
+detaching ‘package:mgcv’, ‘package:nlme’
+
+> nameEx("orditkplot")
+> ### * orditkplot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: orditkplot
+> ### Title: Ordination Plot with Movable Labels
+> ### Aliases: orditkplot plot.orditkplot scores.orditkplot points.orditkplot
+> ###   text.orditkplot
+> ### Keywords: iplot dynamic
+> 
+> ### ** Examples
+> 
+> ## The example needs user interaction and is not executed directly.
+> ## It should work when pasted to the window.
+> ## Not run: 
+> ##D data(varespec)
+> ##D ord <- cca(varespec)
+> ##D ## Do something with the graph and end by clicking "Dismiss"
+> ##D orditkplot(ord, mar = c(4,4,1,1)+.1, font=3)
+> ##D ## Use ordipointlabel to produce a plot that has both species and site
+> ##D ## scores in different colors and plotting symbols
+> ##D pl <- ordipointlabel(ord)
+> ##D orditkplot(pl)
+> ## End(Not run)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("orditorp")
+> ### * orditorp
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: orditorp
+> ### Title: Add Text or Points to Ordination Plots
+> ### Aliases: orditorp
+> ### Keywords: aplot hplot
+> 
+> ### ** Examples
+> 
+> ## A cluttered ordination plot :
+> data(BCI)
+> mod <- cca(BCI)
+> plot(mod, dis="sp", type="t")
+> # Now with orditorp and abbreviated species names
+> cnam <- make.cepnames(names(BCI))
+> plot(mod, dis="sp", type="n")
+> stems <- colSums(BCI)
+> orditorp(mod, "sp", label = cnam, priority=stems, pch="+", pcol="grey")
+> 
+> ## show select in action
+> set.seed(1)
+> take <- sample(ncol(BCI), 50)
+> plot(mod, dis="sp", type="n")
+> stems <- colSums(BCI)
+> orditorp(mod, "sp", label = cnam, priority=stems, select = take,
++          pch="+", pcol="grey")
+> ## Don't show: 
+> ## example(orditorp) should not set random seed in the user session
+> rm(.Random.seed)
+> ## End(Don't show)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("ordixyplot")
+> ### * ordixyplot
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: ordixyplot
+> ### Title: Trellis (Lattice) Plots for Ordination
+> ### Aliases: ordixyplot ordisplom ordicloud panel.ordi panel.ordiarrows
+> ###   panel.ordi3d prepanel.ordi3d ordilattice.getEnvfit
+> ### Keywords: hplot
+> 
+> ### ** Examples
+> 
+> data(dune)
+> data(dune.env)
+> ord <- cca(dune)
+> ## Pairs plots
+> ordisplom(ord)
+> ordisplom(ord, data=dune.env, choices=1:2)
+> ordisplom(ord, data=dune.env, form = ~ . | Management, groups=Manure)
+> ## Scatter plot
+> ordixyplot(ord, data=dune.env, form = CA1 ~ CA2 | Management,
++   groups=Manure)
+> ## Choose a different scaling
+> ordixyplot(ord, scaling = "symmetric")
+> ## ... Slices of third axis
+> ordixyplot(ord, form = CA1 ~ CA2 | equal.count(CA3, 4), type = c("g","p"))
+> ## Display environemntal variables
+> ordixyplot(ord, envfit = envfit(ord ~ Management + A1, dune.env, choices=1:3))
+> ## 3D Scatter plots
+> ordicloud(ord, form = CA2 ~ CA3*CA1, groups = Manure, data = dune.env)
+> ordicloud(ord, form = CA2 ~ CA3*CA1 | Management, groups = Manure,
++    data = dune.env, auto.key = TRUE, type = c("p","h"))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("pcnm")
+> ### * pcnm
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: pcnm
+> ### Title: Principal Coordinates of Neighbourhood Matrix
+> ### Aliases: pcnm scores.pcnm
+> ### Keywords: spatial multivariate
+> 
+> ### ** Examples
+> 
+> ## Example from Borcard & Legendre (2002)
+> data(mite.xy)
+> pcnm1 <- pcnm(dist(mite.xy))
+> op <- par(mfrow=c(1,3))
+> ## Map of PCNMs in the sample plot
+> ordisurf(mite.xy, scores(pcnm1, choi=1), bubble = 4, main = "PCNM 1")
+
+Family: gaussian 
+Link function: identity 
+
+Formula:
+y ~ s(x1, x2, k = 10, bs = "tp", fx = FALSE)
+
+Estimated degrees of freedom:
+8.71  total = 9.71 
+
+REML score: -120.7705     
+> ordisurf(mite.xy, scores(pcnm1, choi=2), bubble = 4, main = "PCNM 2")
+
+Family: gaussian 
+Link function: identity 
+
+Formula:
+y ~ s(x1, x2, k = 10, bs = "tp", fx = FALSE)
+
+Estimated degrees of freedom:
+7.18  total = 8.18 
+
+REML score: -103.4662     
+> ordisurf(mite.xy, scores(pcnm1, choi=3), bubble = 4, main = "PCNM 3")
+
+Family: gaussian 
+Link function: identity 
+
+Formula:
+y ~ s(x1, x2, k = 10, bs = "tp", fx = FALSE)
+
+Estimated degrees of freedom:
+8.32  total = 9.32 
+
+REML score: -94.19053     
+> par(op)
+> ## Plot first PCNMs against each other
+> ordisplom(pcnm1, choices=1:4)
+> ## Weighted PCNM for CCA
+> data(mite)
+> rs <- rowSums(mite)/sum(mite)
+> pcnmw <- pcnm(dist(mite.xy), w = rs)
+> ord <- cca(mite ~ scores(pcnmw))
+> ## Multiscale ordination: residual variance should have no distance
+> ## trend
+> msoplot(mso(ord, mite.xy))
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("permatfull")
+> ### * permatfull
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: permat
+> ### Title: Matrix Permutation Algorithms for Presence-Absence and Count
+> ###   Data
+> ### Aliases: permatfull permatswap summary.permat print.summary.permat
+> ###   print.permat plot.permat lines.permat as.ts.permat as.mcmc.permat
+> ### Keywords: multivariate datagen
+> 
+> ### ** Examples
+> 
+> ## A simple artificial community data matrix.
+> m <- matrix(c(
++     1,3,2,0,3,1,
++     0,2,1,0,2,1,
++     0,0,1,2,0,3,
++     0,0,0,1,4,3
++     ), 4, 6, byrow=TRUE)
+> ## Using the quasiswap algorithm to create a 
+> ## list of permuted matrices, where
+> ## row/columns sums and matrix fill are preserved:
+> x1 <- permatswap(m, "quasiswap")
+> summary(x1)
+Summary of object of class 'permat'
+
+Call: permatswap(m = m, method = "quasiswap")
+
+Matrix type: count 
+Permutation type: swap
+Method: quasiswap_count, burnin: 0, thin: 1
+Restricted: FALSE 
+Fixed margins: both
+
+Matrix dimensions: 4 rows, 6 columns
+Sum of original matrix: 30
+Fill of original matrix: 0.62
+Number of permuted matrices: 99 
+
+Matrix sums retained: 100 %
+Matrix fill retained: 100 %
+Row sums retained:    100 %
+Column sums retained: 100 %
+Row incidences retained:    2.02 %
+Column incidences retained: 6.06 %
+
+Bray-Curtis dissimilarities among original and permuted matrices:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+ 0.2000  0.3667  0.4333  0.4202  0.4667  0.6333 
+
+Chi-squared for original matrix: 18.55
+Chi-squared values among expected and permuted matrices:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+  15.63   19.38   21.19   21.53   23.44   29.08 
+> ## Unrestricted permutation retaining
+> ## row/columns sums but not matrix fill:
+> x2 <- permatfull(m)
+> summary(x2)
+Summary of object of class 'permat'
+
+Call: permatfull(m = m)
+
+Matrix type: count 
+Permutation type: full
+Method: r2dtable
+Restricted: FALSE 
+Fixed margins: both
+
+Matrix dimensions: 4 rows, 6 columns
+Sum of original matrix: 30
+Fill of original matrix: 0.62
+Number of permuted matrices: 99 
+
+Matrix sums retained: 100 %
+Matrix fill retained: 18.18 %
+Row sums retained:    100 %
+Column sums retained: 100 %
+Row incidences retained:    0 %
+Column incidences retained: 1.01 %
+
+Bray-Curtis dissimilarities among original and permuted matrices:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+ 0.1667  0.3333  0.4000  0.3754  0.4333  0.5667 
+
+Chi-squared for original matrix: 18.55
+Chi-squared values among expected and permuted matrices:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+  7.857  12.640  15.650  16.410  20.240  33.150 
+> ## Unrestricted permutation of presence-absence type
+> ## not retaining row/columns sums:
+> x3 <- permatfull(m, "none", mtype="prab")
+> x3$orig  ## note: original matrix is binarized!
+     [,1] [,2] [,3] [,4] [,5] [,6]
+[1,]    1    1    1    0    1    1
+[2,]    0    1    1    0    1    1
+[3,]    0    0    1    1    0    1
+[4,]    0    0    0    1    1    1
+> summary(x3)
+Summary of object of class 'permat'
+
+Call: permatfull(m = m, fixedmar = "none", mtype = "prab")
+
+Matrix type: prab 
+Permutation type: full
+Method: r00
+Restricted: FALSE 
+Fixed margins: none
+Individuals and samples are shuffled
+
+Matrix dimensions: 4 rows, 6 columns
+Sum of original matrix: 15
+Fill of original matrix: 0.62
+Number of permuted matrices: 99 
+
+Matrix sums retained: 100 %
+Matrix fill retained: 100 %
+Row sums retained:    2.02 %
+Column sums retained: 0 %
+Row incidences retained:    2.02 %
+Column incidences retained: 0 %
+
+Bray-Curtis dissimilarities among original and permuted matrices:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+ 0.2000  0.3333  0.4000  0.3643  0.4000  0.5333 
+
+Chi-squared for original matrix: 8.4
+Chi-squared values among expected and permuted matrices:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+  8.354  13.340  15.060  15.280  17.180  21.330 
+> ## Restricted permutation,
+> ## check sums within strata:
+> x4 <- permatfull(m, strata=c(1,1,2,2))
+> summary(x4)
+Summary of object of class 'permat'
+
+Call: permatfull(m = m, strata = c(1, 1, 2, 2))
+
+Matrix type: count 
+Permutation type: full
+Method: r2dtable
+Restricted: TRUE 
+Fixed margins: both
+
+Matrix dimensions: 4 rows, 6 columns
+Sum of original matrix: 30
+Fill of original matrix: 0.62
+Number of permuted matrices: 99 
+
+Matrix sums retained: 100 %
+Matrix fill retained: 49.49 %
+Row sums retained:    100 %
+Column sums retained: 100 %
+Row incidences retained:    7.07 %
+Column incidences retained: 3.03 %
+Sums within strata retained: 100 %
+
+Bray-Curtis dissimilarities among original and permuted matrices:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+0.06667 0.20000 0.20000 0.21950 0.26670 0.40000 
+
+Chi-squared for original matrix: 18.55
+Chi-squared values among expected and permuted matrices:
+   Min. 1st Qu.  Median    Mean 3rd Qu.    Max. 
+  14.21   18.28   19.84   20.85   23.01   32.63 
+> 
+> ## NOTE: 'times' argument usually needs to be >= 99
+> ## here much lower value is used for demonstration
+> 
+> ## Not sequential algorithm
+> data(BCI)
+> a <- permatswap(BCI, "quasiswap", times=19)
+> ## Sequential algorithm
+> b <- permatswap(BCI, "abuswap", fixedmar="col",
++     burnin=0, thin=100, times=19)
+> opar <- par(mfrow=c(2,2))
+> plot(a, main="Not sequential")
+> plot(b, main="Sequential")
+> plot(a, "chisq")
+> plot(b, "chisq")
+> par(opar)
+> ## Extract Bray-Curtis dissimilarities
+> ## as time series
+> bc <- as.ts(b)
+> ## Lag plot
+> lag.plot(bc)
+> ## First order autoregressive model
+> mar <- arima(bc, c(1,0,0))
+> mar
+
+Call:
+arima(x = bc, order = c(1, 0, 0))
+
+Coefficients:
+         ar1  intercept
+      0.9914     0.1847
+s.e.  0.0122     0.1343
+
+sigma^2 estimated as 0.0003348:  log likelihood = 47.03,  aic = -88.06
+> ## Ljung-Box test of residuals
+> Box.test(residuals(mar))
+
+	Box-Pierce test
+
+data:  residuals(mar)
+X-squared = 0.0010721, df = 1, p-value = 0.9739
+
+> ## Graphical diagnostics
+> tsdiag(mar)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("permustats")
+> ### * permustats
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: permustats
+> ### Title: Extract, Analyse and Display Permutation Results
+> ### Aliases: permustats permustats.adonis permustats.anosim
+> ###   permustats.anova.cca permustats.CCorA permustats.envfit
+> ###   permustats.factorfit permustats.mantel permustats.mrpp permustats.mso
+> ###   permustats.oecosimu permustats.ordiareatest
+> ###   permustats.permutest.betadisper permustats.permutest.cca
+> ###   permustats.protest permustats.vectorfit summary.permustats
+> ###   c.permustats densityplot.permustats density.permustats
+> ###   qqnorm.permustats qqmath.permustats
+> ### Keywords: distribution smooth
+> 
+> ### ** Examples
+> 
+> data(dune, dune.env)
+> mod <- adonis2(dune ~ Management + A1, data = dune.env)
+> ## use permustats
+> perm <- permustats(mod)
+> summary(perm)
+
+           statistic    SES   mean lower median  upper Pr(perm)   
+Management    3.0730 4.5815 1.0462       0.9470 1.8475    0.006 **
+A1            2.7676 2.6322 1.0364       0.8851 2.3280    0.025 * 
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+(Interval (Upper - Lower) = 0.95)
+> densityplot(perm)
+> qqmath(perm)
+> 
+> ## example of multiple types of statistic
+> mod <- with(dune.env, betadisper(vegdist(dune), Management))
+> pmod <- permutest(mod, nperm = 99, pairwise = TRUE)
+> perm <- permustats(pmod)
+> summary(perm, interval = 0.90)
+
+            statistic     SES    mean   lower  median   upper Pr(perm)  
+Overall (F)    1.9506  0.6046  1.2061          0.8375  2.7743    0.184  
+BF-HF (t)     -0.5634 -0.4179 -0.0584 -2.0011 -0.0974  1.8273    0.615  
+BF-NM (t)     -2.2387 -1.8228 -0.0941 -2.1192 -0.0944  1.7339    0.085 .
+BF-SF (t)     -1.1675 -0.8886 -0.0928 -2.1442 -0.0866  1.8232    0.333  
+HF-NM (t)     -2.1017 -1.8899 -0.0158 -1.8740  0.0412  1.6319    0.067 .
+HF-SF (t)     -0.8789 -0.7166 -0.0321 -1.8973 -0.0076  1.8362    0.431  
+NM-SF (t)      0.9485  0.8309 -0.0036 -1.8411 -0.0531  1.9024    0.367  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+(Interval (Upper - Lower) = 0.9)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("permutest.betadisper")
+> ### * permutest.betadisper
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: permutest.betadisper
+> ### Title: Permutation test of multivariate homogeneity of groups
+> ###   dispersions (variances)
+> ### Aliases: permutest.betadisper
+> ### Keywords: methods multivariate
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> 
+> ## Bray-Curtis distances between samples
+> dis <- vegdist(varespec)
+> 
+> ## First 16 sites grazed, remaining 8 sites ungrazed
+> groups <- factor(c(rep(1,16), rep(2,8)), labels = c("grazed","ungrazed"))
+> 
+> ## Calculate multivariate dispersions
+> mod <- betadisper(dis, groups)
+> mod
+
+	Homogeneity of multivariate dispersions
+
+Call: betadisper(d = dis, group = groups)
+
+No. of Positive Eigenvalues: 15
+No. of Negative Eigenvalues: 8
+
+Average distance to median:
+  grazed ungrazed 
+  0.3926   0.2706 
+
+Eigenvalues for PCoA axes:
+ PCoA1  PCoA2  PCoA3  PCoA4  PCoA5  PCoA6  PCoA7  PCoA8 
+1.7552 1.1334 0.4429 0.3698 0.2454 0.1961 0.1751 0.1284 
+> 
+> ## Perform test
+> anova(mod)
+Analysis of Variance Table
+
+Response: Distances
+          Df  Sum Sq  Mean Sq F value  Pr(>F)  
+Groups     1 0.07931 0.079306  4.6156 0.04295 *
+Residuals 22 0.37801 0.017182                  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> ## Permutation test for F
+> pmod <- permutest(mod, permutations = 99, pairwise = TRUE)
+> 
+> ## Tukey's Honest Significant Differences
+> (mod.HSD <- TukeyHSD(mod))
+  Tukey multiple comparisons of means
+    95% family-wise confidence level
+
+Fit: aov(formula = distances ~ group, data = df)
+
+$group
+                      diff        lwr          upr     p adj
+ungrazed-grazed -0.1219422 -0.2396552 -0.004229243 0.0429502
+
+> plot(mod.HSD)
+> 
+> ## Has permustats() method
+> pstat <- permustats(pmod)
+> densityplot(pstat, scales = list(x = list(relation = "free")))
+> qqmath(pstat, scales = list(relation = "free"))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("plot.cca")
+> ### * plot.cca
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: plot.cca
+> ### Title: Plot or Extract Results of Constrained Correspondence Analysis
+> ###   or Redundancy Analysis
+> ### Aliases: plot.cca text.cca points.cca scores.cca scores.rda summary.cca
+> ###   print.summary.cca ade2vegancca head.summary.cca tail.summary.cca
+> ### Keywords: hplot aplot
+> 
+> ### ** Examples
+> 
+> data(dune)
+> data(dune.env)
+> mod <- cca(dune ~ A1 + Moisture + Management, dune.env)
+> plot(mod, type="n")
+> text(mod, dis="cn")
+> points(mod, pch=21, col="red", bg="yellow", cex=1.2)
+> text(mod, "species", col="blue", cex=0.8)
+> ## Limited output of 'summary'
+> head(summary(mod), tail=2)
+
+Call:
+cca(formula = dune ~ A1 + Moisture + Management, data = dune.env) 
+
+Partitioning of mean squared contingency coefficient:
+              Inertia Proportion
+Total          2.1153     1.0000
+Constrained    1.1392     0.5385
+Unconstrained  0.9761     0.4615
+
+Eigenvalues, and their contribution to the mean squared contingency coefficient 
+
+Importance of components:
+                        CCA1   CCA2    CCA3    CCA4    CCA5    CCA6    CCA7
+Eigenvalue            0.4483 0.3001 0.14995 0.10733 0.05668 0.04335 0.03345
+Proportion Explained  0.2119 0.1419 0.07089 0.05074 0.02680 0.02050 0.01581
+Cumulative Proportion 0.2119 0.3538 0.42470 0.47544 0.50223 0.52273 0.53855
+                         CA1     CA2     CA3     CA4     CA5     CA6     CA7
+Eigenvalue            0.3064 0.13191 0.11516 0.10947 0.07724 0.07575 0.04871
+Proportion Explained  0.1448 0.06236 0.05444 0.05175 0.03652 0.03581 0.02303
+Cumulative Proportion 0.6834 0.74574 0.80018 0.85194 0.88845 0.92427 0.94730
+                          CA8     CA9    CA10    CA11     CA12
+Eigenvalue            0.03758 0.03106 0.02102 0.01254 0.009277
+Proportion Explained  0.01777 0.01468 0.00994 0.00593 0.004390
+Cumulative Proportion 0.96506 0.97975 0.98968 0.99561 1.000000
+
+Accumulated constrained eigenvalues
+Importance of components:
+                        CCA1   CCA2   CCA3    CCA4    CCA5    CCA6    CCA7
+Eigenvalue            0.4483 0.3001 0.1499 0.10733 0.05668 0.04335 0.03345
+Proportion Explained  0.3935 0.2635 0.1316 0.09422 0.04976 0.03806 0.02937
+Cumulative Proportion 0.3935 0.6570 0.7886 0.88282 0.93258 0.97063 1.00000
+
+Scaling 2 for species and site scores
+* Species are scaled proportional to eigenvalues
+* Sites are unscaled: weighted dispersion equal on all dimensions
+
+
+Species scores
+
+            CCA1    CCA2     CCA3     CCA4      CCA5     CCA6
+Achimill  0.8150  0.4375 -0.11236  0.35595 -0.114763 -0.01972
+Agrostol -0.7488 -0.4783  0.03561  0.17039  0.187389  0.23471
+Airaprae -0.8186  1.7469  1.04506 -0.28593  0.191836  0.73077
+Alopgeni -0.3442 -1.0216  0.37620  0.02296 -0.004041  0.04789
+Anthodor  0.3367  0.7694 -0.07602 -0.05421  0.136354  0.42463
+Bellpere  0.6535  0.2200  0.03438  0.60436 -0.090469  0.28138
+....                                                         
+Bracruta -0.1309  0.2009 -0.03708 -0.17421 -0.109657  0.04381
+Callcusp -1.5181  0.3834 -0.23255  0.15246  0.104239 -0.11424
+
+
+Site scores (weighted averages of species scores)
+
+        CCA1    CCA2     CCA3    CCA4    CCA5    CCA6
+1     1.2468 -0.4017  0.91955  0.7292  1.5785 -1.0196
+2     0.8622 -0.1641  0.25789  1.7240 -0.7592 -0.6479
+3     0.3165 -0.9785  0.82952  0.7451  0.6556  0.3256
+4     0.2405 -0.8699  1.07861  1.4103  1.1164  2.4714
+5     1.1362  0.2621 -1.10847 -0.9417  0.5630  1.1495
+6     1.0575  0.4041 -1.65035 -1.8483  1.0287 -0.1690
+....                                                 
+19   -0.7913  2.7451  2.93017 -1.3851 -0.3932  1.7277
+20   -2.0770  1.0113 -0.02581 -0.8949  1.6406 -1.7917
+
+
+Site constraints (linear combinations of constraining variables)
+
+        CCA1    CCA2     CCA3    CCA4    CCA5     CCA6
+1     0.7245 -0.3695  1.25652 -0.3678  0.9827 -0.60590
+2     0.9033  0.4250  0.03901  1.0557 -1.0860 -1.61234
+3     0.4493 -0.6694  0.67765  0.8695  0.9609  1.52307
+4     0.4550 -0.6532  0.72768  0.8529  0.9795  1.50218
+5     0.9671 -0.2010 -1.93972 -0.5807  0.2582  0.31905
+6     1.0805  0.1235 -0.93911 -0.9126  0.6307 -0.09863
+....                                                  
+19   -1.4581  1.6074  1.16812 -0.5305  0.3178 -0.40336
+20   -1.4468  1.6399  1.26818 -0.5637  0.3551 -0.44513
+
+
+Biplot scores for constraining variables
+
+                CCA1    CCA2     CCA3     CCA4     CCA5     CCA6
+A1           -0.5543 -0.1643 -0.68092  0.10702 -0.17968  0.30434
+Moisture.L   -0.9439 -0.1658  0.07947 -0.02251  0.03105 -0.02454
+Moisture.Q   -0.1865  0.3564 -0.45393 -0.17252  0.28388 -0.63130
+Moisture.C   -0.2065  0.1728  0.10624  0.68205  0.50145  0.35869
+ManagementHF  0.3621 -0.1143 -0.42227 -0.67858  0.17177 -0.12184
+ManagementNM -0.5835  0.7261 -0.01207 -0.09715 -0.11392  0.26924
+ManagementSF -0.1512 -0.6968  0.38542  0.24769  0.29474  0.23829
+
+
+Centroids for factor constraints
+
+                CCA1     CCA2     CCA3     CCA4     CCA5    CCA6
+Moisture1     0.9119  0.35388 -0.40013 -0.26218  0.02084 -0.4708
+Moisture2     0.5015 -0.06706  0.60222  1.12478  0.33942  1.2024
+Moisture4    -0.1522 -1.35873  0.76544 -1.37289 -1.80794  0.3849
+Moisture5    -1.3394  0.11972 -0.20942  0.04843  0.39751 -0.3902
+ManagementBF  0.8376  0.41614  0.13885  1.40679 -0.97766 -0.9604
+ManagementHF  0.5426 -0.17426 -0.62822 -1.00848  0.25622 -0.1834
+ManagementNM -1.1010  1.36665 -0.02097 -0.18131 -0.21523  0.5084
+ManagementSF -0.2320 -1.06831  0.59183  0.38035  0.45250  0.3659
+
+> ## Scaling can be numeric or more user-friendly names
+> ## e.g. Hill's scaling for (C)CA
+> scrs <- scores(mod, scaling = "sites", hill = TRUE)
+> ## or correlation-based scores in PCA/RDA
+> scrs <- scores(rda(dune ~ A1 + Moisture + Management, dune.env),
++                scaling = "sites", correlation = TRUE)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("prc")
+> ### * prc
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: prc
+> ### Title: Principal Response Curves for Treatments with Repeated
+> ###   Observations
+> ### Aliases: prc summary.prc plot.prc
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> ## Chlorpyrifos experiment and experimental design: Pesticide
+> ## treatment in ditches (replicated) and followed over from 4 weeks
+> ## before to 24 weeks after exposure 
+> data(pyrifos)
+> week <- gl(11, 12, labels=c(-4, -1, 0.1, 1, 2, 4, 8, 12, 15, 19, 24))
+> dose <- factor(rep(c(0.1, 0, 0, 0.9, 0, 44, 6, 0.1, 44, 0.9, 0, 6), 11))
+> ditch <- gl(12, 1, length=132)
+> # PRC
+> mod <- prc(pyrifos, dose, week)
+> mod            # RDA
+Call: prc(response = pyrifos, treatment = dose, time = week)
+
+               Inertia Proportion Rank
+Total         288.9920     1.0000     
+Conditional    63.3493     0.2192   10
+Constrained    96.6837     0.3346   44
+Unconstrained 128.9589     0.4462   77
+Inertia is variance 
+
+Eigenvalues for constrained axes:
+  RDA1   RDA2   RDA3   RDA4   RDA5   RDA6   RDA7   RDA8   RDA9  RDA10  RDA11 
+25.282  8.297  6.044  4.766  4.148  3.857  3.587  3.334  3.087  2.551  2.466 
+ RDA12  RDA13  RDA14  RDA15  RDA16  RDA17  RDA18  RDA19  RDA20  RDA21  RDA22 
+ 2.209  2.129  1.941  1.799  1.622  1.579  1.440  1.398  1.284  1.211  1.133 
+ RDA23  RDA24  RDA25  RDA26  RDA27  RDA28  RDA29  RDA30  RDA31  RDA32  RDA33 
+ 1.001  0.923  0.862  0.788  0.750  0.712  0.685  0.611  0.584  0.537  0.516 
+ RDA34  RDA35  RDA36  RDA37  RDA38  RDA39  RDA40  RDA41  RDA42  RDA43  RDA44 
+ 0.442  0.417  0.404  0.368  0.340  0.339  0.306  0.279  0.271  0.205  0.179 
+
+Eigenvalues for unconstrained axes:
+   PC1    PC2    PC3    PC4    PC5    PC6    PC7    PC8 
+17.156  9.189  7.585  6.064  5.730  4.843  4.518  4.105 
+(Showed only 8 of all 77 unconstrained eigenvalues)
+
+> summary(mod)   # PRC
+
+Call:
+prc(response = pyrifos, treatment = dose, time = week) 
+Species scores:
+    Simve     Daplo     Cerpu     Alogu     Aloco     Alore     Aloaf     Copsp 
+-1.461934 -0.796510 -0.295171 -0.152301 -0.096273 -0.171335 -0.231967 -0.635966 
+    Ostsp     Slyla     Acrha     Aloex     Chysp     Alona     Plead     Oxyte 
+-1.257492  0.302872 -0.057396 -0.124049 -0.051689 -0.034638 -0.075268 -0.013815 
+    Grate     Copdi     NauLa     CilHa     Strvi     amosp     Ascmo     Synsp 
+-0.052667 -0.777088 -2.636100 -0.486881 -1.669474  0.738371 -0.037926  0.014409 
+    Squro     Squmu     Polar     Kerqu     Anufi     Mytve     Mytvi     Mytmu 
+-0.143790  0.246185 -0.251255 -0.269397 -0.235362 -0.040448 -0.049452 -0.057589 
+    Lepsp     Leppa     Colob     Colbi     Colun     Lecsp     Lecqu     Lecco 
+-0.542922 -0.046123  0.393234  0.075905  0.450495 -0.257170  0.048327  0.158007 
+    Leclu     Lecfl     Tripo     Cepsp     Monlo     Monae     Scalo     Trilo 
+-0.027077  0.221912 -0.117056  0.440303  0.287108  0.048918  0.041981  0.021257 
+  Tripo.1     Tricy     Trisp     Tepat     Rotne     Notla     Filsp     Lopox 
+-0.134025 -0.182409 -0.042651 -0.004198 -0.078168  0.062163  0.091561  0.016854 
+ hydrspec  bothrosp  olchaeta  erpoocto  glsicomp  alglhete  hebdstag   sphidae 
+ 0.026485 -0.216815  0.633674  0.490029  0.078527  0.039728 -0.490678 -0.796015 
+ ansuvote  armicris  bathcont  binitent  gyraalbu  hippcomp  lymnstag  lymnaes7 
+-0.076512 -0.913681 -0.039855  1.060788 -0.017975 -0.219974  0.143403 -0.073502 
+ physfont  plbacorn  popyanti  radiovat  radipere  valvcris  valvpisc  hycarina 
+ 0.014349 -0.046098 -0.691904  0.010777  0.340163 -0.005753  0.145523 -0.567803 
+ gammpule  aselaqua  proameri  collembo  caenhora  caenluct  caenrobu  cloedipt 
+-0.830166 -0.858606 -0.063401 -0.016264 -3.136867 -1.292300 -0.068624 -2.574625 
+ cloesimi  aeshniae  libellae  conagrae  corident  coripanz  coripunc  cymabons 
+-0.675580 -0.115677  0.044524 -0.886795 -0.007484 -0.065501  0.096124 -0.025213 
+ hesplinn  hespsahl  notoglau  notomacu  notoobli  notoviri  pacoconc  pleaminu 
+ 0.037779 -0.018078 -0.301948 -0.027226 -0.044790 -0.117398 -0.009087 -0.038705 
+ sigadist  sigafall  sigastri  sigarasp  colyfusc  donacis6  gyrimari  haliconf 
+-0.041594  0.009987 -0.032743  0.150817 -0.019847  0.042751 -0.005753 -0.243054 
+ haliflav  haligruf  haliobli  herubrev  hya_herm  hyglpusi  hyhyovat  hypoplan 
+-0.024222 -0.244814 -0.071501  0.069877  0.175327  0.006404 -0.013159 -0.008145 
+ hyporusp  hytuinae  hytuvers  laphminu  noteclav  rhantusp  sialluta  ablalong 
+-0.126197 -1.259664 -0.963901 -0.344204 -0.004303 -0.036774 -0.603320 -0.008145 
+ ablaphmo  cltanerv  malopisp  mopetenu  prdiussp  pstavari  chironsp  crchirsp 
+-1.627590 -0.041132 -0.025919 -0.004740 -0.301790 -0.045054 -1.027839 -0.009087 
+ crclglat  ditendsp  mitegchl  pachgarc  pachgvit  popegnub  popedisp  acriluce 
+-0.015746 -0.045402 -0.125429  0.006628  0.016265 -0.121971  0.037879  0.004324 
+ chclpige  conescut  cricotsp  liesspec  psclbarb  psclgsli  psclobvi  psclplat 
+ 0.004756 -0.446524 -0.066095 -0.058403  0.015576 -0.327165  0.197081  0.028310 
+ psclpsil  pscladsp  cladotsp  laa_spec  patanysp  tatarssp  zaa_spec  anopmacu 
+-0.003991 -0.003086 -0.293623 -0.018548 -0.079841 -0.364072 -0.027165  0.089046 
+ cepogoae  chaoobsc  cucidae4  tabanusp  agdasphr  athrater  cyrncren  holodubi 
+-1.389767 -1.328261 -0.018078  0.006309 -0.147828 -0.036774 -0.038705 -0.051532 
+ holopici  leceriae  lilurhom  monaangu  mystazur  mystloni  oecefurv  oecelacu 
+-0.332631 -0.162413 -0.004929 -0.350402 -0.018078 -1.630725 -0.291847 -0.140893 
+ triabico  paponysp 
+-0.048357 -0.053182 
+
+Coefficients for dose + week:dose interaction
+which are contrasts to dose 0 
+rows are dose, columns are week
+        -4     -1    0.1       1      2      4      8     12     15     19
+0.1 0.1327 0.2527 0.1875 0.07479 0.3863 0.2509 0.1485 0.2824 0.2064 0.3977
+0.9 0.1490 0.3558 0.3560 0.87706 0.9151 0.7918 0.2488 0.6523 0.4428 0.3229
+6   0.3055 0.2266 0.8346 2.12626 1.9923 2.1165 1.0317 0.8638 0.5660 0.6054
+44  0.2570 0.3601 1.3438 2.31842 2.3862 2.6894 2.3745 1.8536 1.4377 1.0607
+        24
+0.1 0.1441
+0.9 0.2839
+6   0.3352
+44  0.5704
+> logabu <- colSums(pyrifos)
+> plot(mod, select = logabu > 100)
+> ## Ditches are randomized, we have a time series, and are only
+> ## interested in the first axis
+> ctrl <- how(plots = Plots(strata = ditch,type = "free"),
++     within = Within(type = "series"), nperm = 99)
+> anova(mod, permutations = ctrl, first=TRUE)
+Permutation test for rda under reduced model
+Plots: ditch, plot permutation: free
+Permutation: series
+Number of permutations: 99
+
+Model: prc(response = pyrifos, treatment = dose, time = week)
+         Df Variance      F Pr(>F)   
+RDA1      1   25.282 15.096   0.01 **
+Residual 77  128.959                 
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> 
+> 
+> cleanEx()
+> nameEx("predict.cca")
+> ### * predict.cca
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: predict.cca
+> ### Title: Prediction Tools for [Constrained] Ordination (CCA, RDA, DCA,
+> ###   CA, PCA)
+> ### Aliases: fitted.cca fitted.rda fitted.capscale fitted.dbrda
+> ###   residuals.cca predict.cca predict.rda predict.decorana coef.cca
+> ###   coef.rda calibrate.cca calibrate
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> data(dune)
+> data(dune.env)
+> mod <- cca(dune ~ A1 + Management + Condition(Moisture), data=dune.env)
+> # Definition of the concepts 'fitted' and 'residuals'
+> mod
+Call: cca(formula = dune ~ A1 + Management + Condition(Moisture), data
+= dune.env)
+
+              Inertia Proportion Rank
+Total          2.1153     1.0000     
+Conditional    0.6283     0.2970    3
+Constrained    0.5109     0.2415    4
+Unconstrained  0.9761     0.4615   12
+Inertia is mean squared contingency coefficient 
+
+Eigenvalues for constrained axes:
+   CCA1    CCA2    CCA3    CCA4 
+0.24932 0.12090 0.08160 0.05904 
+
+Eigenvalues for unconstrained axes:
+    CA1     CA2     CA3     CA4     CA5     CA6     CA7     CA8     CA9    CA10 
+0.30637 0.13191 0.11516 0.10947 0.07724 0.07575 0.04871 0.03758 0.03106 0.02102 
+   CA11    CA12 
+0.01254 0.00928 
+
+> cca(fitted(mod))
+Call: cca(X = fitted(mod))
+
+              Inertia Rank
+Total          0.5109     
+Unconstrained  0.5109    4
+Inertia is mean squared contingency coefficient 
+
+Eigenvalues for unconstrained axes:
+    CA1     CA2     CA3     CA4 
+0.24932 0.12090 0.08160 0.05904 
+
+> cca(residuals(mod))
+Call: cca(X = residuals(mod))
+
+              Inertia Rank
+Total          0.9761     
+Unconstrained  0.9761   12
+Inertia is mean squared contingency coefficient 
+
+Eigenvalues for unconstrained axes:
+    CA1     CA2     CA3     CA4     CA5     CA6     CA7     CA8     CA9    CA10 
+0.30637 0.13191 0.11516 0.10947 0.07724 0.07575 0.04871 0.03758 0.03106 0.02102 
+   CA11    CA12 
+0.01254 0.00928 
+
+> # Remove rare species (freq==1) from 'cca' and find their scores
+> # 'passively'.
+> freq <- specnumber(dune, MARGIN=2)
+> freq
+Achimill Agrostol Airaprae Alopgeni Anthodor Bellpere Bromhord Chenalbu 
+       7       10        2        8        6        6        5        1 
+Cirsarve Comapalu Eleopalu Elymrepe Empenigr Hyporadi Juncarti Juncbufo 
+       1        2        5        6        1        3        5        4 
+Lolipere Planlanc  Poaprat  Poatriv Ranuflam Rumeacet Sagiproc Salirepe 
+      12        7       14       13        6        5        7        3 
+Scorautu Trifprat Trifrepe Vicilath Bracruta Callcusp 
+      18        3       16        3       15        3 
+> mod <- cca(dune[, freq>1] ~ A1 + Management + Condition(Moisture), dune.env)
+> predict(mod, type="sp", newdata=dune[, freq==1], scaling="species")
+               CCA1       CCA2       CCA3       CCA4
+Chenalbu  1.5737337 -0.7842538  0.5503660 0.35108333
+Cirsarve  0.5945146 -0.3714228 -0.2862647 0.88373727
+Empenigr -1.8771953 -0.9904299 -0.2446222 0.04858656
+> # New sites
+> predict(mod, type="lc", new=data.frame(A1 = 3, Management="NM", Moisture="2"), scal=2)
+      CCA1      CCA2       CCA3       CCA4
+1 -2.38829 -1.230652 -0.2363485 -0.3338258
+> # Calibration and residual plot
+> mod <- cca(dune ~ A1 + Moisture, dune.env)
+> pred <- calibrate(mod)
+> pred
+           A1  Moisture.L  Moisture.Q   Moisture.C
+1   2.2630533 -0.62633470 -0.20456759  0.220761764
+2   4.0510042 -0.47341146 -0.36986691  0.474939409
+3   4.2752294 -0.07214500 -0.60797514  0.303213289
+4   4.5398659  0.03192745 -1.12417368  0.932223234
+5   5.0409406 -0.84235946  0.43000738 -0.291599200
+6   5.1962100 -0.91316862  1.11354235 -0.804453944
+7   4.2452549 -0.76452556  0.60464291 -0.484842066
+8   5.0208369  0.43886340  0.08169514  0.132995916
+9   4.2663219  0.10720486 -0.34067849 -0.675151598
+10  4.0411356 -0.65472729  0.02832164  0.558402684
+11  2.8280051 -0.45762457  0.63079135 -0.089977975
+12  5.1204137  0.36328912 -0.69118581 -0.665622948
+13  4.9034218  0.47069541 -0.54378271 -0.118643453
+14 11.6455841  0.60920550  0.78341426  0.532852308
+15 10.7829689  0.69208513  0.82190786  0.237311062
+16  7.9892176  0.96421599  0.46793089  0.373647014
+17  0.9218684 -0.15822891  0.14593271  1.189161582
+18  3.1680733 -0.41737900  1.03352732 -0.236938282
+19 -1.2003506  0.57033354  0.72777285  0.509955590
+20  4.7876770  1.00324330  1.49898460  0.009202396
+> with(dune.env, plot(A1, pred[,"A1"] - A1, ylab="Prediction Error"))
+> abline(h=0)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("procrustes")
+> ### * procrustes
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: procrustes
+> ### Title: Procrustes Rotation of Two Configurations and PROTEST
+> ### Aliases: procrustes summary.procrustes plot.procrustes
+> ###   points.procrustes text.procrustes lines.procrustes
+> ###   residuals.procrustes fitted.procrustes predict.procrustes protest
+> ### Keywords: multivariate htest
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> vare.dist <- vegdist(wisconsin(varespec))
+> mds.null <- monoMDS(vare.dist, y = cmdscale(vare.dist))
+> mds.alt <- monoMDS(vare.dist)
+> vare.proc <- procrustes(mds.alt, mds.null)
+> vare.proc
+
+Call:
+procrustes(X = mds.alt, Y = mds.null) 
+
+Procrustes sum of squares:
+13.14 
+
+> summary(vare.proc)
+
+Call:
+procrustes(X = mds.alt, Y = mds.null) 
+
+Number of objects: 24    Number of dimensions: 2 
+
+Procrustes sum of squares:  
+  13.1368 
+Procrustes root mean squared error: 
+ 0.7398422 
+Quantiles of Procrustes errors:
+       Min         1Q     Median         3Q        Max 
+0.02033237 0.27686842 0.34124239 0.64358542 2.23460567 
+
+Rotation matrix:
+          [,1]       [,2]
+[1,] 0.9933117 -0.1154641
+[2,] 0.1154641  0.9933117
+
+Translation of averages:
+             [,1]         [,2]
+[1,] 3.038945e-17 1.218602e-17
+
+Scaling of target:
+[1] 0.6727804
+
+> plot(vare.proc)
+> plot(vare.proc, kind=2)
+> residuals(vare.proc)
+        18         15         24         27         23         19         22 
+0.28003467 0.13180094 1.72990690 0.63953155 0.37177564 0.11807007 0.38558576 
+        16         28         13         14         20         25          7 
+0.28008711 1.22839229 0.65574702 0.26736966 0.02033237 0.35725398 0.28654874 
+         5          6          3          4          2          9         12 
+0.69324047 0.20264726 0.29744269 0.50070811 2.23460567 0.31901411 0.21727135 
+        10         11         21 
+0.32523080 0.56506437 0.78179902 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("pyrifos")
+> ### * pyrifos
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: pyrifos
+> ### Title: Response of Aquatic Invertebrates to Insecticide Treatment
+> ### Aliases: pyrifos
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> data(pyrifos)
+> ditch <- gl(12, 1, length=132)
+> week <- gl(11, 12, labels=c(-4, -1, 0.1, 1, 2, 4, 8, 12, 15, 19, 24))
+> dose <- factor(rep(c(0.1, 0, 0, 0.9, 0, 44, 6, 0.1, 44, 0.9, 0, 6), 11))
+> 
+> 
+> 
+> cleanEx()
+> nameEx("radfit")
+> ### * radfit
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: radfit
+> ### Title: Rank - Abundance or Dominance / Diversity Models
+> ### Aliases: radfit radfit.default radfit.data.frame AIC.radfit
+> ###   AIC.radfit.frame as.rad coef.radfit coef.radfit.frame deviance.radfit
+> ###   deviance.radfit.frame 'logLik, radfit' 'logLik, radfit.frame'
+> ###   fitted.radfit fitted.radfit.frame lines.radline lines.radfit
+> ###   plot.radfit.frame plot.radfit plot.radline plot.rad radlattice
+> ###   points.radline points.radfit summary.radfit.frame rad.preempt
+> ###   rad.lognormal rad.zipf rad.zipfbrot rad.null predict.radline
+> ###   predict.radfit predict.radfit.frame
+> ### Keywords: univar distribution
+> 
+> ### ** Examples
+> 
+> data(BCI)
+> mod <- rad.lognormal(BCI[5,])
+> mod
+
+RAD model: Log-Normal 
+Family: poisson 
+No. of species:  101 
+Total abundance: 505 
+
+    log.mu  log.sigma   Deviance        AIC        BIC 
+  0.951926   1.165929  17.077549 317.656487 322.886728 
+> plot(mod)
+> mod <- radfit(BCI[1,])
+> ## Standard plot overlaid for all models
+> ## Pre-emption model is a line
+> plot(mod)
+> ## log for both axes: Zipf model is a line
+> plot(mod, log = "xy")
+> ## Lattice graphics separately for each model
+> radlattice(mod)
+> # Take a subset of BCI to save time and nerves
+> mod <- radfit(BCI[3:5,])
+> mod
+
+Deviance for RAD models:
+
+                 3       4      5
+Null       86.1127 49.8111 80.855
+Preemption 58.9295 39.7817 76.311
+Lognormal  29.2719 16.6588 17.078
+Zipf       50.1262 47.9108 30.936
+Mandelbrot  5.7342  5.5665 10.573
+> plot(mod, pch=".")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("rankindex")
+> ### * rankindex
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: rankindex
+> ### Title: Compares Dissimilarity Indices for Gradient Detection
+> ### Aliases: rankindex
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> data(varechem)
+> ## The variables are automatically scaled
+> rankindex(varechem, varespec)
+      euc       man       gow       bra       kul 
+0.2396330 0.2735087 0.2288358 0.2837910 0.2839834 
+> rankindex(varechem, wisconsin(varespec))
+      euc       man       gow       bra       kul 
+0.4200990 0.4215642 0.3708606 0.4215642 0.4215642 
+> ## Using non vegdist indices as functions
+> funs <- list(Manhattan=function(x) dist(x, "manhattan"),
++     Gower=function(x) cluster:::daisy(x, "gower"),
++     Ochiai=function(x) designdist(x, "1-J/sqrt(A*B)"))
+> rankindex(scale(varechem), varespec, funs)
+Manhattan     Gower    Ochiai 
+0.2735087 0.2288358 0.1696862 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("rarefy")
+> ### * rarefy
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: rarefy
+> ### Title: Rarefaction Species Richness
+> ### Aliases: rarefy rrarefy drarefy rarecurve rareslope
+> ### Keywords: univar
+> 
+> ### ** Examples
+> 
+> data(BCI)
+> S <- specnumber(BCI) # observed number of species
+> (raremax <- min(rowSums(BCI)))
+[1] 340
+> Srare <- rarefy(BCI, raremax)
+> plot(S, Srare, xlab = "Observed No. of Species", ylab = "Rarefied No. of Species")
+> abline(0, 1)
+> rarecurve(BCI, step = 20, sample = raremax, col = "blue", cex = 0.6)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("raupcrick")
+> ### * raupcrick
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: raupcrick
+> ### Title: Raup-Crick Dissimilarity with Unequal Sampling Densities of
+> ###   Species
+> ### Aliases: raupcrick
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> ## data set with variable species richness
+> data(sipoo)
+> ## default raupcrick
+> dr1 <- raupcrick(sipoo)
+> ## use null model "r0" of oecosimu
+> dr0 <- raupcrick(sipoo, null = "r0")
+> ## vegdist(..., method = "raup") corresponds to 'null = "r0"'
+> d <- vegdist(sipoo, "raup")
+> op <- par(mfrow=c(2,1), mar=c(4,4,1,1)+.1)
+> plot(dr1 ~ d, xlab = "Raup-Crick with Null R1", ylab="vegdist")
+> plot(dr0 ~ d, xlab = "Raup-Crick with Null R0", ylab="vegdist")
+> par(op)
+> 
+> ## The calculation is essentially as in the following oecosimu() call,
+> ## except that designdist() is replaced with faster code
+> ## Not run: ##D 
+> ##D oecosimu(sipoo, function(x) designdist(x, "J", "binary"), method = "r1")
+> ## End(Not run)
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+> nameEx("read.cep")
+> ### * read.cep
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: read.cep
+> ### Title: Reads a CEP (Canoco) data file
+> ### Aliases: read.cep
+> ### Keywords: IO file
+> 
+> ### ** Examples
+> 
+> ## Provided that you have the file `dune.spe'
+> ## Not run: 
+> ##D theclassic <- read.cep("dune.spe", force=T)
+> ## End(Not run)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("renyi")
+> ### * renyi
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: renyi
+> ### Title: Renyi and Hill Diversities and Corresponding Accumulation Curves
+> ### Aliases: renyi plot.renyi renyiaccum plot.renyiaccum persp.renyiaccum
+> ### Keywords: univar
+> 
+> ### ** Examples
+> 
+> data(BCI)
+> i <- sample(nrow(BCI), 12)
+> mod <- renyi(BCI[i,])
+> plot(mod)
+> mod <- renyiaccum(BCI[i,])
+> plot(mod, as.table=TRUE, col = c(1, 2, 2))
+> persp(mod)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("reorder.hclust")
+> ### * reorder.hclust
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: reorder.hclust
+> ### Title: Reorder a Hierarchical Clustering Tree
+> ### Aliases: reorder.hclust rev.hclust scores.hclust
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> ## reorder by water content of soil
+> data(mite, mite.env)
+> hc <- hclust(vegdist(wisconsin(sqrt(mite))))
+> ohc <- with(mite.env, reorder(hc, WatrCont))
+> plot(hc)
+> plot(ohc)
+> 
+> ## label leaves by the observed value, and each branching point
+> ## (internal node) by the cluster mean
+> with(mite.env, plot(ohc, labels=round(WatrCont), cex=0.7))
+> ordilabel(scores(ohc), label=round(ohc$value), cex=0.7)
+> 
+> ## Slightly different from reordered 'dendrogram' which ignores group
+> ## sizes in assessing means.
+> den <- as.dendrogram(hc)
+> den <- with(mite.env, reorder(den, WatrCont, agglo.FUN = mean))
+> plot(den)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("scores")
+> ### * scores
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: scores
+> ### Title: Get Species or Site Scores from an Ordination
+> ### Aliases: scores scores.default scores.lda
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> vare.pca <- prcomp(varespec)
+> scores(vare.pca, choices=c(1,2))
+           PC1         PC2
+18 -10.7847878  18.7094315
+15 -27.8036826 -11.7414745
+24 -25.6919559 -14.5399684
+27 -31.7820166 -31.2216800
+23 -19.6315869  -2.5541193
+19  -0.2413294 -11.4974077
+22 -26.6771373 -12.3140897
+16 -21.9230366   0.4449159
+28 -39.6083051 -41.8877392
+13  -4.0664328  20.4191153
+14 -18.4416245   5.4406988
+20 -17.3999191   2.3653380
+25 -25.1673547 -13.2508067
+7  -11.4065430  41.7356300
+5   -8.4243752  45.3805255
+6   -2.0759474  36.9311222
+3   39.8617580   8.0590041
+4   13.1065901  12.8377217
+2   57.6827011  -4.8983565
+9   63.3138332 -22.4481549
+12  44.1073111 -10.1653935
+10  64.9418975 -16.7633564
+11  11.5313633   3.9720890
+21  -3.4194194  -3.0130455
+> 
+> 
+> 
+> cleanEx()
+> nameEx("screeplot.cca")
+> ### * screeplot.cca
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: screeplot.cca
+> ### Title: Screeplots for Ordination Results and Broken Stick Distributions
+> ### Aliases: screeplot.cca screeplot.princomp screeplot.prcomp
+> ###   screeplot.decorana bstick bstick.default bstick.cca bstick.prcomp
+> ###   bstick.princomp bstick.decorana
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> vare.pca <- rda(varespec, scale = TRUE)
+> bstick(vare.pca)
+      PC1       PC2       PC3       PC4       PC5       PC6       PC7       PC8 
+7.1438620 5.2308185 4.2742968 3.6366156 3.1583548 2.7757461 2.4569055 2.1836136 
+      PC9      PC10      PC11      PC12      PC13      PC14      PC15      PC16 
+1.9444831 1.7319228 1.5406184 1.3667054 1.2072851 1.0601279 0.9234819 0.7959457 
+     PC17      PC18      PC19      PC20      PC21      PC22      PC23 
+0.6763805 0.5638485 0.4575683 0.3568818 0.2612296 0.1701323 0.0831758 
+> screeplot(vare.pca, bstick = TRUE, type = "lines")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("simper")
+> ### * simper
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: simper
+> ### Title: Similarity Percentages
+> ### Aliases: simper summary.simper
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> data(dune)
+> data(dune.env)
+> (sim <- with(dune.env, simper(dune, Management)))
+cumulative contributions of most influential species:
+
+$SF_BF
+  Agrostol   Alopgeni   Lolipere   Trifrepe    Poatriv   Scorautu   Bromhord 
+0.09824271 0.18254830 0.25956958 0.33367870 0.40734444 0.47729205 0.53120026 
+  Achimill   Planlanc   Elymrepe   Bracruta 
+0.57946526 0.62522255 0.67016196 0.71098133 
+
+$SF_HF
+  Agrostol   Alopgeni   Lolipere   Planlanc   Rumeacet   Elymrepe    Poatriv 
+0.08350879 0.16534834 0.23934930 0.30843624 0.37716139 0.43334492 0.48351753 
+  Bracruta   Eleopalu    Poaprat   Anthodor   Sagiproc   Trifprat 
+0.52804045 0.57205850 0.61423981 0.65549838 0.69628951 0.73696831 
+
+$SF_NM
+  Poatriv  Alopgeni  Agrostol  Lolipere  Eleopalu   Poaprat  Bracruta  Elymrepe 
+0.1013601 0.1935731 0.2667383 0.3377578 0.3999419 0.4526707 0.5044725 0.5505643 
+ Scorautu  Trifrepe  Sagiproc  Salirepe 
+0.5926117 0.6320111 0.6712478 0.7091528 
+
+$BF_HF
+  Rumeacet    Poatriv   Planlanc   Bromhord   Lolipere   Elymrepe   Trifrepe 
+0.08163219 0.15193797 0.21918333 0.27967181 0.33969561 0.39843338 0.45298204 
+  Anthodor   Achimill   Bracruta   Alopgeni   Trifprat   Juncarti 
+0.50276849 0.55222648 0.60021994 0.64584333 0.69126471 0.73366621 
+
+$BF_NM
+ Lolipere   Poatriv   Poaprat  Trifrepe  Bromhord  Bracruta  Eleopalu  Agrostol 
+0.1242718 0.1992126 0.2711756 0.3414609 0.3958520 0.4448077 0.4910724 0.5369083 
+ Achimill  Scorautu  Anthodor  Planlanc 
+0.5823926 0.6253645 0.6638182 0.7012577 
+
+$HF_NM
+   Poatriv   Lolipere   Rumeacet    Poaprat   Planlanc   Bracruta   Eleopalu 
+0.09913221 0.17468460 0.23917190 0.29701331 0.35469313 0.40365488 0.44804851 
+  Agrostol   Trifrepe   Elymrepe   Anthodor   Juncarti   Trifprat   Salirepe 
+0.49226546 0.53434466 0.57564661 0.61543243 0.65341300 0.68921695 0.72432408 
+
+> summary(sim)
+
+Contrast: SF_BF 
+
+          average       sd  ratio    ava    avb  cumsum
+Agrostol 0.061374 0.034193 1.7949 4.6667 0.0000 0.09824
+Alopgeni 0.052667 0.036476 1.4439 4.3333 0.6667 0.18255
+Lolipere 0.048116 0.039445 1.2198 3.0000 6.0000 0.25957
+Trifrepe 0.046297 0.025525 1.8138 1.3333 4.6667 0.33368
+Poatriv  0.046020 0.033801 1.3615 4.6667 3.6667 0.40734
+Scorautu 0.043697 0.024922 1.7534 1.3333 4.3333 0.47729
+Bromhord 0.033677 0.025860 1.3023 0.5000 2.6667 0.53120
+Achimill 0.030152 0.020821 1.4482 0.1667 2.3333 0.57947
+Planlanc 0.028585 0.021549 1.3265 0.0000 2.0000 0.62522
+Elymrepe 0.028074 0.029778 0.9428 2.0000 1.3333 0.67016
+Bracruta 0.025501 0.023902 1.0669 2.0000 2.0000 0.71098
+Poaprat  0.025129 0.023967 1.0485 2.5000 4.0000 0.75121
+Sagiproc 0.024326 0.022149 1.0983 1.8333 0.6667 0.79014
+Bellpere 0.019859 0.017088 1.1622 0.6667 1.6667 0.82193
+Eleopalu 0.018611 0.042958 0.4333 1.3333 0.0000 0.85172
+Anthodor 0.017543 0.025804 0.6798 0.0000 1.3333 0.87981
+Juncbufo 0.016031 0.023708 0.6762 1.1667 0.0000 0.90547
+Vicilath 0.014671 0.013306 1.1026 0.0000 1.0000 0.92895
+Hyporadi 0.010286 0.015198 0.6768 0.0000 0.6667 0.94542
+Ranuflam 0.009306 0.013595 0.6845 0.6667 0.0000 0.96031
+Juncarti 0.006979 0.016109 0.4333 0.5000 0.0000 0.97148
+Callcusp 0.006979 0.016109 0.4333 0.5000 0.0000 0.98266
+Rumeacet 0.004526 0.010444 0.4333 0.3333 0.0000 0.98990
+Cirsarve 0.003983 0.009185 0.4336 0.3333 0.0000 0.99628
+Chenalbu 0.002326 0.005370 0.4333 0.1667 0.0000 1.00000
+Airaprae 0.000000 0.000000    NaN 0.0000 0.0000 1.00000
+Comapalu 0.000000 0.000000    NaN 0.0000 0.0000 1.00000
+Empenigr 0.000000 0.000000    NaN 0.0000 0.0000 1.00000
+Salirepe 0.000000 0.000000    NaN 0.0000 0.0000 1.00000
+Trifprat 0.000000 0.000000    NaN 0.0000 0.0000 1.00000
+
+Contrast: SF_HF 
+
+          average       sd  ratio    ava avb  cumsum
+Agrostol 0.047380 0.031273 1.5151 4.6667 1.4 0.08351
+Alopgeni 0.046433 0.032897 1.4115 4.3333 1.6 0.16535
+Lolipere 0.041986 0.027007 1.5546 3.0000 4.0 0.23935
+Planlanc 0.039198 0.033208 1.1804 0.0000 3.0 0.30844
+Rumeacet 0.038992 0.027369 1.4247 0.3333 3.2 0.37716
+Elymrepe 0.031877 0.029550 1.0787 2.0000 2.0 0.43334
+Poatriv  0.028466 0.021522 1.3227 4.6667 4.8 0.48352
+Bracruta 0.025261 0.021044 1.2004 2.0000 2.8 0.52804
+Eleopalu 0.024974 0.038877 0.6424 1.3333 0.8 0.57206
+Poaprat  0.023932 0.019180 1.2478 2.5000 3.4 0.61424
+Anthodor 0.023409 0.021430 1.0923 0.0000 1.8 0.65550
+Sagiproc 0.023144 0.020479 1.1301 1.8333 0.8 0.69629
+Trifprat 0.023080 0.023432 0.9850 0.0000 1.8 0.73697
+Juncarti 0.022850 0.025677 0.8899 0.5000 1.6 0.77724
+Trifrepe 0.022383 0.019487 1.1486 1.3333 2.8 0.81669
+Juncbufo 0.021643 0.022237 0.9733 1.1667 1.2 0.85484
+Scorautu 0.020509 0.016422 1.2489 1.3333 2.8 0.89099
+Achimill 0.015183 0.011393 1.3326 0.1667 1.2 0.91775
+Bromhord 0.013375 0.014504 0.9222 0.5000 0.8 0.94132
+Ranuflam 0.010661 0.013387 0.7964 0.6667 0.4 0.96011
+Bellpere 0.009991 0.012571 0.7948 0.6667 0.4 0.97772
+Callcusp 0.006623 0.015076 0.4393 0.5000 0.0 0.98939
+Cirsarve 0.003809 0.008669 0.4394 0.3333 0.0 0.99611
+Chenalbu 0.002208 0.005025 0.4393 0.1667 0.0 1.00000
+Airaprae 0.000000 0.000000    NaN 0.0000 0.0 1.00000
+Comapalu 0.000000 0.000000    NaN 0.0000 0.0 1.00000
+Empenigr 0.000000 0.000000    NaN 0.0000 0.0 1.00000
+Hyporadi 0.000000 0.000000    NaN 0.0000 0.0 1.00000
+Salirepe 0.000000 0.000000    NaN 0.0000 0.0 1.00000
+Vicilath 0.000000 0.000000    NaN 0.0000 0.0 1.00000
+
+Contrast: SF_NM 
+
+          average       sd  ratio    ava    avb cumsum
+Poatriv  0.078284 0.040947 1.9118 4.6667 0.0000 0.1014
+Alopgeni 0.071219 0.046958 1.5167 4.3333 0.0000 0.1936
+Agrostol 0.056508 0.044176 1.2792 4.6667 2.1667 0.2667
+Lolipere 0.054851 0.059914 0.9155 3.0000 0.3333 0.3378
+Eleopalu 0.048027 0.047168 1.0182 1.3333 2.1667 0.3999
+Poaprat  0.040724 0.031790 1.2810 2.5000 0.6667 0.4527
+Bracruta 0.040008 0.034398 1.1631 2.0000 2.8333 0.5045
+Elymrepe 0.035598 0.038515 0.9243 2.0000 0.0000 0.5506
+Scorautu 0.032475 0.034813 0.9328 1.3333 3.1667 0.5926
+Trifrepe 0.030430 0.031634 0.9619 1.3333 1.8333 0.6320
+Sagiproc 0.030304 0.030477 0.9943 1.8333 0.5000 0.6712
+Salirepe 0.029275 0.032014 0.9144 0.0000 1.8333 0.7092
+Anthodor 0.024541 0.036694 0.6688 0.0000 1.3333 0.7409
+Callcusp 0.022763 0.029443 0.7731 0.5000 1.1667 0.7704
+Ranuflam 0.022566 0.022819 0.9889 0.6667 1.3333 0.7996
+Juncarti 0.022543 0.028598 0.7883 0.5000 1.1667 0.8288
+Hyporadi 0.020108 0.031291 0.6426 0.0000 1.1667 0.8548
+Juncbufo 0.019860 0.029034 0.6840 1.1667 0.0000 0.8806
+Planlanc 0.015420 0.022769 0.6772 0.0000 0.8333 0.9005
+Airaprae 0.014883 0.021881 0.6802 0.0000 0.8333 0.9198
+Bellpere 0.012317 0.015921 0.7737 0.6667 0.3333 0.9357
+Comapalu 0.011883 0.017407 0.6826 0.0000 0.6667 0.9511
+Achimill 0.009294 0.014931 0.6224 0.1667 0.3333 0.9632
+Bromhord 0.007172 0.016333 0.4391 0.5000 0.0000 0.9724
+Rumeacet 0.005590 0.012751 0.4384 0.3333 0.0000 0.9797
+Empenigr 0.005225 0.012001 0.4354 0.0000 0.3333 0.9864
+Cirsarve 0.004782 0.010889 0.4391 0.3333 0.0000 0.9926
+Chenalbu 0.002893 0.006602 0.4382 0.1667 0.0000 0.9964
+Vicilath 0.002792 0.006425 0.4345 0.0000 0.1667 1.0000
+Trifprat 0.000000 0.000000    NaN 0.0000 0.0000 1.0000
+
+Contrast: BF_HF 
+
+          average      sd  ratio    ava avb  cumsum
+Rumeacet 0.038666 0.02606 1.4838 0.0000 3.2 0.08163
+Poatriv  0.033301 0.02579 1.2911 3.6667 4.8 0.15194
+Planlanc 0.031852 0.01830 1.7401 2.0000 3.0 0.21918
+Bromhord 0.028651 0.01799 1.5926 2.6667 0.8 0.27967
+Lolipere 0.028431 0.02215 1.2834 6.0000 4.0 0.33970
+Elymrepe 0.027822 0.02959 0.9404 1.3333 2.0 0.39843
+Trifrepe 0.025838 0.01656 1.5603 4.6667 2.8 0.45298
+Anthodor 0.023582 0.02042 1.1547 1.3333 1.8 0.50277
+Achimill 0.023426 0.01474 1.5893 2.3333 1.2 0.55223
+Bracruta 0.022733 0.01802 1.2617 2.0000 2.8 0.60022
+Alopgeni 0.021610 0.02308 0.9363 0.6667 1.6 0.64584
+Trifprat 0.021514 0.02207 0.9747 0.0000 1.8 0.69126
+Juncarti 0.020084 0.02555 0.7860 0.0000 1.6 0.73367
+Scorautu 0.019318 0.01356 1.4241 4.3333 2.8 0.77445
+Bellpere 0.018290 0.01486 1.2305 1.6667 0.4 0.81306
+Agrostol 0.017605 0.02284 0.7708 0.0000 1.4 0.85023
+Juncbufo 0.015000 0.02066 0.7260 0.0000 1.2 0.88190
+Vicilath 0.012848 0.01140 1.1274 1.0000 0.0 0.90903
+Sagiproc 0.011685 0.01297 0.9008 0.6667 0.8 0.93369
+Eleopalu 0.010169 0.02111 0.4817 0.0000 0.8 0.95516
+Hyporadi 0.008950 0.01312 0.6824 0.6667 0.0 0.97406
+Poaprat  0.007203 0.01010 0.7133 4.0000 3.4 0.98927
+Ranuflam 0.005084 0.01055 0.4817 0.0000 0.4 1.00000
+Airaprae 0.000000 0.00000    NaN 0.0000 0.0 1.00000
+Chenalbu 0.000000 0.00000    NaN 0.0000 0.0 1.00000
+Cirsarve 0.000000 0.00000    NaN 0.0000 0.0 1.00000
+Comapalu 0.000000 0.00000    NaN 0.0000 0.0 1.00000
+Empenigr 0.000000 0.00000    NaN 0.0000 0.0 1.00000
+Salirepe 0.000000 0.00000    NaN 0.0000 0.0 1.00000
+Callcusp 0.000000 0.00000    NaN 0.0000 0.0 1.00000
+
+Contrast: BF_NM 
+
+          average      sd  ratio    ava    avb cumsum
+Lolipere 0.090681 0.02644 3.4292 6.0000 0.3333 0.1243
+Poatriv  0.054684 0.04465 1.2248 3.6667 0.0000 0.1992
+Poaprat  0.052511 0.01813 2.8966 4.0000 0.6667 0.2712
+Trifrepe 0.051287 0.02756 1.8611 4.6667 1.8333 0.3415
+Bromhord 0.039689 0.02920 1.3590 2.6667 0.0000 0.3959
+Bracruta 0.035723 0.02869 1.2452 2.0000 2.8333 0.4448
+Eleopalu 0.033759 0.03573 0.9449 0.0000 2.1667 0.4911
+Agrostol 0.033446 0.03473 0.9630 0.0000 2.1667 0.5369
+Achimill 0.033190 0.02338 1.4198 2.3333 0.3333 0.5824
+Scorautu 0.031356 0.02026 1.5480 4.3333 3.1667 0.6254
+Anthodor 0.028060 0.03295 0.8517 1.3333 1.3333 0.6638
+Planlanc 0.027319 0.02193 1.2458 2.0000 0.8333 0.7013
+Salirepe 0.026770 0.02927 0.9145 0.0000 1.8333 0.7379
+Bellpere 0.023529 0.01909 1.2322 1.6667 0.3333 0.7702
+Hyporadi 0.021721 0.02450 0.8864 0.6667 1.1667 0.8000
+Ranuflam 0.020314 0.02275 0.8928 0.0000 1.3333 0.8278
+Elymrepe 0.019993 0.02926 0.6833 1.3333 0.0000 0.8552
+Callcusp 0.017833 0.02681 0.6653 0.0000 1.1667 0.8796
+Juncarti 0.017694 0.02600 0.6806 0.0000 1.1667 0.9039
+Vicilath 0.015773 0.01447 1.0902 1.0000 0.1667 0.9255
+Sagiproc 0.015432 0.01857 0.8310 0.6667 0.5000 0.9466
+Airaprae 0.013410 0.01969 0.6809 0.0000 0.8333 0.9650
+Comapalu 0.010739 0.01571 0.6835 0.0000 0.6667 0.9797
+Alopgeni 0.009997 0.01463 0.6833 0.6667 0.0000 0.9934
+Empenigr 0.004787 0.01105 0.4332 0.0000 0.3333 1.0000
+Chenalbu 0.000000 0.00000    NaN 0.0000 0.0000 1.0000
+Cirsarve 0.000000 0.00000    NaN 0.0000 0.0000 1.0000
+Juncbufo 0.000000 0.00000    NaN 0.0000 0.0000 1.0000
+Rumeacet 0.000000 0.00000    NaN 0.0000 0.0000 1.0000
+Trifprat 0.000000 0.00000    NaN 0.0000 0.0000 1.0000
+
+Contrast: HF_NM 
+
+          average       sd  ratio ava    avb  cumsum
+Poatriv  0.071553 0.013681 5.2302 4.8 0.0000 0.09913
+Lolipere 0.054533 0.029625 1.8408 4.0 0.3333 0.17468
+Rumeacet 0.046546 0.030806 1.5109 3.2 0.0000 0.23917
+Poaprat  0.041750 0.018852 2.2146 3.4 0.6667 0.29701
+Planlanc 0.041633 0.029560 1.4084 3.0 0.8333 0.35469
+Bracruta 0.035340 0.020104 1.7579 2.8 2.8333 0.40365
+Eleopalu 0.032043 0.032315 0.9916 0.8 2.1667 0.44805
+Agrostol 0.031915 0.028887 1.1048 1.4 2.1667 0.49227
+Trifrepe 0.030372 0.022871 1.3280 2.8 1.8333 0.53434
+Elymrepe 0.029811 0.038676 0.7708 2.0 0.0000 0.57565
+Anthodor 0.028717 0.024799 1.1580 1.8 1.3333 0.61543
+Juncarti 0.027414 0.028537 0.9607 1.6 1.1667 0.65341
+Trifprat 0.025843 0.025972 0.9951 1.8 0.0000 0.68922
+Salirepe 0.025340 0.027291 0.9285 0.0 1.8333 0.72432
+Alopgeni 0.024459 0.032399 0.7549 1.6 0.0000 0.75821
+Scorautu 0.020703 0.014125 1.4658 2.8 3.1667 0.78689
+Ranuflam 0.019285 0.019939 0.9672 0.4 1.3333 0.81361
+Juncbufo 0.018181 0.024648 0.7376 1.2 0.0000 0.83880
+Hyporadi 0.017141 0.026548 0.6457 0.0 1.1667 0.86255
+Callcusp 0.016833 0.024901 0.6760 0.0 1.1667 0.88587
+Achimill 0.016555 0.014900 1.1111 1.2 0.3333 0.90881
+Sagiproc 0.015282 0.016535 0.9243 0.8 0.5000 0.92998
+Airaprae 0.012605 0.018243 0.6910 0.0 0.8333 0.94744
+Bromhord 0.012094 0.015169 0.7973 0.8 0.0000 0.96420
+Comapalu 0.010105 0.014556 0.6942 0.0 0.6667 0.97820
+Bellpere 0.008801 0.013732 0.6409 0.4 0.3333 0.99039
+Empenigr 0.004536 0.010325 0.4393 0.0 0.3333 0.99668
+Vicilath 0.002399 0.005461 0.4393 0.0 0.1667 1.00000
+Chenalbu 0.000000 0.000000    NaN 0.0 0.0000 1.00000
+Cirsarve 0.000000 0.000000    NaN 0.0 0.0000 1.00000
+Permutation: free
+Number of permutations: 0
+> 
+> 
+> 
+> cleanEx()
+> nameEx("simulate.rda")
+> ### * simulate.rda
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: simulate.rda
+> ### Title: Simulate Responses with Gaussian Error or Permuted Residuals for
+> ###   Constrained Ordination
+> ### Aliases: simulate.rda simulate.cca simulate.capscale
+> ### Keywords: models datagen multivariate
+> 
+> ### ** Examples
+> 
+> data(dune)
+> data(dune.env)
+> mod <- rda(dune ~  Moisture + Management, dune.env)
+> ## One simulation
+> update(mod, simulate(mod) ~  .)
+Call: rda(formula = simulate(mod) ~ Moisture + Management, data =
+dune.env)
+
+              Inertia Proportion Rank
+Total         82.8232     1.0000     
+Constrained   52.6966     0.6363    6
+Unconstrained 30.1266     0.3637   13
+Inertia is variance 
+
+Eigenvalues for constrained axes:
+  RDA1   RDA2   RDA3   RDA4   RDA5   RDA6 
+22.011 15.693  6.034  4.165  3.265  1.529 
+
+Eigenvalues for unconstrained axes:
+  PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8   PC9  PC10  PC11  PC12  PC13 
+6.524 4.747 3.703 3.119 2.963 2.279 1.782 1.440 1.251 0.858 0.613 0.477 0.369 
+
+> ## An impression of confidence regions of site scores
+> plot(mod, display="sites")
+> for (i in 1:5) lines(procrustes(mod, update(mod, simulate(mod) ~ .)), col="blue")
+> ## Simulate a set of null communities with permutation of residuals
+> simulate(mod, indx = shuffleSet(nrow(dune), 99))
+An object of class “simulate.rda” 
+‘simulate index’ method (abundance, non-sequential)
+20 x 30 matrix
+Number of permuted matrices = 99 
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("sipoo")
+> ### * sipoo
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: sipoo
+> ### Title: Birds in the Archipelago of Sipoo (Sibbo)
+> ### Aliases: sipoo
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> data(sipoo)
+> ## Areas of the islands in hectares
+> sipoo.area <-  c(1.1, 2.1, 2.2, 3.1, 3.5, 5.8, 6, 6.1, 6.5, 11.4, 13,
++ 14.5, 16.1 ,17.5, 28.7, 40.5, 104.5, 233) 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("spantree")
+> ### * spantree
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: spantree
+> ### Title: Minimum Spanning Tree
+> ### Aliases: spantree cophenetic.spantree as.hclust.spantree plot.spantree
+> ###   lines.spantree spandepth
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> data(dune)
+> dis <- vegdist(dune)
+> tr <- spantree(dis)
+> ## Add tree to a metric scaling 
+> plot(tr, cmdscale(dis), type = "t")
+> ## Find a configuration to display the tree neatly
+> plot(tr, type = "t")
+Initial stress        : 0.03111
+stress after  10 iters: 0.01302, magic = 0.500
+stress after  20 iters: 0.01139, magic = 0.500
+stress after  30 iters: 0.01118, magic = 0.500
+stress after  40 iters: 0.01114, magic = 0.500
+> ## Depths of nodes
+> depths <- spandepth(tr)
+> plot(tr, type = "t", label = depths)
+Initial stress        : 0.03111
+stress after  10 iters: 0.01302, magic = 0.500
+stress after  20 iters: 0.01139, magic = 0.500
+stress after  30 iters: 0.01118, magic = 0.500
+stress after  40 iters: 0.01114, magic = 0.500
+> ## Plot as a dendrogram
+> cl <- as.hclust(tr)
+> plot(cl)
+> ## cut hclust tree to classes and show in colours in spantree
+> plot(tr, col = cutree(cl, 5), pch=16)
+Initial stress        : 0.03111
+stress after  10 iters: 0.01302, magic = 0.500
+stress after  20 iters: 0.01139, magic = 0.500
+stress after  30 iters: 0.01118, magic = 0.500
+stress after  40 iters: 0.01114, magic = 0.500
+> 
+> 
+> 
+> cleanEx()
+> nameEx("specaccum")
+> ### * specaccum
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: specaccum
+> ### Title: Species Accumulation Curves
+> ### Aliases: specaccum print.specaccum summary.specaccum plot.specaccum
+> ###   lines.specaccum boxplot.specaccum fitspecaccum plot.fitspecaccum
+> ###   lines.fitspecaccum predict.specaccum predict.fitspecaccum
+> ###   AIC.fitspecaccum deviance.fitspecaccum specslope
+> ### Keywords: univar models
+> 
+> ### ** Examples
+> 
+> data(BCI)
+> sp1 <- specaccum(BCI)
+Warning in cor(x > 0) : the standard deviation is zero
+> sp2 <- specaccum(BCI, "random")
+> sp2
+Species Accumulation Curve
+Accumulation method: random, with 100 permutations
+Call: specaccum(comm = BCI, method = "random") 
+
+                                                                             
+Sites     1.00000   2.00000   3.00000   4.00000   5.00000   6.00000   7.00000
+Richness 91.34000 121.01000 138.72000 150.54000 159.54000 166.50000 171.82000
+sd        7.21001   6.92892   6.74811   6.50939   6.12565   5.93483   5.60371
+                                                                              
+Sites      8.00000   9.00000  10.00000  11.00000  12.00000  13.00000  14.00000
+Richness 176.18000 179.79000 182.73000 185.95000 188.59000 191.08000 193.10000
+sd         5.18229   5.12923   5.17542   4.71913   4.52177   4.42144   4.37278
+                                                                             
+Sites     15.00000  16.00000  17.0000  18.00000  19.00000  20.00000  21.00000
+Richness 194.92000 196.87000 198.2700 199.67000 201.00000 202.47000 203.95000
+sd         4.52754   4.42138   4.2873   4.03283   4.00505   3.96819   3.95269
+                                                                            
+Sites     22.00000  23.0000  24.00000  25.00000  26.00000  27.00000  28.0000
+Richness 205.18000 206.2100 207.23000 208.38000 209.39000 210.54000 211.4300
+sd         3.77493   3.6826   3.70055   3.32356   3.32391   3.31638   3.1567
+                                                                             
+Sites     29.0000  30.00000  31.00000  32.00000  33.00000  34.00000  35.00000
+Richness 212.2900 213.23000 214.10000 214.88000 215.62000 216.37000 217.00000
+sd         3.0987   2.95712   2.76157   2.57525   2.52974   2.58846   2.48633
+                                                                              
+Sites     36.00000  37.00000  38.00000  39.00000  40.00000  41.00000  42.00000
+Richness 217.55000 218.16000 218.77000 219.34000 219.97000 220.60000 221.21000
+sd         2.37144   2.36438   2.21042   2.04109   2.07172   1.96433   1.94518
+                                                                               
+Sites     43.00000  44.00000  45.00  46.00000  47.00000  48.00000  49.00000  50
+Richness 221.85000 222.36000 222.89 223.32000 223.71000 224.17000 224.65000 225
+sd         1.77169   1.58605   1.49   1.47628   1.20851   0.97499   0.60927   0
+> summary(sp2)
+ 1 sites          2 sites         3 sites         4 sites        
+ Min.   : 77.00   Min.   :105.0   Min.   :123.0   Min.   :135.0  
+ 1st Qu.: 86.00   1st Qu.:116.0   1st Qu.:133.8   1st Qu.:145.8  
+ Median : 91.00   Median :120.5   Median :140.0   Median :150.5  
+ Mean   : 91.34   Mean   :121.0   Mean   :138.7   Mean   :150.5  
+ 3rd Qu.: 97.00   3rd Qu.:127.0   3rd Qu.:144.0   3rd Qu.:155.0  
+ Max.   :109.00   Max.   :136.0   Max.   :158.0   Max.   :162.0  
+ 5 sites         6 sites         7 sites         8 sites        
+ Min.   :144.0   Min.   :152.0   Min.   :156.0   Min.   :160.0  
+ 1st Qu.:155.0   1st Qu.:162.0   1st Qu.:168.0   1st Qu.:173.0  
+ Median :159.5   Median :167.0   Median :173.0   Median :177.0  
+ Mean   :159.5   Mean   :166.5   Mean   :171.8   Mean   :176.2  
+ 3rd Qu.:164.0   3rd Qu.:171.0   3rd Qu.:175.2   3rd Qu.:179.0  
+ Max.   :174.0   Max.   :180.0   Max.   :183.0   Max.   :187.0  
+ 9 sites         10 sites        11 sites        12 sites       
+ Min.   :161.0   Min.   :164.0   Min.   :174.0   Min.   :178.0  
+ 1st Qu.:177.0   1st Qu.:179.0   1st Qu.:182.8   1st Qu.:186.0  
+ Median :180.0   Median :184.0   Median :187.0   Median :189.0  
+ Mean   :179.8   Mean   :182.7   Mean   :185.9   Mean   :188.6  
+ 3rd Qu.:183.0   3rd Qu.:186.0   3rd Qu.:188.0   3rd Qu.:191.0  
+ Max.   :194.0   Max.   :196.0   Max.   :198.0   Max.   :199.0  
+ 13 sites        14 sites        15 sites        16 sites       
+ Min.   :179.0   Min.   :181.0   Min.   :185.0   Min.   :186.0  
+ 1st Qu.:188.0   1st Qu.:191.0   1st Qu.:192.0   1st Qu.:194.0  
+ Median :191.0   Median :193.0   Median :195.0   Median :197.0  
+ Mean   :191.1   Mean   :193.1   Mean   :194.9   Mean   :196.9  
+ 3rd Qu.:194.0   3rd Qu.:196.0   3rd Qu.:198.0   3rd Qu.:200.0  
+ Max.   :201.0   Max.   :203.0   Max.   :205.0   Max.   :207.0  
+ 17 sites        18 sites        19 sites      20 sites        21 sites       
+ Min.   :187.0   Min.   :189.0   Min.   :189   Min.   :189.0   Min.   :189.0  
+ 1st Qu.:195.8   1st Qu.:197.0   1st Qu.:199   1st Qu.:200.0   1st Qu.:202.0  
+ Median :198.0   Median :200.0   Median :201   Median :202.5   Median :204.0  
+ Mean   :198.3   Mean   :199.7   Mean   :201   Mean   :202.5   Mean   :203.9  
+ 3rd Qu.:201.0   3rd Qu.:202.2   3rd Qu.:204   3rd Qu.:205.0   3rd Qu.:207.0  
+ Max.   :208.0   Max.   :209.0   Max.   :211   Max.   :212.0   Max.   :213.0  
+ 22 sites        23 sites        24 sites        25 sites       
+ Min.   :194.0   Min.   :195.0   Min.   :197.0   Min.   :198.0  
+ 1st Qu.:203.0   1st Qu.:204.0   1st Qu.:205.0   1st Qu.:206.0  
+ Median :205.0   Median :206.5   Median :207.0   Median :209.0  
+ Mean   :205.2   Mean   :206.2   Mean   :207.2   Mean   :208.4  
+ 3rd Qu.:207.2   3rd Qu.:209.0   3rd Qu.:210.0   3rd Qu.:211.0  
+ Max.   :213.0   Max.   :215.0   Max.   :216.0   Max.   :216.0  
+ 26 sites        27 sites        28 sites        29 sites       
+ Min.   :199.0   Min.   :201.0   Min.   :202.0   Min.   :203.0  
+ 1st Qu.:207.0   1st Qu.:208.8   1st Qu.:210.0   1st Qu.:211.0  
+ Median :209.0   Median :211.0   Median :211.0   Median :212.0  
+ Mean   :209.4   Mean   :210.5   Mean   :211.4   Mean   :212.3  
+ 3rd Qu.:212.0   3rd Qu.:213.0   3rd Qu.:214.0   3rd Qu.:214.0  
+ Max.   :218.0   Max.   :218.0   Max.   :218.0   Max.   :219.0  
+ 30 sites        31 sites        32 sites        33 sites       
+ Min.   :203.0   Min.   :204.0   Min.   :206.0   Min.   :206.0  
+ 1st Qu.:211.0   1st Qu.:212.0   1st Qu.:213.0   1st Qu.:214.0  
+ Median :213.0   Median :214.0   Median :215.0   Median :216.0  
+ Mean   :213.2   Mean   :214.1   Mean   :214.9   Mean   :215.6  
+ 3rd Qu.:215.0   3rd Qu.:216.0   3rd Qu.:217.0   3rd Qu.:218.0  
+ Max.   :220.0   Max.   :220.0   Max.   :220.0   Max.   :220.0  
+ 34 sites        35 sites      36 sites        37 sites        38 sites       
+ Min.   :208.0   Min.   :209   Min.   :209.0   Min.   :212.0   Min.   :214.0  
+ 1st Qu.:214.8   1st Qu.:216   1st Qu.:216.0   1st Qu.:217.0   1st Qu.:217.0  
+ Median :216.0   Median :217   Median :218.0   Median :218.0   Median :219.0  
+ Mean   :216.4   Mean   :217   Mean   :217.6   Mean   :218.2   Mean   :218.8  
+ 3rd Qu.:218.0   3rd Qu.:219   3rd Qu.:219.0   3rd Qu.:220.0   3rd Qu.:220.0  
+ Max.   :222.0   Max.   :222   Max.   :223.0   Max.   :223.0   Max.   :224.0  
+ 39 sites        40 sites      41 sites        42 sites        43 sites       
+ Min.   :214.0   Min.   :214   Min.   :216.0   Min.   :216.0   Min.   :217.0  
+ 1st Qu.:218.0   1st Qu.:219   1st Qu.:219.0   1st Qu.:220.0   1st Qu.:221.0  
+ Median :220.0   Median :220   Median :221.0   Median :221.0   Median :222.0  
+ Mean   :219.3   Mean   :220   Mean   :220.6   Mean   :221.2   Mean   :221.8  
+ 3rd Qu.:221.0   3rd Qu.:222   3rd Qu.:222.0   3rd Qu.:223.0   3rd Qu.:223.0  
+ Max.   :224.0   Max.   :224   Max.   :224.0   Max.   :225.0   Max.   :225.0  
+ 44 sites        45 sites        46 sites        47 sites       
+ Min.   :217.0   Min.   :219.0   Min.   :219.0   Min.   :220.0  
+ 1st Qu.:221.8   1st Qu.:222.0   1st Qu.:223.0   1st Qu.:223.0  
+ Median :223.0   Median :223.0   Median :224.0   Median :224.0  
+ Mean   :222.4   Mean   :222.9   Mean   :223.3   Mean   :223.7  
+ 3rd Qu.:223.0   3rd Qu.:224.0   3rd Qu.:224.0   3rd Qu.:225.0  
+ Max.   :225.0   Max.   :225.0   Max.   :225.0   Max.   :225.0  
+ 48 sites        49 sites        50 sites     
+ Min.   :221.0   Min.   :222.0   Min.   :225  
+ 1st Qu.:224.0   1st Qu.:224.0   1st Qu.:225  
+ Median :224.0   Median :225.0   Median :225  
+ Mean   :224.2   Mean   :224.7   Mean   :225  
+ 3rd Qu.:225.0   3rd Qu.:225.0   3rd Qu.:225  
+ Max.   :225.0   Max.   :225.0   Max.   :225  
+> plot(sp1, ci.type="poly", col="blue", lwd=2, ci.lty=0, ci.col="lightblue")
+> boxplot(sp2, col="yellow", add=TRUE, pch="+")
+> ## Fit Lomolino model to the exact accumulation
+> mod1 <- fitspecaccum(sp1, "lomolino")
+> coef(mod1)
+      Asym       xmid      slope 
+258.440682   2.442061   1.858694 
+> fitted(mod1)
+ [1]  94.34749 121.23271 137.45031 148.83053 157.45735 164.31866 169.95946
+ [8] 174.71115 178.78954 182.34254 185.47566 188.26658 190.77402 193.04337
+[15] 195.11033 197.00350 198.74606 200.35705 201.85227 203.24499 204.54643
+[22] 205.76612 206.91229 207.99203 209.01150 209.97609 210.89054 211.75903
+[29] 212.58527 213.37256 214.12386 214.84180 215.52877 216.18692 216.81820
+[36] 217.42437 218.00703 218.56767 219.10762 219.62811 220.13027 220.61514
+[43] 221.08369 221.53679 221.97528 222.39991 222.81138 223.21037 223.59747
+[50] 223.97327
+> plot(sp1)
+> ## Add Lomolino model using argument 'add'
+> plot(mod1, add = TRUE, col=2, lwd=2)
+> ## Fit Arrhenius models to all random accumulations
+> mods <- fitspecaccum(sp2, "arrh")
+> plot(mods, col="hotpink")
+> boxplot(sp2, col = "yellow", border = "blue", lty=1, cex=0.3, add= TRUE)
+> ## Use nls() methods to the list of models
+> sapply(mods$models, AIC)
+  [1] 324.2489 358.8631 357.1474 348.5675 320.8596 362.4988 339.6392 302.6209
+  [9] 325.8906 335.5387 358.2781 347.9665 305.9077 338.6679 331.4992 319.3814
+ [17] 342.8604 308.0547 303.6049 307.0464 324.5011 335.4867 362.7110 342.5750
+ [25] 278.4388 346.3987 314.5455 305.6342 358.2744 307.9340 342.8888 301.1880
+ [33] 341.8359 348.4535 328.1716 341.5565 291.4052 336.6322 349.8087 350.1049
+ [41] 349.5025 352.0225 308.1040 322.4882 322.5936 361.7398 353.0302 350.8482
+ [49] 325.5460 360.2195 345.9105 342.7948 351.8214 267.6483 332.0333 320.1204
+ [57] 313.6519 344.1718 346.6968 311.0463 334.1548 368.1168 299.7756 322.6268
+ [65] 364.3129 353.3865 327.4970 343.1699 350.5206 316.0220 302.6937 286.5891
+ [73] 329.5312 323.6312 355.3245 322.2671 339.8070 367.4518 336.2615 323.6332
+ [81] 330.1162 309.3435 352.7868 321.6770 310.2606 326.1316 342.7621 333.2059
+ [89] 321.3756 368.4900 363.6466 326.1864 292.2932 296.4067 361.3046 356.2217
+ [97] 350.8804 359.9127 344.3568 332.4569
+> 
+> 
+> 
+> cleanEx()
+> nameEx("specpool")
+> ### * specpool
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: specpool
+> ### Title: Extrapolated Species Richness in a Species Pool
+> ### Aliases: specpool specpool2vect poolaccum summary.poolaccum
+> ###   plot.poolaccum estimateR estimateR.default estimateR.matrix
+> ###   estimateR.data.frame estaccumR
+> ### Keywords: univar
+> 
+> ### ** Examples
+> 
+> data(dune)
+> data(dune.env)
+> attach(dune.env)
+> pool <- specpool(dune, Management)
+> pool
+   Species     chao   chao.se    jack1 jack1.se    jack2     boot  boot.se n
+BF      16 17.19048 1.5895675 19.33333 2.211083 19.83333 17.74074 1.646379 3
+HF      21 21.51429 0.9511693 23.40000 1.876166 22.05000 22.56864 1.821518 5
+NM      21 22.87500 2.1582871 26.00000 3.291403 25.73333 23.77696 2.300982 6
+SF      21 29.88889 8.6447967 27.66667 3.496029 31.40000 23.99496 1.850288 6
+> op <- par(mfrow=c(1,2))
+> boxplot(specnumber(dune) ~ Management, col="hotpink", border="cyan3",
++  notch=TRUE)
+Warning in bxp(list(stats = c(9, 9.5, 10, 11, 12, 11, 12, 13, 13, 14, 7,  :
+  some notches went outside hinges ('box'): maybe set notch=FALSE
+> boxplot(specnumber(dune)/specpool2vect(pool) ~ Management, col="hotpink",
++  border="cyan3", notch=TRUE)
+Warning in bxp(list(stats = c(0.46551724137931, 0.491379310344828, 0.517241379310345,  :
+  some notches went outside hinges ('box'): maybe set notch=FALSE
+> par(op)
+> data(BCI)
+> ## Accumulation model
+> pool <- poolaccum(BCI)
+> summary(pool, display = "chao")
+$chao
+       N     Chao     2.5%    97.5%   Std.Dev
+ [1,]  3 161.4109 144.6126 178.9871  9.801654
+ [2,]  4 175.3013 156.0120 200.3193 11.771507
+ [3,]  5 184.5183 163.6632 208.8254 11.966732
+ [4,]  6 191.5108 172.6320 217.6871 11.433620
+ [5,]  7 196.1425 177.1485 216.1394 10.300755
+ [6,]  8 199.7655 180.8137 221.8030 11.050654
+ [7,]  9 202.3226 187.6958 226.0312 10.284834
+ [8,] 10 205.1811 187.1814 234.5619 11.982118
+ [9,] 11 208.0594 191.3298 233.2606 11.810585
+[10,] 12 210.7932 192.0850 237.1459 11.336662
+[11,] 13 213.9566 195.3646 237.5129 11.330362
+[12,] 14 216.3246 194.9807 238.0314 11.325669
+[13,] 15 219.0071 196.3220 240.6890 12.073741
+[14,] 16 221.1155 200.1056 241.8803 11.792394
+[15,] 17 221.7125 201.6610 245.1075 11.332692
+[16,] 18 223.6046 203.9908 248.0839 11.722007
+[17,] 19 224.9023 205.7025 249.4671 11.228833
+[18,] 20 227.0483 208.6850 254.0646 13.048967
+[19,] 21 228.6833 208.6412 258.0540 12.722020
+[20,] 22 229.5879 209.7609 253.7754 11.841663
+[21,] 23 230.1766 213.1453 253.7301 10.746815
+[22,] 24 231.5115 213.9103 255.8942 11.014966
+[23,] 25 233.5683 214.6193 259.3002 11.749781
+[24,] 26 233.9382 217.4818 258.2308 11.369741
+[25,] 27 234.8832 218.6546 255.4724 10.158710
+[26,] 28 234.6476 220.7203 255.0633  9.429129
+[27,] 29 235.7344 219.8494 257.2886 10.211869
+[28,] 30 236.5167 222.7719 260.5121  9.947075
+[29,] 31 236.4638 222.9289 256.9346  8.826309
+[30,] 32 237.7034 221.8471 261.0706  9.617682
+[31,] 33 237.1767 223.4613 257.0897  9.058297
+[32,] 34 237.3228 221.7998 256.3574  9.567790
+[33,] 35 237.5354 221.4743 255.5337  9.339085
+[34,] 36 237.2440 222.2844 256.1171  8.837235
+[35,] 37 237.5675 222.4925 256.7364  9.388989
+[36,] 38 237.7059 222.9352 258.7308  9.451033
+[37,] 39 237.9622 224.8405 261.9372  9.479366
+[38,] 40 237.7631 224.9289 258.1333  8.637200
+[39,] 41 238.3850 226.1408 258.9579  8.581810
+[40,] 42 238.8268 225.7357 257.0081  9.731966
+[41,] 43 238.6941 226.0755 254.6363  8.313701
+[42,] 44 238.7041 228.3762 253.0612  7.491410
+[43,] 45 238.5832 229.5340 255.1341  6.571046
+[44,] 46 238.0307 229.2938 250.0349  5.519841
+[45,] 47 237.6838 230.0538 249.1268  4.855208
+[46,] 48 237.3636 232.3044 246.4903  3.952778
+[47,] 49 236.8121 234.3115 245.4082  2.380487
+[48,] 50 236.3732 236.3732 236.3732  0.000000
+
+attr(,"class")
+[1] "summary.poolaccum"
+> plot(pool)
+> ## Quantitative model
+> estimateR(BCI[1:5,])
+                  1          2          3          4          5
+S.obs     93.000000  84.000000  90.000000  94.000000 101.000000
+S.chao1  117.473684 117.214286 141.230769 111.550000 136.000000
+se.chao1  11.583785  15.918953  23.001405   8.919663  15.467344
+S.ACE    122.848959 117.317307 134.669844 118.729941 137.114088
+se.ACE     5.736054   5.571998   6.191618   5.367571   5.848474
+> 
+> 
+> 
+> graphics::par(get("par.postscript", pos = 'CheckExEnv'))
+> cleanEx()
+
+detaching ‘dune.env’
+
+> nameEx("stepacross")
+> ### * stepacross
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: stepacross
+> ### Title: Stepacross as Flexible Shortest Paths or Extended
+> ###   Dissimilarities
+> ### Aliases: stepacross
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> # There are no data sets with high beta diversity in vegan, but this
+> # should give an idea.
+> data(dune)
+> dis <- vegdist(dune)
+> edis <- stepacross(dis)
+Too long or NA distances: 5 out of 190 (2.6%)
+Stepping across 190 dissimilarities...
+> plot(edis, dis, xlab = "Shortest path", ylab = "Original")
+> ## Manhattan distance have no fixed upper limit.
+> dis <- vegdist(dune, "manhattan")
+> is.na(dis) <- no.shared(dune)
+> dis <- stepacross(dis, toolong=0)
+Too long or NA distances: 5 out of 190 (2.6%)
+Stepping across 190 dissimilarities...
+> 
+> 
+> 
+> cleanEx()
+> nameEx("stressplot.wcmdscale")
+> ### * stressplot.wcmdscale
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: stressplot.wcmdscale
+> ### Title: Display Ordination Distances Against Observed Distances in
+> ###   Eigenvector Ordinations
+> ### Aliases: stressplot.wcmdscale stressplot.cca stressplot.rda
+> ###   stressplot.capscale stressplot.dbrda stressplot.prcomp
+> ###   stressplot.princomp
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> data(dune, dune.env)
+> mod <- rda(dune)
+> stressplot(mod)
+> mod <- rda(dune ~ Management, dune.env)
+> stressplot(mod, k=3)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("taxondive")
+> ### * taxondive
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: taxondive
+> ### Title: Indices of Taxonomic Diversity and Distinctness
+> ### Aliases: taxondive summary.taxondive plot.taxondive taxa2dist
+> ### Keywords: univar
+> 
+> ### ** Examples
+> 
+> ## Preliminary: needs better data and some support functions
+> data(dune)
+> data(dune.taxon)
+> # Taxonomic distances from a classification table with variable step lengths.
+> taxdis <- taxa2dist(dune.taxon, varstep=TRUE)
+> plot(hclust(taxdis), hang = -1)
+> # Indices
+> mod <- taxondive(dune, taxdis)
+> mod
+          Species    Delta   Delta*  Lambda+   Delta+ S Delta+
+1           5.000   25.009   32.154 1592.777   51.545   257.73
+2          10.000   60.493   66.350 1426.590   66.687   666.87
+3          10.000   46.599   51.702 1395.603   70.748   707.47
+4          13.000   58.199   63.176 1258.772   73.403   954.24
+5          14.000   72.045   76.990 1018.677   77.602  1086.43
+6          11.000   76.415   83.121  858.170   80.843   889.27
+7          13.000   70.250   75.475  970.358   78.397  1019.17
+8          12.000   59.126   63.436 1079.722   74.787   897.44
+9          13.000   56.948   60.985 1220.760   71.160   925.08
+10         12.000   68.902   74.513 1028.527   77.762   933.14
+11          9.000   76.201   85.126  552.357   82.538   742.84
+12          9.000   69.555   77.792  760.886   82.614   743.52
+13         10.000   55.296   62.923  935.943   76.657   766.57
+14          7.000   77.609   89.250  341.499   88.182   617.27
+15          8.000   74.924   84.249  473.604   86.558   692.47
+16          8.000   57.843   66.539 1111.251   73.360   586.88
+17          7.000   64.823   72.408 1209.057   70.974   496.82
+18          9.000   76.731   85.773  596.607   81.401   732.61
+19          9.000   73.449   81.318  476.221   83.371   750.34
+20          8.000   78.076   87.063  520.623   87.922   703.38
+Expected            73.289   70.182            78.712         
+> summary(mod)
+           Delta  Delta*  Delta+ sd(Delta+) z(Delta+) Pr(>|z|)   
+1        25.0089 32.1543 51.5455     9.5637   -2.8405 0.004504 **
+2        60.4931 66.3497 66.6869     4.6664   -2.5769 0.009970 **
+3        46.5985 51.7024 70.7475     4.6664   -1.7067 0.087881 . 
+4        58.1988 63.1763 73.4033     3.5073   -1.5135 0.130150   
+5        72.0452 76.9903 77.6024     3.2187   -0.3446 0.730386   
+6        76.4148 83.1205 80.8430     4.2170    0.5054 0.613259   
+7        70.2500 75.4752 78.3974     3.5073   -0.0896 0.928626   
+8        59.1259 63.4363 74.7865     3.8361   -1.0232 0.306220   
+9        56.9481 60.9854 71.1597     3.5073   -2.1532 0.031303 * 
+10       68.9021 74.5133 77.7617     3.8361   -0.2476 0.804432   
+11       76.2014 85.1259 82.5379     5.2089    0.7346 0.462605   
+12       69.5554 77.7922 82.6136     5.2089    0.7491 0.453792   
+13       55.2961 62.9232 76.6566     4.6664   -0.4404 0.659657   
+14       77.6087 89.2500 88.1818     6.7459    1.4039 0.160362   
+15       74.9245 84.2485 86.5584     5.8818    1.3341 0.182178   
+16       57.8435 66.5389 73.3604     5.8818   -0.9098 0.362936   
+17       64.8225 72.4081 70.9740     6.7459   -1.1470 0.251377   
+18       76.7314 85.7730 81.4015     5.2089    0.5164 0.605570   
+19       73.4487 81.3182 83.3712     5.2089    0.8945 0.371029   
+20       78.0762 87.0634 87.9221     5.8818    1.5659 0.117368   
+Expected 73.2888 70.1816 78.7116                                 
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> plot(mod)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("tolerance")
+> ### * tolerance
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: tolerance
+> ### Title: Species tolerances and sample heterogeneities
+> ### Aliases: tolerance tolerance.cca
+> 
+> ### ** Examples
+> 
+> data(dune)
+> data(dune.env)
+> mod <- cca(dune ~ ., data = dune.env)
+> 
+> ## defaults to species tolerances
+> tolerance(mod)
+
+	Species Tolerances
+
+Scaling: 2
+
+              CCA1         CCA2
+Achimill 0.9196092 8.449914e-01
+Agrostol 0.9044440 8.718601e-01
+Airaprae 2.6654621 4.080607e-01
+Alopgeni 0.7709807 3.464157e-01
+Anthodor 1.0199113 7.575379e-01
+Bellpere 1.1104145 9.067794e-01
+Bromhord 1.0381512 5.515502e-01
+Chenalbu 0.6033850 6.883383e-15
+Cirsarve 1.3186022 1.010898e-09
+Comapalu 2.1945688 5.677653e-01
+Eleopalu 1.7007903 8.292822e-01
+Elymrepe 1.3717380 5.135604e-01
+Empenigr 2.8931006 4.260585e-09
+Hyporadi 2.2304480 5.791210e-01
+Juncarti 1.2178954 9.536362e-01
+Juncbufo 1.0888681 5.294370e-01
+Lolipere 1.0576496 7.874610e-01
+Planlanc 0.6397722 6.393173e-01
+Poaprat  1.1008934 9.166587e-01
+Poatriv  1.0732501 7.099165e-01
+Ranuflam 1.8373921 1.059420e+00
+Rumeacet 1.0088537 7.625654e-01
+Sagiproc 1.0449246 1.019154e+00
+Salirepe 2.4879997 8.654457e-02
+Scorautu 1.1072914 1.036536e+00
+Trifprat 0.5623270 2.811272e-01
+Trifrepe 0.8794567 8.738483e-01
+Vicilath 0.6164605 4.896853e-01
+Bracruta 1.1352368 1.051819e+00
+Callcusp 2.4779468 8.464129e-01
+
+> 
+> ## sample heterogeneities for CCA axes 1:6
+> tolerance(mod, which = "sites", choices = 1:6)
+
+	Sample Heterogeneities
+
+Scaling: 2
+
+        CCA1      CCA2      CCA3      CCA4      CCA5      CCA6
+1  1.6160868 0.8611530 1.3611613 0.8547721 0.8880025 1.0054039
+2  0.7379270 0.4136311 0.4814279 0.2579402 0.5508780 0.3008441
+3  1.2043495 0.7279717 1.1259717 0.9726111 0.9957139 0.9500034
+4  1.1765582 0.6901907 1.1813605 0.9080998 1.0242807 0.8926357
+5  0.3568513 0.5614830 0.7904248 0.4439038 0.5395412 0.5563630
+6  0.5242810 0.6867342 1.2883496 0.8121662 0.9649406 0.8990979
+7  0.4780376 0.4993262 0.5981893 0.4002808 0.3971772 0.3037031
+8  0.7500360 0.5498552 0.6659454 0.6745113 0.6543351 0.6517439
+9  1.1531088 0.7399384 1.0907452 1.1959420 0.8945268 1.0529521
+10 0.3560047 0.5806978 0.6260266 0.7902086 0.5703606 0.5987258
+11 0.5680664 0.6016877 0.6052417 0.8408208 0.7677540 0.5231514
+12 1.3520612 1.1084494 1.3764339 1.7806761 1.4762045 1.6001441
+13 1.2059850 0.8859365 1.2589142 1.5498105 1.3904166 1.3897352
+14 1.7981550 0.6747926 0.9814690 1.1843091 0.6378377 0.7056578
+15 0.7836875 0.5294221 0.4075052 0.6010561 0.4589683 0.4276478
+16 0.6799624 0.6058313 0.4878699 0.6155630 0.6700358 0.5629790
+17 2.2689099 1.5142792 2.3067682 2.1185580 2.0873993 2.3439179
+18 1.6837720 1.4067575 1.6687447 1.8211091 1.8556056 1.6626793
+19 1.9282709 0.9816332 1.2377752 1.2116335 1.5379732 1.5270539
+20 2.5707156 1.4458326 1.5654328 1.5825992 1.6868279 1.6688951
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("treedive")
+> ### * treedive
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: treedive
+> ### Title: Functional Diversity and Community Distances from Species Trees
+> ### Aliases: treedive treeheight treedist
+> ### Keywords: univar
+> 
+> ### ** Examples
+> 
+> 
+> ## There is no data set on species properties yet, and we demonstrate
+> ## the methods using phylogenetic trees
+> data(dune)
+> data(dune.phylodis)
+> cl <- hclust(dune.phylodis)
+> treedive(dune, cl)
+Forced matching of 'tree' labels and 'comm' names
+        1         2         3         4         5         6         7         8 
+ 384.0913  568.8791 1172.9455 1327.9317 1426.9067 1391.1628 1479.5062 1523.0792 
+        9        10        11        12        13        14        15        16 
+1460.0423 1316.4832 1366.9960 1423.5582  895.1120 1457.2705 1505.9501 1187.5165 
+       17        18        19        20 
+ 517.6920 1394.5162 1470.4671 1439.5571 
+> ## Significance test using Null model communities.
+> ## The current choice fixes numbers of species and picks species
+> ## proportionally to their overall frequency
+> oecosimu(dune, treedive, "r1", tree = cl, verbose = FALSE)
+Warning in oecosimu(dune, treedive, "r1", tree = cl, verbose = FALSE) :
+  nullmodel transformed 'comm' to binary data
+oecosimu object
+
+Call: oecosimu(comm = dune, nestfun = treedive, method = "r1", tree =
+cl, verbose = FALSE)
+
+nullmodel method ‘r1’ with 99 simulations
+
+alternative hypothesis: statistic is less or greater than simulated values
+
+   statistic      SES    mean    2.5%     50%  97.5% Pr(sim.)   
+1     384.09 -1.28273  781.41  382.13  664.87 1244.3     0.09 . 
+2     568.88 -2.29048 1245.21  648.63 1342.75 1602.9     0.01 **
+3    1172.95 -0.28386 1251.47  668.89 1353.45 1594.1     0.57   
+4    1327.93 -0.18989 1376.56  850.14 1462.61 1689.9     0.63   
+5    1426.91 -0.24932 1484.65  892.50 1544.84 1755.4     0.55   
+6    1391.16  0.40503 1285.89  721.15 1364.47 1596.7     0.83   
+7    1479.51  0.26497 1416.16  789.44 1480.89 1712.1     0.99   
+8    1523.08  0.56404 1366.20  742.42 1453.77 1730.5     0.63   
+9    1460.04  0.11145 1433.00  879.43 1498.68 1747.1     0.77   
+10   1316.48 -0.11917 1348.17  798.65 1428.77 1684.6     0.57   
+11   1367.00  0.73635 1164.21  630.76 1249.70 1516.6     0.51   
+12   1423.56  0.90574 1147.15  565.62 1260.84 1508.1     0.35   
+13    895.11 -1.04265 1207.29  628.21 1328.30 1580.5     0.51   
+14   1457.27  1.52076 1005.04  533.57 1133.14 1382.6     0.03 * 
+15   1505.95  1.34359 1109.43  504.18 1218.43 1511.6     0.07 . 
+16   1187.52  0.47862 1040.61  585.02 1175.42 1474.2     0.99   
+17    517.69 -1.44887  960.72  521.92 1120.30 1374.2     0.03 * 
+18   1394.52  0.88939 1138.12  652.91 1251.28 1505.1     0.39   
+19   1470.47  1.03008 1179.52  554.33 1275.38 1476.5     0.09 . 
+20   1439.56  1.22599 1085.02  553.27 1235.70 1441.9     0.09 . 
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> ## Phylogenetically ordered community table
+> dtree <- treedist(dune, cl)
+> tabasco(dune, hclust(dtree), cl)
+> ## Use tree distances  in capscale
+> capscale(dtree ~ 1, comm=dune)
+Call: capscale(formula = dtree ~ 1, comm = dune)
+
+              Inertia Eigenvals Rank
+Total          2.1834    2.3439     
+Unconstrained  2.1834    2.3439   10
+Imaginary               -0.1605    9
+Inertia is squared Treedist distance 
+
+Eigenvalues for unconstrained axes:
+  MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8   MDS9  MDS10 
+1.1971 0.4546 0.2967 0.1346 0.1067 0.0912 0.0391 0.0190 0.0045 0.0004 
+
+> 
+> 
+> 
+> cleanEx()
+> nameEx("tsallis")
+> ### * tsallis
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: tsallis
+> ### Title: Tsallis Diversity and Corresponding Accumulation Curves
+> ### Aliases: tsallis tsallisaccum persp.tsallisaccum
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> data(BCI)
+> i <- sample(nrow(BCI), 12)
+> x1 <- tsallis(BCI[i,])
+> x1
+     0      0.2      0.4       0.6      0.8        1      1.2      1.4      1.6
+14  97 43.58438 21.14034 11.153293 6.418569 4.017494 2.713442 1.956269 1.488283
+19 108 47.27018 22.32602 11.498387 6.492802 4.013094 2.692466 1.936696 1.473828
+28  84 38.19298 18.72155  9.985457 5.818617 3.693896 2.532394 1.852192 1.427230
+43  85 38.38228 18.77974 10.035449 5.867927 3.736254 2.565004 1.875593 1.443295
+10  93 41.50369 20.10059 10.639881 6.164157 3.889803 2.648176 1.922207 1.470121
+41 101 45.01956 21.66615 11.353495 6.499317 4.052495 2.729799 1.964435 1.492566
+42  86 39.74400 19.79375 10.684037 6.259100 3.966614 2.699614 1.954275 1.489483
+29  85 38.51838 18.81994 10.009321 5.819419 3.688721 2.526664 1.847408 1.423613
+27  98 43.84660 21.16041 11.110930 6.371476 3.980281 2.687154 1.938584 1.476662
+3   89 39.79074 19.34183 10.294475 6.003596 3.814060 2.612130 1.905004 1.461939
+9   89 39.96271 19.39982 10.272025 5.952153 3.761331 2.568371 1.872010 1.438318
+7   81 37.47840 18.73414 10.172688 6.004908 3.836811 2.631757 1.918091 1.469869
+        1.8         2
+14 1.182226 0.9718626
+19 1.172481 0.9655820
+28 1.145854 0.9499296
+43 1.156578 0.9569632
+10 1.172341 0.9663808
+41 1.184546 0.9731442
+42 1.183858 0.9731849
+29 1.143249 0.9481041
+27 1.174682 0.9669962
+3  1.168492 0.9646078
+9  1.152087 0.9534257
+7  1.173083 0.9672014
+> diversity(BCI[i,],"simpson") == x1[["2"]]
+  14   19   28   43   10   41   42   29   27    3    9    7 
+TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE TRUE 
+> plot(x1)
+> x2 <- tsallis(BCI[i,],norm=TRUE)
+> x2
+   0       0.2       0.4       0.6       0.8         1       1.2       1.4
+14 1 0.9134203 0.8653450 0.8483542 0.8548076 0.8762317 0.9040571 0.9313075
+19 1 0.9079031 0.8537683 0.8315799 0.8347890 0.8554245 0.8846675 0.9147428
+28 1 0.8997942 0.8397547 0.8130733 0.8129096 0.8314621 0.8602754 0.8916927
+43 1 0.8955869 0.8360372 0.8125579 0.8165505 0.8387881 0.8699334 0.9021018
+10 1 0.9001004 0.8450759 0.8255446 0.8324355 0.8561634 0.8872568 0.9180261
+41 1 0.9130269 0.8644349 0.8473152 0.8541311 0.8762204 0.9047063 0.9323803
+42 1 0.9185764 0.8746393 0.8602787 0.8675785 0.8881987 0.9141183 0.9390681
+29 1 0.8987625 0.8378269 0.8104423 0.8098004 0.8281171 0.8569302 0.8885453
+27 1 0.9112896 0.8605499 0.8410587 0.8456725 0.8661975 0.8940909 0.9221774
+3  1 0.8943582 0.8362208 0.8155352 0.8226868 0.8476046 0.8803722 0.9129172
+9  1 0.8982235 0.8387276 0.8137568 0.8156375 0.8358867 0.8656242 0.8971059
+7  1 0.9094899 0.8600339 0.8427936 0.8492653 0.8706729 0.8985570 0.9261475
+         1.6       1.8         2
+14 0.9538903 0.9705576 0.9818818
+19 0.9406572 0.9605041 0.9745226
+28 0.9203563 0.9436787 0.9612382
+43 0.9302296 0.9522490 0.9682216
+10 0.9438798 0.9632975 0.9767719
+41 0.9550896 0.9716606 0.9827793
+42 0.9595063 0.9744477 0.9845010
+29 0.9175446 0.9412749 0.9592583
+27 0.9460502 0.9641597 0.9768635
+3  0.9403687 0.9610574 0.9754460
+9  0.9251745 0.9475646 0.9641383
+7  0.9493990 0.9669335 0.9791421
+> plot(x2)
+> mod1 <- tsallisaccum(BCI[i,])
+> plot(mod1, as.table=TRUE, col = c(1, 2, 2))
+> persp(mod1)
+> mod2 <- tsallisaccum(BCI[i,], norm=TRUE)
+> persp(mod2,theta=100,phi=30)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("varechem")
+> ### * varechem
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: varespec
+> ### Title: Vegetation and environment in lichen pastures
+> ### Aliases: varechem varespec
+> ### Keywords: datasets
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> data(varechem)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("varpart")
+> ### * varpart
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: varpart
+> ### Title: Partition the Variation of Community Matrix by 2, 3, or 4
+> ###   Explanatory Matrices
+> ### Aliases: varpart varpart2 varpart3 varpart4 showvarparts plot.varpart
+> ###   plot.varpart234 simpleRDA2 simpleDBRDA
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> data(mite)
+> data(mite.env)
+> data(mite.pcnm)
+> 
+> # Two explanatory matrices -- Hellinger-transform Y
+> # Formula shortcut "~ ." means: use all variables in 'data'.
+> mod <- varpart(mite, ~ ., mite.pcnm, data=mite.env, transfo="hel")
+> mod
+
+Partition of variance in RDA 
+
+Call: varpart(Y = mite, X = ~., mite.pcnm, data = mite.env, transfo =
+"hel")
+Species transformation:  hellinger
+Explanatory tables:
+X1:  ~.
+X2:  mite.pcnm 
+
+No. of explanatory tables: 2 
+Total variation (SS): 27.205 
+            Variance: 0.39428 
+No. of observations: 70 
+
+Partition table:
+                     Df R.squared Adj.R.squared Testable
+[a+b] = X1           11   0.52650       0.43670     TRUE
+[b+c] = X2           22   0.62300       0.44653     TRUE
+[a+b+c] = X1+X2      33   0.75893       0.53794     TRUE
+Individual fractions                                    
+[a] = X1|X2          11                 0.09141     TRUE
+[b]                   0                 0.34530    FALSE
+[c] = X2|X1          22                 0.10124     TRUE
+[d] = Residuals                         0.46206    FALSE
+---
+Use function ‘rda’ to test significance of fractions of interest
+> 
+> ## Use fill colours
+> showvarparts(2, bg = c("hotpink","skyblue"))
+> plot(mod, bg = c("hotpink","skyblue"))
+> # Alternative way of to conduct this partitioning
+> # Change the data frame with factors into numeric model matrix
+> mm <- model.matrix(~ SubsDens + WatrCont + Substrate + Shrub + Topo, mite.env)[,-1]
+> mod <- varpart(decostand(mite, "hel"), mm, mite.pcnm)
+> # Test fraction [a] using partial RDA:
+> aFrac <- rda(decostand(mite, "hel"), mm, mite.pcnm)
+> anova(aFrac, step=200, perm.max=200)
+Permutation test for rda under reduced model
+Permutation: free
+Number of permutations: 999
+
+Model: rda(X = decostand(mite, "hel"), Y = mm, Z = mite.pcnm)
+         Df Variance      F Pr(>F)    
+Model    11 0.053592 1.8453  0.001 ***
+Residual 36 0.095050                  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> # RsquareAdj gives the same result as component [a] of varpart
+> RsquareAdj(aFrac)
+$r.squared
+[1] 0.1359251
+
+$adj.r.squared
+[1] 0.09140797
+
+> 
+> # Partition Bray-Curtis dissimilarities
+> varpart(vegdist(mite), ~ ., mite.pcnm, data = mite.env)
+
+Partition of squared Bray distance in dbRDA 
+
+Call: varpart(Y = vegdist(mite), X = ~., mite.pcnm, data = mite.env)
+
+Explanatory tables:
+X1:  ~.
+X2:  mite.pcnm 
+
+No. of explanatory tables: 2 
+Total variation (SS): 14.696 
+No. of observations: 70 
+
+Partition table:
+                     Df R.squared Adj.R.squared Testable
+[a+b] = X1           11   0.50512       0.41127     TRUE
+[b+c] = X2           22   0.60144       0.41489     TRUE
+[a+b+c] = X1+X2      33   0.74631       0.51375     TRUE
+Individual fractions                                    
+[a] = X1|X2          11                 0.09887     TRUE
+[b]                   0                 0.31240    FALSE
+[c] = X2|X1          22                 0.10249     TRUE
+[d] = Residuals                         0.48625    FALSE
+---
+Use function ‘capscale’ to test significance of fractions of interest
+> # Three explanatory matrices 
+> mod <- varpart(mite, ~ SubsDens + WatrCont, ~ Substrate + Shrub + Topo,
++    mite.pcnm, data=mite.env, transfo="hel")
+> mod
+
+Partition of variance in RDA 
+
+Call: varpart(Y = mite, X = ~SubsDens + WatrCont, ~Substrate + Shrub +
+Topo, mite.pcnm, data = mite.env, transfo = "hel")
+Species transformation:  hellinger
+Explanatory tables:
+X1:  ~SubsDens + WatrCont
+X2:  ~Substrate + Shrub + Topo
+X3:  mite.pcnm 
+
+No. of explanatory tables: 3 
+Total variation (SS): 27.205 
+            Variance: 0.39428 
+No. of observations: 70 
+
+Partition table:
+                      Df R.square Adj.R.square Testable
+[a+d+f+g] = X1         2  0.32677      0.30667     TRUE
+[b+d+e+g] = X2         9  0.40395      0.31454     TRUE
+[c+e+f+g] = X3        22  0.62300      0.44653     TRUE
+[a+b+d+e+f+g] = X1+X2 11  0.52650      0.43670     TRUE
+[a+c+d+e+f+g] = X1+X3 24  0.67372      0.49970     TRUE
+[b+c+d+e+f+g] = X2+X3 31  0.72400      0.49884     TRUE
+[a+b+c+d+e+f+g] = All 33  0.75893      0.53794     TRUE
+Individual fractions                                   
+[a] = X1 | X2+X3       2               0.03910     TRUE
+[b] = X2 | X1+X3       9               0.03824     TRUE
+[c] = X3 | X1+X2      22               0.10124     TRUE
+[d]                    0               0.01407    FALSE
+[e]                    0               0.09179    FALSE
+[f]                    0               0.08306    FALSE
+[g]                    0               0.17045    FALSE
+[h] = Residuals                        0.46206    FALSE
+Controlling 1 table X                                  
+[a+d] = X1 | X3        2               0.05317     TRUE
+[a+f] = X1 | X2        2               0.12216     TRUE
+[b+d] = X2 | X3        9               0.05231     TRUE
+[b+e] = X2 | X1        9               0.13003     TRUE
+[c+e] = X3 | X1       22               0.19303     TRUE
+[c+f] = X3 | X2       22               0.18429     TRUE
+---
+Use function ‘rda’ to test significance of fractions of interest
+> showvarparts(3, bg=2:4)
+> plot(mod, bg=2:4)
+> # An alternative formulation of the previous model using
+> # matrices mm1 amd mm2 and Hellinger transformed species data
+> mm1 <- model.matrix(~ SubsDens + WatrCont, mite.env)[,-1]
+> mm2 <- model.matrix(~ Substrate + Shrub + Topo, mite.env)[, -1]
+> mite.hel <- decostand(mite, "hel")
+> mod <- varpart(mite.hel, mm1, mm2, mite.pcnm)
+> # Use RDA to test fraction [a]
+> # Matrix can be an argument in formula
+> rda.result <- rda(mite.hel ~ mm1 + Condition(mm2) +
++    Condition(as.matrix(mite.pcnm)))
+> anova(rda.result, step=200, perm.max=200)
+Permutation test for rda under reduced model
+Permutation: free
+Number of permutations: 999
+
+Model: rda(formula = mite.hel ~ mm1 + Condition(mm2) + Condition(as.matrix(mite.pcnm)))
+         Df Variance      F Pr(>F)    
+Model     2 0.013771 2.6079  0.001 ***
+Residual 36 0.095050                  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> # Four explanatory tables
+> mod <- varpart(mite, ~ SubsDens + WatrCont, ~Substrate + Shrub + Topo,
++   mite.pcnm[,1:11], mite.pcnm[,12:22], data=mite.env, transfo="hel")
+> mod
+
+Partition of variance in RDA 
+
+Call: varpart(Y = mite, X = ~SubsDens + WatrCont, ~Substrate + Shrub +
+Topo, mite.pcnm[, 1:11], mite.pcnm[, 12:22], data = mite.env, transfo =
+"hel")
+Species transformation:  hellinger
+Explanatory tables:
+X1:  ~SubsDens + WatrCont
+X2:  ~Substrate + Shrub + Topo
+X3:  mite.pcnm[, 1:11]
+X4:  mite.pcnm[, 12:22] 
+
+No. of explanatory tables: 4 
+Total variation (SS): 27.205 
+            Variance: 0.39428 
+No. of observations: 70 
+
+Partition table:
+                            Df R.square Adj.R.square Testable
+[aeghklno] = X1              2  0.32677      0.30667     TRUE
+[befiklmo] = X2              9  0.40395      0.31454     TRUE
+[cfgjlmno] = X3             11  0.53231      0.44361     TRUE
+[dhijkmno] = X4             11  0.09069     -0.08176     TRUE
+[abefghiklmno] = X1+X2      11  0.52650      0.43670     TRUE
+[acefghjklmno] = X1+X3      13  0.59150      0.49667     TRUE
+[adeghijklmno] = X1+X4      13  0.40374      0.26533     TRUE
+[bcefgijklmno] = X2+X3      20  0.63650      0.48813     TRUE
+[bdefhijklmno] = X2+X4      20  0.53338      0.34292     TRUE
+[cdfghijklmno] = X3+X4      22  0.62300      0.44653     TRUE
+[abcefghijklmno] = X1+X2+X3 22  0.67947      0.52944     TRUE
+[abdefghijklmno] = X1+X2+X4 22  0.61553      0.43557     TRUE
+[acdefghijklmno] = X1+X3+X4 24  0.67372      0.49970     TRUE
+[bcdefghijklmno] = X2+X3+X4 31  0.72400      0.49884     TRUE
+[abcdefghijklmno] = All     33  0.75893      0.53794     TRUE
+Individual fractions                                         
+[a] = X1 | X2+X3+X4          2               0.03910     TRUE
+[b] = X2 | X1+X3+X4          9               0.03824     TRUE
+[c] = X3 | X1+X2+X4         11               0.10237     TRUE
+[d] = X4 | X1+X2+X3         11               0.00850     TRUE
+[e]                          0               0.01407    FALSE
+[f]                          0               0.13200    FALSE
+[g]                          0               0.05355    FALSE
+[h]                          0               0.00220    FALSE
+[i]                          0              -0.00547    FALSE
+[j]                          0              -0.00963    FALSE
+[k]                          0              -0.00231    FALSE
+[l]                          0               0.24037    FALSE
+[m]                          0              -0.03474    FALSE
+[n]                          0               0.02730    FALSE
+[o]                          0              -0.06761    FALSE
+[p] = Residuals              0               0.46206    FALSE
+Controlling 2 tables X                                       
+[ae] = X1 | X3+X4            2               0.05317     TRUE
+[ag] = X1 | X2+X4            2               0.09265     TRUE
+[ah] = X1 | X2+X3            2               0.04131     TRUE
+[be] = X2 | X3+X4            9               0.05231     TRUE
+[bf] = X2 | X1+X4            9               0.17024     TRUE
+[bi] = X2 | X1+X3            9               0.03277     TRUE
+[cf] = X3 | X1+X4           11               0.23437     TRUE
+[cg] = X3 | X2+X4           11               0.15592     TRUE
+[cj] = X3 | X1+X2           11               0.09274     TRUE
+[dh] = X4 | X2+X3           11               0.01071     TRUE
+[di] = X4 | X1+X3           11               0.00303     TRUE
+[dj] = X4 | X1+X2           11              -0.00113     TRUE
+Controlling 1 table X                                        
+[aghn] = X1 | X2             2               0.12216     TRUE
+[aehk] = X1 | X3             2               0.05306     TRUE
+[aegl] = X1 | X4             2               0.34709     TRUE
+[bfim] = X2 | X1             9               0.13003     TRUE
+[beik] = X2 | X3             9               0.04452     TRUE
+[befl] = X2 | X4             9               0.42468     TRUE
+[cfjm] = X3 | X1            11               0.19000     TRUE
+[cgjn] = X3 | X2            11               0.17359     TRUE
+[cfgl] = X3 | X4            11               0.52830     TRUE
+[dijm] = X4 | X1            11              -0.04134     TRUE
+[dhjn] = X4 | X2            11               0.02837     TRUE
+[dhik] = X4 | X3            11               0.00292     TRUE
+---
+Use function ‘rda’ to test significance of fractions of interest
+> plot(mod, bg=2:5)
+> # Show values for all partitions by putting 'cutoff' low enough:
+> plot(mod, cutoff = -Inf, cex = 0.7, bg=2:5)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("vegan-package")
+> ### * vegan-package
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: vegan-package
+> ### Title: Community Ecology Package: Ordination, Diversity and
+> ###   Dissimilarities
+> ### Aliases: vegan-package vegan
+> ### Keywords: package multivariate univar models spatial nonparametric
+> ###   htest regression
+> 
+> ### ** Examples
+> 
+> ### Example 1: Unconstrained ordination
+> ## NMDS
+> data(varespec)
+> data(varechem)
+> ord <- metaMDS(varespec)
+Square root transformation
+Wisconsin double standardization
+Run 0 stress 0.1843196 
+Run 1 stress 0.2455912 
+Run 2 stress 0.2169407 
+Run 3 stress 0.2313231 
+Run 4 stress 0.1974406 
+Run 5 stress 0.1858402 
+Run 6 stress 0.1948414 
+Run 7 stress 0.2265717 
+Run 8 stress 0.222507 
+Run 9 stress 0.2023215 
+Run 10 stress 0.2673177 
+Run 11 stress 0.1976151 
+Run 12 stress 0.1852397 
+Run 13 stress 0.2341085 
+Run 14 stress 0.1955867 
+Run 15 stress 0.2137409 
+Run 16 stress 0.2109638 
+Run 17 stress 0.1825658 
+... New best solution
+... Procrustes: rmse 0.04169825  max resid 0.1521436 
+Run 18 stress 0.1843197 
+Run 19 stress 0.2570119 
+Run 20 stress 0.3760596 
+*** No convergence -- monoMDS stopping criteria:
+    20: stress ratio > sratmax
+> plot(ord, type = "t")
+> ## Fit environmental variables
+> ef <- envfit(ord, varechem)
+> ef
+
+***VECTORS
+
+            NMDS1    NMDS2     r2 Pr(>r)    
+N        -0.05719 -0.99836 0.2537  0.039 *  
+P         0.61959  0.78492 0.1938  0.129    
+K         0.76629  0.64249 0.1809  0.138    
+Ca        0.68506  0.72849 0.4119  0.005 ** 
+Mg        0.63240  0.77464 0.4271  0.005 ** 
+S         0.19123  0.98155 0.1752  0.133    
+Al       -0.87169  0.49006 0.5269  0.001 ***
+Fe       -0.93613  0.35164 0.4451  0.001 ***
+Mn        0.79873 -0.60169 0.5230  0.002 ** 
+Zn        0.61750  0.78657 0.1879  0.122    
+Mo       -0.90304  0.42955 0.0609  0.524    
+Baresoil  0.92503 -0.37988 0.2508  0.043 *  
+Humdepth  0.93291 -0.36011 0.5200  0.001 ***
+pH       -0.64809  0.76156 0.2308  0.064 .  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+Permutation: free
+Number of permutations: 999
+
+
+> plot(ef, p.max = 0.05)
+> ### Example 2: Constrained ordination (RDA)
+> ## The example uses formula interface to define the model
+> data(dune)
+> data(dune.env)
+> ## No constraints: PCA
+> mod0 <- rda(dune ~ 1, dune.env)
+> mod0
+Call: rda(formula = dune ~ 1, data = dune.env)
+
+              Inertia Rank
+Total           84.12     
+Unconstrained   84.12   19
+Inertia is variance 
+
+Eigenvalues for unconstrained axes:
+   PC1    PC2    PC3    PC4    PC5    PC6    PC7    PC8 
+24.795 18.147  7.629  7.153  5.695  4.333  3.199  2.782 
+(Showed only 8 of all 19 unconstrained eigenvalues)
+
+> plot(mod0)
+> ## All environmental variables: Full model
+> mod1 <- rda(dune ~ ., dune.env)
+> mod1
+Call: rda(formula = dune ~ A1 + Moisture + Management + Use + Manure,
+data = dune.env)
+
+              Inertia Proportion Rank
+Total         84.1237     1.0000     
+Constrained   63.2062     0.7513   12
+Unconstrained 20.9175     0.2487    7
+Inertia is variance 
+Some constraints were aliased because they were collinear (redundant)
+
+Eigenvalues for constrained axes:
+  RDA1   RDA2   RDA3   RDA4   RDA5   RDA6   RDA7   RDA8   RDA9  RDA10  RDA11 
+22.396 16.208  7.039  4.038  3.760  2.609  2.167  1.803  1.404  0.917  0.582 
+ RDA12 
+ 0.284 
+
+Eigenvalues for unconstrained axes:
+  PC1   PC2   PC3   PC4   PC5   PC6   PC7 
+6.627 4.309 3.549 2.546 2.340 0.934 0.612 
+
+> plot(mod1)
+> ## Automatic selection of variables by permutation P-values
+> mod <- ordistep(mod0, scope=formula(mod1))
+
+Start: dune ~ 1 
+
+             Df    AIC      F Pr(>F)   
++ Management  3 87.082 2.8400  0.005 **
++ Moisture    3 87.707 2.5883  0.005 **
++ Manure      4 89.232 1.9539  0.015 * 
++ A1          1 89.591 1.9217  0.045 * 
++ Use         2 91.032 1.1741  0.295   
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Step: dune ~ Management 
+
+             Df   AIC    F Pr(>F)   
+- Management  3 89.62 2.84  0.005 **
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+           Df    AIC      F Pr(>F)   
++ Moisture  3 85.567 1.9764  0.010 **
++ Manure    3 87.517 1.3902  0.045 * 
++ A1        1 87.424 1.2965  0.245   
++ Use       2 88.284 1.0510  0.400   
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+Step: dune ~ Management + Moisture 
+
+             Df    AIC      F Pr(>F)   
+- Moisture    3 87.082 1.9764  0.015 * 
+- Management  3 87.707 2.1769  0.005 **
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+
+         Df    AIC      F Pr(>F)
++ Manure  3 85.762 1.1225  0.255
++ A1      1 86.220 0.8359  0.625
++ Use     2 86.842 0.8027  0.780
+
+> mod
+Call: rda(formula = dune ~ Management + Moisture, data = dune.env)
+
+              Inertia Proportion Rank
+Total         84.1237     1.0000     
+Constrained   46.4249     0.5519    6
+Unconstrained 37.6988     0.4481   13
+Inertia is variance 
+
+Eigenvalues for constrained axes:
+  RDA1   RDA2   RDA3   RDA4   RDA5   RDA6 
+21.588 14.075  4.123  3.163  2.369  1.107 
+
+Eigenvalues for unconstrained axes:
+  PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8   PC9  PC10  PC11  PC12  PC13 
+8.241 7.138 5.355 4.409 3.143 2.770 1.878 1.741 0.952 0.909 0.627 0.311 0.227 
+
+> plot(mod)
+> ## Permutation test for all variables
+> anova(mod)
+Permutation test for rda under reduced model
+Permutation: free
+Number of permutations: 999
+
+Model: rda(formula = dune ~ Management + Moisture, data = dune.env)
+         Df Variance      F Pr(>F)    
+Model     6   46.425 2.6682  0.001 ***
+Residual 13   37.699                  
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> ## Permutation test of "type III" effects, or significance when a term
+> ## is added to the model after all other terms
+> anova(mod, by = "margin")
+Permutation test for rda under reduced model
+Marginal effects of terms
+Permutation: free
+Number of permutations: 999
+
+Model: rda(formula = dune ~ Management + Moisture, data = dune.env)
+           Df Variance      F Pr(>F)   
+Management  3   18.938 2.1769  0.003 **
+Moisture    3   17.194 1.9764  0.005 **
+Residual   13   37.699                 
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> ## Plot only sample plots, use different symbols and draw SD ellipses 
+> ## for Managemenet classes
+> plot(mod, display = "sites", type = "n")
+> with(dune.env, points(mod, disp = "si", pch = as.numeric(Management)))
+> with(dune.env, legend("topleft", levels(Management), pch = 1:4,
++   title = "Management"))
+> with(dune.env, ordiellipse(mod, Management, label = TRUE))
+> ## add fitted surface of diversity to the model
+> ordisurf(mod, diversity(dune), add = TRUE)
+
+Family: gaussian 
+Link function: identity 
+
+Formula:
+y ~ s(x1, x2, k = 10, bs = "tp", fx = FALSE)
+
+Estimated degrees of freedom:
+1.28  total = 2.28 
+
+REML score: 3.00623     
+> ### Example 3: analysis of dissimilarites a.k.a. non-parametric
+> ### permutational anova
+> adonis(dune ~ ., dune.env)
+
+Call:
+adonis(formula = dune ~ ., data = dune.env) 
+
+Permutation: free
+Number of permutations: 999
+
+Terms added sequentially (first to last)
+
+           Df SumsOfSqs MeanSqs F.Model      R2 Pr(>F)    
+A1          1    0.7230 0.72295  5.2038 0.16817  0.001 ***
+Moisture    3    1.1871 0.39569  2.8482 0.27613  0.006 ** 
+Management  3    0.9036 0.30121  2.1681 0.21019  0.023 *  
+Use         2    0.0921 0.04606  0.3315 0.02143  0.982    
+Manure      3    0.4208 0.14026  1.0096 0.09787  0.481    
+Residuals   7    0.9725 0.13893         0.22621           
+Total      19    4.2990                 1.00000           
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> adonis(dune ~ Management + Moisture, dune.env)
+
+Call:
+adonis(formula = dune ~ Management + Moisture, data = dune.env) 
+
+Permutation: free
+Number of permutations: 999
+
+Terms added sequentially (first to last)
+
+           Df SumsOfSqs MeanSqs F.Model      R2 Pr(>F)    
+Management  3    1.4686 0.48953  3.7907 0.34161  0.001 ***
+Moisture    3    1.1516 0.38387  2.9726 0.26788  0.002 ** 
+Residuals  13    1.6788 0.12914         0.39051           
+Total      19    4.2990                 1.00000           
+---
+Signif. codes:  0 ‘***’ 0.001 ‘**’ 0.01 ‘*’ 0.05 ‘.’ 0.1 ‘ ’ 1
+> 
+> 
+> 
+> cleanEx()
+> nameEx("vegdist")
+> ### * vegdist
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Encoding: UTF-8
+> 
+> ### Name: vegdist
+> ### Title: Dissimilarity Indices for Community Ecologists
+> ### Aliases: vegdist
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> vare.dist <- vegdist(varespec)
+> # Orlóci's Chord distance: range 0 .. sqrt(2)
+> vare.dist <- vegdist(decostand(varespec, "norm"), "euclidean")
+> # Anderson et al.  (2006) version of Gower
+> vare.dist <- vegdist(decostand(varespec, "log"), "altGower")
+Warning: non-integer data: divided by smallest positive value
+> # Range standardization with "altGower" (that excludes double-zeros)
+> vare.dist <- vegdist(decostand(varespec, "range"), "altGower")
+> 
+> 
+> 
+> cleanEx()
+> nameEx("vegemite")
+> ### * vegemite
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: vegemite
+> ### Title: Display Compact Ordered Community Tables
+> ### Aliases: vegemite tabasco coverscale
+> ### Keywords: print manip hplot
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> ## Print only more common species 
+> freq <- apply(varespec > 0, 2, sum)
+> vegemite(varespec, scale="Hult", sp.ind = freq > 10)
+                                  
+          1122212121122       1112
+          854739268340575634292011
+ Callvulg 111...11.311...1111.111.
+ Empenigr 211332121112211111212213
+ Vaccviti 323332212113221211233234
+ Pinusylv 111.111111111.11.1111111
+ Dicrfusc 12.111441121211111111111
+ Dicrpoly .11.11.11..1.11....1.111
+ Pleuschr 144533435123411111111131
+ Polyjuni 111.11.111112111.111.111
+ Pohlnuta 111111111111.1..11.11111
+ Ptilcili 1111111111..1..11.11..12
+ Cladarbu 321122121332143423111121
+ Cladrang 321221131312145443313241
+ Cladstel 11111311.211.11254555542
+ Cladunci 112111111131111111111111
+ Cladcocc 11..11111111111111.1.11.
+ Cladcorn 111111111111111111111111
+ Cladgrac 111111111111111111111.11
+ Cladfimb 11.1111111111111111111.1
+ Cladcris 111111111111111111111111
+ Cladchlo ..1.111..1...1.11.11.1.1
+ Cetreric 111...11.111111111.1.1..
+ Cetrisla .11....1111.1....1.11111
+ Stersp   111.11.1111.112111...11.
+ Claddefo 1111111111111111111111.1
+  sites species 
+     24      24 
+scale:  Hult 
+> ## Order by correspondence analysis, use Hill scaling and layout:
+> dca <- decorana(varespec)
+> vegemite(varespec, dca, "Hill", zero="-")
+                                  
+           1   1  1 11122211122222
+          203942561738913046572458
+ Flavniva -1114-11-1-11-1---------
+ Cladstel 5555551451425411111211--
+ Cladphyl -1-1----1-------1-------
+ Cladcerv 1---1-----------------1-
+ Cladsp   ---11--1--11---1-1-11-1-
+ Cladamau --1---1----1------------
+ Cladchlo 1111---1-11-111-----11--
+ Cladrang 535254555555223414332321
+ Diphcomp --11-----112----------1-
+ Stersp   -11-1-4111111-1-111--111
+ Pinusylv 11-111111-111111111-1111
+ Polypili ------111--11-11--1-----
+ Cetrisla -1-111--1-1--1--111--111
+ Cladcocc -1111-1111111-11111-1-11
+ Cladarbu 113142453555313343413231
+ Vacculig --1-1----3-1---1---12-11
+ Pohlnuta -11111--11111111111111-1
+ Cladfimb 11111111-111111111111-11
+ Callvulg 111-21-12-51---1221-21--
+ Icmaeric ------1--1------11------
+ Empenigr 342214131314344333143131
+ Vaccviti 342514244334455432444443
+ Cladgrac 1-1111111111111111111111
+ Cetreric -1111-11-111---1111-111-
+ Cladcorn 111111111111111111111111
+ Cladcris 111111111111111111111111
+ Peltapht --------1-11--1----1--1-
+ Ptilcili 1-11---11-11141--1111111
+ Barbhatc ----------1-121----1----
+ Claddefo 11111111-111111111111111
+ Cladbotr ----------1-1111---1-1-1
+ Betupube -------------1------1-1-
+ Dicrpoly -1-1--1-11--1211-11--1-1
+ Cladunci 111111122111111251212311
+ Polycomm ------------11--1--1--1-
+ Polyjuni 11-11-1111111121111--131
+ Rhodtome ----------1--2-----21--1
+ Dicrfusc 111111111121112145425-41
+ Pleuschr 111213114132524434555555
+ Vaccmyrt ---1------1-24--12133--4
+ Descflex ----1----1--11-----21-11
+ Nepharct --1------1-1---1------2-
+ Dicrsp   -----1----1--1-1-11-1541
+ Hylosple ---------------1---3--13
+  sites species 
+     24      44 
+scale:  Hill 
+> ## Show one class from cluster analysis, but retain the ordering above
+> clus <- hclust(vegdist(varespec))
+> cl <- cutree(clus, 3)
+> sel <- vegemite(varespec, use=dca, select = cl == 3, scale="Br")
+               
+           1 12
+          20921
+ Flavniva .++..
+ Cladstel 55542
+ Cladphyl .++..
+ Cladcerv r....
+ Cladsp   ..+..
+ Cladchlo r++.+
+ Cladrang 22121
+ Diphcomp ..+..
+ Stersp   .+...
+ Pinusylv r++1+
+ Cetrisla .++++
+ Cladcocc .++..
+ Cladarbu +1+1+
+ Pohlnuta .++++
+ Cladfimb r++++
+ Callvulg r+.+.
+ Empenigr 22122
+ Vaccviti 22223
+ Cladgrac r.+++
+ Cetreric .++..
+ Cladcorn r+++r
+ Cladcris r++++
+ Ptilcili r.+.2
+ Barbhatc ....1
+ Claddefo r++++
+ Cladbotr ....+
+ Betupube ....+
+ Dicrpoly .++.1
+ Cladunci +++1+
+ Polycomm ....+
+ Polyjuni r++.+
+ Rhodtome ....1
+ Dicrfusc r++++
+ Pleuschr ++121
+ Vaccmyrt ..+.2
+ Descflex ....+
+ Dicrsp   ...++
+  sites species 
+      5      37 
+scale:  Braun.Blanquet 
+> ## Re-create previous
+> vegemite(varespec, sp=sel$sp, site=sel$site, scale="Hult")
+               
+           1 12
+          20921
+ Flavniva .11..
+ Cladstel 55552
+ Cladphyl .11..
+ Cladcerv 1....
+ Cladsp   ..1..
+ Cladchlo 111.1
+ Cladrang 32131
+ Diphcomp ..1..
+ Stersp   .1...
+ Pinusylv 11111
+ Cetrisla .1111
+ Cladcocc .11..
+ Cladarbu 11111
+ Pohlnuta .1111
+ Cladfimb 11111
+ Callvulg 11.1.
+ Empenigr 22123
+ Vaccviti 22334
+ Cladgrac 1.111
+ Cetreric .11..
+ Cladcorn 11111
+ Cladcris 11111
+ Ptilcili 1.1.2
+ Barbhatc ....1
+ Claddefo 11111
+ Cladbotr ....1
+ Betupube ....1
+ Dicrpoly .11.1
+ Cladunci 11111
+ Polycomm ....1
+ Polyjuni 111.1
+ Rhodtome ....1
+ Dicrfusc 11111
+ Pleuschr 11111
+ Vaccmyrt ..1.3
+ Descflex ....1
+ Dicrsp   ...11
+  sites species 
+      5      37 
+scale:  Hult 
+> ## Re-order clusters by ordination
+> clus <- as.dendrogram(clus)
+> clus <- reorder(clus, scores(dca, choices=1, display="sites"), agglo.FUN = mean)
+> vegemite(varespec, clus, scale = "Hult")
+                                  
+            1   111  1211221212222
+          431567380922149306254578
+ Flavniva 21.111.111....11........
+ Cladamau .1.1...1................
+ Stersp   111211111....111.1.111.1
+ Polypili ..111..1......111..1....
+ Diphcomp .1...111.1...........1..
+ Cladphyl ..1.....11...1..........
+ Cladrang 344544332133111223121121
+ Cladcerv 1.........1..........1..
+ Cladstel 454121215555213111111.1.
+ Cladarbu 322344331111132222121111
+ Vacculig 11...2.1........1.1..111
+ Callvulg 111.1.311.11.1..11111...
+ Icmaeric ...1.1.......1...1......
+ Cladsp   1...1.11.1......111..11.
+ Cladcocc 1111111111...1111111.1.1
+ Pinusylv 1.111.1111111111111111.1
+ Cladchlo .1..111.111.1.11..1.1...
+ Cetrisla 1.1...1.11.111...1.111.1
+ Cladfimb 11.11111111111111111.111
+ Peltapht ..1...11.......1.....11.
+ Cetreric 11.1111111...1..111111..
+ Cladgrac 11111111.111111111111111
+ Pohlnuta 111..11111.1111111111.11
+ Ptilcili .11.1.11.11.2.11.1111111
+ Barbhatc ......1.....1.11......1.
+ Cladcorn 111111111111111111111111
+ Vaccviti 113122132323412331223232
+ Cladcris 111111111111111111111111
+ Empenigr 111111122122312322111231
+ Cladbotr ......1.....1.111...1.11
+ Betupube ............1.....1..1..
+ Cladunci 111111111111131111112111
+ Claddefo 11.111111111111111111111
+ Dicrpoly ..11.1..11..1.1111.11..1
+ Polycomm ............111......11.
+ Rhodtome ......1.....1.....1...11
+ Polyjuni 1.111111111.111111.112.1
+ Dicrfusc 11111111111112111442.211
+ Pleuschr 113111111111123333444455
+ Vaccmyrt ......1..1..311..111..13
+ Nepharct .1...1.1........1....1..
+ Dicrsp   ......1....11...111133.1
+ Descflex 1....1......1.1...1..111
+ Hylosple ................1....122
+  sites species 
+     24      44 
+scale:  Hult 
+> 
+> ## Abundance values have such a wide range that they must be rescaled
+> ## or all abundances will not be shown in tabasco
+> tabasco(decostand(varespec, "log"), dca)
+Warning: non-integer data: divided by smallest positive value
+> 
+> ## Classification trees for species
+> data(dune, dune.taxon)
+> taxontree <- hclust(taxa2dist(dune.taxon))
+> plotree <- hclust(vegdist(dune), "average")
+> ## Automatic reordering of clusters
+> tabasco(dune, plotree, sp.ind = taxontree)
+> ## No reordering of taxonomy
+> tabasco(dune, plotree, sp.ind = taxontree, Colv = FALSE)
+> ## Species cluster: most dissimilarity indices do a bad job when
+> ## comparing rare and common species, but Raup-Crick makes sense
+> sptree <- hclust(vegdist(t(dune), "raup"), "average")
+> tabasco(dune, plotree, sptree)
+> 
+> 
+> 
+> cleanEx()
+> nameEx("wascores")
+> ### * wascores
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: wascores
+> ### Title: Weighted Averages Scores for Species
+> ### Aliases: wascores eigengrad
+> ### Keywords: multivariate univar
+> 
+> ### ** Examples
+> 
+> data(varespec)
+> data(varechem)
+> vare.dist <- vegdist(wisconsin(varespec))
+> vare.mds <- monoMDS(vare.dist)
+> vare.points <- postMDS(vare.mds$points, vare.dist)
+> vare.wa <- wascores(vare.points, varespec)
+> plot(scores(vare.points), pch="+", asp=1)
+> text(vare.wa, rownames(vare.wa), cex=0.8, col="blue")
+> ## Omit rare species (frequency <= 4)
+> freq <- apply(varespec>0, 2, sum)
+> plot(scores(vare.points), pch="+", asp=1)
+> text(vare.wa[freq > 4,], rownames(vare.wa)[freq > 4],cex=0.8,col="blue")
+> ## Works for environmental variables, too.
+> wascores(varechem, varespec)
+                N        P         K       Ca        Mg        S        Al
+Callvulg 25.12401 41.66188 246.92383 572.3431  99.40828 49.10552 245.15751
+Empenigr 21.61371 44.17350 158.92517 580.8403  89.20628 35.75327 107.05670
+Rhodtome 22.34553 40.35530 162.31108 643.8819  95.07712 30.84303  28.83159
+Vaccmyrt 24.96352 49.80649 189.70177 656.4179  96.75529 34.55190  32.75705
+Vaccviti 21.14028 45.86984 162.12372 613.2126  94.30084 37.26975 116.14656
+Pinusylv 18.37299 44.24818 163.60195 670.9387  93.52214 37.02238 150.45523
+Descflex 22.24089 54.74804 212.20357 771.0159 114.15179 38.00000  24.64143
+Betupube 21.51034 28.86552 112.28276 513.5586  75.15172 23.55172  33.12414
+Vacculig 28.00729 33.48758 114.90230 372.9653  70.89954 29.32378 202.89008
+Diphcomp 22.34228 39.71049 127.44259 446.1565  80.16173 32.32963 122.31574
+Dicrsp   21.33007 60.03758 185.04563 828.0544 148.67509 46.75427  90.42294
+Dicrfusc 23.45681 39.14575 162.91954 578.2309  77.81648 33.48086  60.66890
+Dicrpoly 20.65446 43.87409 150.51485 665.5845 115.22112 36.17079  90.16733
+Hylosple 26.10599 67.88980 245.78681 779.6520 111.96685 42.27433  24.92738
+Pleuschr 22.60476 54.22534 199.96241 712.6278 109.23425 40.01132  70.43900
+Polypili 23.17377 43.75902 144.82623 724.9738  85.42623 30.58525 145.73115
+Polyjuni 22.89480 47.98022 154.81906 643.3864  87.27819 33.63863  53.24888
+Polycomm 21.73521 41.17042 154.91549 631.8704 101.84789 32.17324  46.80986
+Pohlnuta 19.99885 48.59198 169.68855 678.3813 104.31641 39.94427 132.05458
+Ptilcili 21.27880 33.44211 127.08522 564.5652  85.96417 27.11720  56.60692
+Barbhatc 21.17461 27.93323 113.13542 497.9138  77.50564 23.72288  42.09749
+Cladarbu 23.56127 38.04952 142.03073 454.9019  74.00779 33.81002 173.12698
+Cladrang 24.28421 38.60534 135.31177 463.2750  70.54209 32.53349 183.79979
+Cladstel 19.28049 46.71060 158.00576 540.4904  80.19153 40.29106 225.89526
+Cladunci 21.41240 45.49844 163.40402 621.9100  98.35538 40.00734 119.59481
+Cladcocc 21.72473 42.80681 156.32330 557.9007  80.95448 36.25161 149.82616
+Cladcorn 22.11640 47.06656 160.36881 623.5185  95.17781 36.75273 104.71463
+Cladgrac 22.51887 44.06576 156.50214 583.1558  94.10292 36.93930 134.13424
+Cladfimb 21.77980 41.82652 153.29444 512.4646  78.28232 35.62323 128.96061
+Cladcris 20.88795 44.12262 171.04016 574.5672  92.52169 38.24003 116.03507
+Cladchlo 19.51207 45.39655 150.93190 571.0233  95.77586 39.50862 156.81983
+Cladbotr 22.97660 38.89574 167.20000 590.8021  99.57234 34.79362  87.75957
+Cladamau 25.07143 35.84286 105.07857 395.2214  68.18571 27.11429  95.91429
+Cladsp   19.21923 47.37308 168.49231 526.7654  79.54423 45.15385 215.33846
+Cetreric 21.00944 47.76972 165.07972 579.6322  99.14944 42.25472 163.46000
+Cetrisla 18.36552 42.73695 151.78374 626.2813  89.77833 35.33498 132.68227
+Flavniva 18.56110 61.18194 207.67705 502.9203  60.91755 50.22532 396.82405
+Nepharct 23.33099 49.10019 146.84715 618.1601  64.27319 29.95760  31.72300
+Stersp   28.19743 32.84800  94.33459 389.5143  53.25377 24.22175  95.39326
+Peltapht 21.08553 54.45395 193.38816 886.5487 119.35132 37.92500 106.16447
+Icmaeric 28.88636 27.00000  87.86818 307.0500  40.48182 22.17273  89.94091
+Cladcerv 20.25000 56.79000 192.36000 519.2300  62.10000 45.18000 314.92000
+Claddefo 22.19198 45.22981 167.73069 583.7983  92.01320 38.51369 100.46139
+Cladphyl 15.73750 54.56875 180.39375 775.4500  99.65625 43.35000 208.55000
+                 Fe        Mn        Zn        Mo  Baresoil Humdepth       pH
+Callvulg  75.457843  52.38247  8.281074 0.4734635 27.241036 2.187819 2.845108
+Empenigr  38.146102  53.49357  7.159938 0.3289657 27.324317 2.367439 2.888078
+Rhodtome   5.560906  70.48260  7.444100 0.2251490 37.325030 2.689154 2.895352
+Vaccmyrt   5.589213  75.17221  7.838533 0.2666732 31.404171 2.798935 2.855216
+Vaccviti  37.586067  51.81515  7.617213 0.3680289 26.307701 2.307879 2.923128
+Pinusylv  39.121898  35.22311  7.733333 0.3485401 17.762968 1.996350 3.049148
+Descflex   6.066429 110.87232  9.526607 0.2316071 22.740179 2.834821 2.822857
+Betupube   5.417241  37.53448  5.637931 0.2068966 51.496552 2.527586 2.979310
+Vacculig  93.963929  37.73062  4.593824 0.3780552 21.410710 2.041196 3.006965
+Diphcomp  73.281173  46.88025  4.593827 0.3725309 31.836574 2.103704 2.856790
+Dicrsp    22.504617  65.35020 13.060765 0.5610370 23.182889 2.232247 2.954272
+Dicrfusc  13.922252  61.40958  6.922859 0.3218816 26.918674 2.484399 2.806431
+Dicrpoly  20.973927  33.28779  9.110561 0.3892739 37.304043 2.228713 3.015842
+Hylosple   4.729157 115.14606  9.885976 0.2851996 20.956264 2.925000 2.807594
+Pleuschr  19.113811  77.12277  9.007860 0.3405945 24.584979 2.596881 2.858446
+Polypili  51.993443  36.74754  8.045902 0.2204918 17.368852 1.493443 3.227869
+Polyjuni  12.885704  82.56274  7.945126 0.2760289 28.116303 2.615523 2.874729
+Polycomm   7.895775  68.22535  7.843662 0.2591549 38.687324 2.926761 2.860563
+Pohlnuta  33.089313  42.02290  8.452290 0.3935115 24.709351 2.147328 2.985496
+Ptilcili  14.036188  33.93547  5.906924 0.2303712 48.941884 2.502498 2.973376
+Barbhatc   8.199687  31.11379  5.550784 0.2084639 54.331975 2.514734 2.986834
+Cladarbu  65.470394  38.28429  6.387500 0.4464046 22.592997 2.048540 2.937879
+Cladrang  76.612752  34.86010  6.616452 0.3903501 17.270158 1.799128 3.022346
+Cladstel  84.639467  33.27903  7.287216 0.4054879  9.854042 1.851973 3.052167
+Cladunci  27.463504  40.10322  9.108102 0.5120114 28.312376 2.362687 2.858564
+Cladcocc  46.653763  43.53584  7.269176 0.3698925 19.972222 2.025090 2.974194
+Cladcorn  32.916238  53.38441  7.518489 0.3639871 26.620868 2.399518 2.890997
+Cladgrac  45.758366  44.63911  7.702724 0.4244163 25.546654 2.230350 2.933658
+Cladfimb  41.710354  47.83687  6.815152 0.3887626 24.763889 2.239394 2.902778
+Cladcris  34.729585  44.75984  6.933735 0.3746988 29.711352 2.400000 2.841633
+Cladchlo  42.089655  35.13276  7.908621 0.3814655 22.319655 2.075000 3.022414
+Cladbotr  23.374468  46.54255  7.263830 0.3106383 45.725532 2.580851 2.904255
+Cladamau  68.971429  41.98571  4.928571 0.3214286 27.592857 1.857143 2.914286
+Cladsp    47.913462  49.61923  8.421154 0.6173077 16.864423 2.213462 2.921154
+Cetreric  42.614167  36.96694  9.516389 0.5687500 21.452639 2.058056 2.923889
+Cetrisla  29.617734  33.24138  7.518227 0.3192118 26.417980 2.027586 3.065025
+Flavniva  94.339916  37.03232  9.116371 0.9987764 19.692312 1.799241 2.923629
+Nepharct  12.910837 115.15684  7.743536 0.2180608 23.135932 2.541065 2.918251
+Stersp    30.226998  31.97061  7.635502 0.2828767 15.844007 1.477740 3.038756
+Peltapht  37.598684  56.64079  7.652632 0.2046053 28.321053 2.286842 3.026316
+Icmaeric  24.236364  23.95909  6.618182 0.2863636 18.727273 1.568182 2.968182
+Cladcerv 111.090000  52.04000  8.530000 0.6800000 15.393000 1.870000 2.900000
+Claddefo  25.116325  48.81105  7.599609 0.4096285 33.814545 2.468133 2.823656
+Cladphyl  50.475000  35.28125  8.568750 0.2812500  7.728125 1.575000 3.231250
+> ## And the strengths of these variables are:
+> eigengrad(varechem, varespec)
+         N          P          K         Ca         Mg          S         Al 
+0.13000842 0.18880078 0.16246365 0.15722067 0.16359171 0.13391967 0.29817406 
+        Fe         Mn         Zn         Mo   Baresoil   Humdepth         pH 
+0.20766831 0.27254480 0.16783834 0.09542514 0.20931501 0.25051326 0.14583161 
+> 
+> 
+> 
+> cleanEx()
+> nameEx("wcmdscale")
+> ### * wcmdscale
+> 
+> flush(stderr()); flush(stdout())
+> 
+> ### Name: wcmdscale
+> ### Title: Weighted Classical (Metric) Multidimensional Scaling
+> ### Aliases: wcmdscale scores.wcmdscale plot.wcmdscale
+> ### Keywords: multivariate
+> 
+> ### ** Examples
+> 
+> ## Correspondence analysis as a weighted principal coordinates
+> ## analysis of Euclidean distances of Chi-square transformed data
+> data(dune)
+> rs <- rowSums(dune)/sum(dune)
+> d <- dist(decostand(dune, "chi"))
+> ord <- wcmdscale(d, w = rs, eig = TRUE)
+> ## Ordinary CA
+> ca <- cca(dune)
+> ## Eigevalues are numerically similar
+> ca$CA$eig - ord$eig
+          CA1           CA2           CA3           CA4           CA5 
+ 2.220446e-16 -1.276756e-15 -1.054712e-15  1.942890e-16  1.387779e-16 
+          CA6           CA7           CA8           CA9          CA10 
+ 1.387779e-16 -1.387779e-17 -1.387779e-16  2.359224e-16  2.775558e-17 
+         CA11          CA12          CA13          CA14          CA15 
+ 1.387779e-16  0.000000e+00  3.469447e-17  2.775558e-17  1.561251e-17 
+         CA16          CA17          CA18          CA19 
+ 0.000000e+00  1.734723e-18  1.127570e-17  1.196959e-16 
+> ## Configurations are similar when site scores are scaled by
+> ## eigenvalues in CA
+> procrustes(ord, ca, choices=1:19, scaling = "sites")
+
+Call:
+procrustes(X = ord, Y = ca, choices = 1:19, scaling = "sites") 
+
+Procrustes sum of squares:
+-4.263e-14 
+
+> plot(procrustes(ord, ca, choices=1:2, scaling="sites"))
+> ## Reconstruction of non-Euclidean distances with negative eigenvalues
+> d <- vegdist(dune)
+> ord <- wcmdscale(d, eig = TRUE)
+> ## Only positive eigenvalues:
+> cor(d, dist(ord$points))
+[1] 0.9975185
+> ## Correction with negative eigenvalues:
+> cor(d, sqrt(dist(ord$points)^2 - dist(ord$negaxes)^2))
+[1] 1
+> 
+> 
+> 
+> ### * <FOOTER>
+> ###
+> options(digits = 7L)
+> base::cat("Time elapsed: ", proc.time() - base::get("ptime", pos = 'CheckExEnv'),"\n")
+Time elapsed:  129.459 0.488 130.001 0 0 
+> grDevices::dev.off()
+null device 
+          1 
+> ###
+> ### Local variables: ***
+> ### mode: outline-minor ***
+> ### outline-regexp: "\\(> \\)?### [*]+" ***
+> ### End: ***
+> quit('no')
diff --git a/tests/oecosimu-tests.R b/tests/oecosimu-tests.R
new file mode 100644
index 0000000..0e8a82b
--- /dev/null
+++ b/tests/oecosimu-tests.R
@@ -0,0 +1,166 @@
+### oecosimu-tests: unit tests for vegan functions
+
+### This file contains unit tests for oecosimu, permatfull and related
+### functions. This file is run in R CMD check and its results are
+### compared against previously saved results in
+### oecosimu-tests.Rout.save. If you change tests, you must generate
+### new oecosimu-tests.Rout.save in this directory.
+
+### The current plan is that tests/ are not included in the CRAN
+### release, but only in the development version of vegan in R-Forge.
+
+### The tests here are not intended for human reading. The tests need
+### not be ecological or biologically meaningful, but they are only
+### intended for testing strange arguments, protect against
+### regressions and test correctness of results.
+
+### The tests are in a single file and you should clean work space
+### after the unit test. You should set random number seed (if needed)
+### for comparison against vegan-tests.Rout.save, and you should
+### remove the seed after the unit test. If possible, avoid very long
+### lasting tests.
+
+### <-- oecosimu/permat specifics -->
+
+### The necessary condition is that fill, row and column sums are honoured. Secondarily we want to keep the simulation results identical when chaning the underlying routines in oecosimu (except experimental method = "backtrack"). The permatfull/swap code can be regarded as more experimental, and we can perhaps there change the simulation results, but not lightly. 
+
+###<--- BEGIN TESTS --->
+suppressPackageStartupMessages(require(vegan))
+set.seed(4711)
+
+### Prior to vegan 2.2-0 these were commsimulator() tests for binary
+### null model, but now commsimulator() is deprecated and calls were
+### replaced with corresponding simulate(nullmodel())
+
+## expect fill, rowSums, colSums
+expect <- data.frame("r00" = c(TRUE, FALSE, FALSE),
+                     "r0" = c(TRUE, TRUE, FALSE),
+                     "r1" = c(TRUE, TRUE, FALSE),
+                     "r2" = c(TRUE, TRUE, FALSE),
+                     "c0" = c(TRUE, FALSE, TRUE),
+                     "swap" = c(TRUE, TRUE, TRUE),
+                     "tswap" = c(TRUE, TRUE, TRUE),
+                     "quasiswap" = c(TRUE, TRUE, TRUE))
+margintest <- function(x, fill, rs, cs) {
+    c(sum(x) == fill,
+      all(rowSums(x) == rs),
+      all(colSums(x) == cs))
+}
+
+## data must be binary! 'sipoo' is (and not transformed) 
+data(sipoo)
+fill <- sum(sipoo)
+rs <- rowSums(sipoo)
+cs <- colSums(sipoo)
+
+for(method in names(expect)) {
+    m <- simulate(nullmodel(sipoo, method = method), thin = 100)
+    cat("--> method:", method, "\n")
+    cat("** margintest:")
+    print(all(margintest(m, fill, rs, cs) == expect[, method]))
+    vegemite(drop(m)) 
+}
+## clean
+rm(list = ls())
+
+### end commsimulator
+
+### set up permatfull/swap tests
+
+data(mite)
+data(mite.env)
+x <- as.matrix(subset(mite, mite.env$Topo == "Blanket"))
+x <- x[, colSums(x) > 0]
+gsum <- sum(x)
+rsum <- rowSums(x)
+csum <- colSums(x)
+fill <- sum(x>0)
+rfrq <- rowSums(x>0)
+cfrq <- colSums(x>0)
+
+margintest <-
+    function(x, gsum, rsum, csum, fill, rfrq, cfrq)
+{
+    cat("grand sum: ")
+    print(all.equal(sum(x), gsum, check.attributes = FALSE))
+    cat("row sums:  ")
+    print(all.equal(rowSums(x), rsum, check.attributes = FALSE))
+    cat("col sums:  ")
+    print(all.equal(colSums(x), csum, check.attributes = FALSE))
+    cat("fill:      ")
+    print(all.equal(sum(x>0), fill, check.attributes = FALSE))
+    cat("row freqs: ")
+    print(all.equal(rowSums(x>0), rfrq, check.attributes = FALSE))
+    cat("col freqs: ")
+    print(all.equal(colSums(x>0), cfrq, check.attributes = FALSE))
+}
+
+### permatfull
+
+set.seed(4711)
+margin <- c("none", "rows", "columns", "both")
+shuffle <- c("ind", "samp", "both")
+
+for(mar in margin) {
+    for(what in shuffle) {
+        cat("\n--> margin", mar, " shuffle", what, "<--\n")
+        set.seed(4711)
+        m <- permatfull(x, fixedmar = mar, shuffle = what, mtype = "count", 
+            times=1)$perm[[1]]
+        margintest(m, gsum, rsum, csum, fill, rfrq, cfrq)
+        print(m[,1:12])
+    }
+}
+
+### permatswap
+set.seed(4711)
+methods <- c("swap", "quasiswap", "swsh", "abuswap")
+margins <- c("rows", "columns", "both")
+shuffle <- c("samp", "both")
+
+incompatible <- function(method, margin)
+{
+    (method == "swap" && margin != "both") ||
+    (method == "abuswap" && margin == "both") ||
+    (method == "quasiswap" && margin != "both") ||
+    (method == "swsh" && margin == "both")
+}
+
+for(method in methods) {
+    for(margin in margins) {
+        for(what in shuffle) {
+            if (incompatible(method = method, margin = margin))
+                next
+            cat("\n*** ", method, " ***\n")
+            cat("--> margin", margin, " shuffle", what, "<--\n")
+            set.seed(4711)
+            m <- permatswap(x, method = method, fixedmar = margin, shuffle = what,
+                             mtype = "count", thin=100, times=1)$perm[[1]]
+            margintest(m, gsum, rsum, csum,fill, rfrq, cfrq)
+            print(m[,1:12])
+        }
+    }
+}
+### end permatswap
+
+nm=nullmodel(m,"abuswap_c")
+sm<-simulate(nm,nsim=100,thin=100,burnin=100)
+
+### clean
+rm(list = ls())
+
+## end permatfull/swap
+
+## The following vegan functions depend on *oecosimu*: adipart
+## hiersimu multipart raupcrick. The following functions directly
+## depend on *commsimulator*: permatfull1 permatswap1.  All these have
+## derived and/or method functions. These should not be broken.
+
+## Do not break raupcrick:
+set.seed(4711)
+data(sipoo)
+as.numeric(raupcrick(sipoo, nsimul = 99))
+rm(list = ls())
+## end raupcrick
+
+
diff --git a/tests/oecosimu-tests.Rout.save b/tests/oecosimu-tests.Rout.save
new file mode 100644
index 0000000..1827843
--- /dev/null
+++ b/tests/oecosimu-tests.Rout.save
@@ -0,0 +1,1982 @@
+
+R version 3.2.3 (2015-12-10) -- "Wooden Christmas-Tree"
+Copyright (C) 2015 The R Foundation for Statistical Computing
+Platform: x86_64-apple-darwin13.4.0 (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> ### oecosimu-tests: unit tests for vegan functions
+> 
+> ### This file contains unit tests for oecosimu, permatfull and related
+> ### functions. This file is run in R CMD check and its results are
+> ### compared against previously saved results in
+> ### oecosimu-tests.Rout.save. If you change tests, you must generate
+> ### new oecosimu-tests.Rout.save in this directory.
+> 
+> ### The current plan is that tests/ are not included in the CRAN
+> ### release, but only in the development version of vegan in R-Forge.
+> 
+> ### The tests here are not intended for human reading. The tests need
+> ### not be ecological or biologically meaningful, but they are only
+> ### intended for testing strange arguments, protect against
+> ### regressions and test correctness of results.
+> 
+> ### The tests are in a single file and you should clean work space
+> ### after the unit test. You should set random number seed (if needed)
+> ### for comparison against vegan-tests.Rout.save, and you should
+> ### remove the seed after the unit test. If possible, avoid very long
+> ### lasting tests.
+> 
+> ### <-- oecosimu/permat specifics -->
+> 
+> ### The necessary condition is that fill, row and column sums are honoured. Secondarily we want to keep the simulation results identical when chaning the underlying routines in oecosimu (except experimental method = "backtrack"). The permatfull/swap code can be regarded as more experimental, and we can perhaps there change the simulation results, but not lightly. 
+> 
+> ###<--- BEGIN TESTS --->
+> suppressPackageStartupMessages(require(vegan))
+> set.seed(4711)
+> 
+> ### Prior to vegan 2.2-0 these were commsimulator() tests for binary
+> ### null model, but now commsimulator() is deprecated and calls were
+> ### replaced with corresponding simulate(nullmodel())
+> 
+> ## expect fill, rowSums, colSums
+> expect <- data.frame("r00" = c(TRUE, FALSE, FALSE),
++                      "r0" = c(TRUE, TRUE, FALSE),
++                      "r1" = c(TRUE, TRUE, FALSE),
++                      "r2" = c(TRUE, TRUE, FALSE),
++                      "c0" = c(TRUE, FALSE, TRUE),
++                      "swap" = c(TRUE, TRUE, TRUE),
++                      "tswap" = c(TRUE, TRUE, TRUE),
++                      "quasiswap" = c(TRUE, TRUE, TRUE))
+> margintest <- function(x, fill, rs, cs) {
++     c(sum(x) == fill,
++       all(rowSums(x) == rs),
++       all(colSums(x) == cs))
++ }
+> 
+> ## data must be binary! 'sipoo' is (and not transformed) 
+> data(sipoo)
+> fill <- sum(sipoo)
+> rs <- rowSums(sipoo)
+> cs <- colSums(sipoo)
+> 
+> for(method in names(expect)) {
++     m <- simulate(nullmodel(sipoo, method = method), thin = 100)
++     cat("--> method:", method, "\n")
++     cat("** margintest:")
++     print(all(margintest(m, fill, rs, cs) == expect[, method]))
++     vegemite(drop(m)) 
++ }
+--> method: r00 
+** margintest:[1] TRUE
+                             
+           SLLS  FS AGH  KMK 
+           v.e.TSl.Fsra Taua 
+           aHdHokafapanRrisu 
+           rohorakarlnsauvtn 
+           tgogvtarhalkgtoai 
+           hhlheashonnhslkhsO
+           oomodLkolddokaaesn
+           llelsealmeelanrvra
+           mmnmhdrmnttmrdiois
+ Pandhali  1...11........1..1
+ Falcsubb  ..1....1.1..1...1.
+ Tetrtetr  1.....1.......1..1
+ Scolrust  ...11.1...1..1.11.
+ Colupalu  1..........1.1...1
+ Cucucano  ...1.1.1.......1..
+ Apusapus  .........1..1.....
+ Picucanu  ..........1.11...1
+ Dryomart  1...1...........11
+ Jynxtorq  ..11..1...1....1..
+ Deliurbi  .....11.1.........
+ Hirurust  .1.......1.11.1.1.
+ Motaalba  .......1....11.1..
+ Anthtriv  1..1...111........
+ Trogtrog  ..1.1...1.....1..1
+ Prunmodu  .....1.1...1..1.11
+ Turdpila  .....1.1......1..1
+ Turdphil  .....1...1....1...
+ Turdmeru  .1....1..1....1...
+ Eritrube  1....1..111.......
+ Oenaoena  .11....1..........
+ Phoephoe  ....1..1....11....
+ Acroarun  ..........1.1....1
+ Acroscir  1...11.....1.....1
+ Hippicte  1....11...1.....1.
+ Sylvatri  ..........1....1..
+ Sylvbori  ..111111.....11.11
+ Sylvcurr  .1.....1..........
+ Sylvcomm  .1..........1.....
+ Phylsibi  .1..1.....1..1..1.
+ Phyltrocs 1.111.............
+ Phyltrocd ....1.1....1.1...1
+ Reguregu  ...1..111.....1..1
+ Muscstri  11.1........1.....
+ Ficehypo  ..1.11.11......111
+ Parumajo  .1....1.....1.....
+ Parucaer  .................1
+ Paruater  ...........1......
+ Parumont  ..1....111...1.1..
+ Cardchlo  ...1......111....1
+ Cardspin  .1..11.1..........
+ Pyrrpyrr  .........1...1...1
+ Loxicurv  .1.......1.1....1.
+ Frincoel  11....1.....11....
+ Sturvulg  .........1.11.1...
+ Orioorio  ......1.....1.....
+ Corvcora  .1...1.....1...1..
+ Garrglan  11................
+  sites species 
+     18      48 
+--> method: r0 
+** margintest:[1] TRUE
+                             
+           SLLS  FS AGH  KMK 
+           v.e.TSl.Fsra Taua 
+           aHdHokafapanRrisu 
+           rohorakarlnsauvtn 
+           tgogvtarhalkgtoai 
+           hhlheashonnhslkhsO
+           oomodLkolddokaaesn
+           llelsealmeelanrvra
+           mmnmhdrmnttmrdiois
+ Pandhali  .........1..1..1.1
+ Falcsubb  .1................
+ Tetrtetr  .......1....1....1
+ Scolrust  ............1.1..1
+ Colupalu  ..1....11.1.....11
+ Cucucano  .....1..1..1.1111.
+ Apusapus  .1..1.......1..111
+ Picucanu  ...........1..1.11
+ Dryomart  .....11......1..11
+ Jynxtorq  ............1.1..1
+ Deliurbi  .....1...1.1.1...1
+ Hirurust  ............1....1
+ Motaalba  ..........11.1...1
+ Anthtriv  ...1......1...1..1
+ Trogtrog  .......1.1..11.111
+ Prunmodu  .........11....1..
+ Turdpila  .......1.........1
+ Turdphil  ............1....1
+ Turdmeru  ....1..1....1...11
+ Turdilia  ..1.......1..1.11.
+ Oenaoena  .....1..1.1.....11
+ Phoephoe  .............11..1
+ Acroarun  .............1....
+ Acroscir  111.......1..11...
+ Hippicte  ...........1....1.
+ Sylvatri  .......1..1...1..1
+ Sylvbori  .........1.11..111
+ Sylvcurr  ......111.....1.11
+ Sylvcomm  ..1..............1
+ Phylsibi  .......1...1....11
+ Phyltrocs .........11...1111
+ Phyltrocd 11...1......1.1...
+ Reguregu  .......1.....1..1.
+ Muscstri  ....1......1....11
+ Ficehypo  .............11111
+ Parumajo  1.1......1..1...1.
+ Parucaer  ...............111
+ Paruater  1...1...1.....111.
+ Parumont  ..............1.1.
+ Cardchlo  ...1..........1111
+ Cardspin  ....1............1
+ Pyrrpyrr  ......1..11....111
+ Loxicurv  ..........1..1..1.
+ Frincoel  .............1..11
+ Sturvulg  .....1.1.......111
+ Orioorio  ......1...11....1.
+ Corvcoro  ........1......111
+ Corvcora  ....1.....11.1111.
+ Garrglan  ...............111
+  sites species 
+     18      49 
+--> method: r1 
+** margintest:[1] TRUE
+                             
+           SLLS  FS AGH  KMK 
+           v.e.TSl.Fsra Taua 
+           aHdHokafapanRrisu 
+           rohorakarlnsauvtn 
+           tgogvtarhalkgtoai 
+           hhlheashonnhslkhsO
+           oomodLkolddokaaesn
+           llelsealmeelanrvra
+           mmnmhdrmnttmrdiois
+ Falcsubb  .............1....
+ Tetrtetr  ....1.........1.1.
+ Scolrust  .............1.1.1
+ Colupalu  ................11
+ Apusapus  ..........1.1...11
+ Picucanu  ................1.
+ Dryomart  ................11
+ Deliurbi  .............11.11
+ Hirurust  .................1
+ Motaalba  .....111....1.1111
+ Anthtriv  ..1.............11
+ Trogtrog  ............1....1
+ Prunmodu  .......1...1....11
+ Turdpila  ...........1....1.
+ Turdphil  .....1.......1.111
+ Turdmeru  .....1.1.1.1.11111
+ Turdilia  ....1...1.111...11
+ Eritrube  ..........1.1..111
+ Oenaoena  1.1............1.1
+ Phoephoe  .......1..1.......
+ Acroarun  .................1
+ Acroscir  .....1.1..11....1.
+ Hippicte  ......1.1....1..1.
+ Sylvatri  ............1....1
+ Sylvbori  .1..........1.1111
+ Sylvcurr  ....1.1...1....1.1
+ Sylvcomm  .........1.....1.1
+ Phylsibi  .....1...11...11.1
+ Phyltrocs .........11.1.1111
+ Phyltrocd .............11.11
+ Reguregu  11.11..1...11.1.11
+ Muscstri  .............11111
+ Parumajo  11.....11.1111.111
+ Parucaer  .............1..11
+ Paruater  ........1.....1...
+ Parumont  ..........1......1
+ Cardchlo  .......1........1.
+ Cardspin  .....1..1111.11111
+ Pyrrpyrr  ................1.
+ Loxicurv  ..1...1..1....11..
+ Frincoel  .1111..111.1111111
+ Sturvulg  .........11..1..11
+ Orioorio  ..............1.1.
+ Corvcoro  1.1.1..1..11111111
+ Corvcora  .................1
+ Garrglan  .................1
+  sites species 
+     18      46 
+--> method: r2 
+** margintest:[1] TRUE
+                             
+           SLLS  FS AGH  KMK 
+           v.e.TSl.Fsra Taua 
+           aHdHokafapanRrisu 
+           rohorakarlnsauvtn 
+           tgogvtarhalkgtoai 
+           hhlheashonnhslkhsO
+           oomodLkolddokaaesn
+           llelsealmeelanrvra
+           mmnmhdrmnttmrdiois
+ Pandhali  ..........1.....11
+ Falcsubb  ...............1..
+ Tetrtetr  .................1
+ Scolrust  ................11
+ Cucucano  ................1.
+ Apusapus  ................11
+ Jynxtorq  ..............1..1
+ Deliurbi  .................1
+ Hirurust  ............111..1
+ Motaalba  1.1..1....1.111111
+ Anthtriv  .1.........11..111
+ Trogtrog  ..........1..11.11
+ Prunmodu  .........1..1...11
+ Turdpila  ..........1...1.11
+ Turdphil  1...1..1....1..111
+ Turdmeru  .11.1.11...1.11111
+ Turdilia  .....1....1.....11
+ Eritrube  .....11.11..1.1111
+ Oenaoena  ..1.......11....1.
+ Acroscir  .................1
+ Hippicte  .......1..........
+ Sylvbori  .......1.......111
+ Sylvcurr  .1.1.....1.1111111
+ Sylvcomm  .............1..11
+ Phylsibi  ..............1111
+ Phyltrocs 11..1..11111111111
+ Phyltrocd ...........1...111
+ Reguregu  ..1.11111111111111
+ Muscstri  ..........1.....11
+ Ficehypo  ................1.
+ Parumajo  .......11111111111
+ Parucaer  ...............1.1
+ Parumont  ................11
+ Cardchlo  .................1
+ Cardspin  ....1..1.111.11111
+ Loxicurv  .............1...1
+ Frincoel  1..111.1111.111111
+ Sturvulg  .......1.....11.11
+ Corvcoro  ..1..11.1.11111111
+ Garrglan  ................1.
+  sites species 
+     18      40 
+--> method: c0 
+** margintest:[1] TRUE
+                             
+           SLLS  FS AGH  KMK 
+           v.e.TSl.Fsra Taua 
+           aHdHokafapanRrisu 
+           rohorakarlnsauvtn 
+           tgogvtarhalkgtoai 
+           hhlheashonnhslkhsO
+           oomodLkolddokaaesn
+           llelsealmeelanrvra
+           mmnmhdrmnttmrdiois
+ Pandhali  ............1.....
+ Falcsubb  ..1...............
+ Tetrtetr  ........1...1.....
+ Scolrust  ...1....1.........
+ Colupalu  .1................
+ Cucucano  ........1.........
+ Apusapus  ....1.............
+ Picucanu  ............1.....
+ Dryomart  ...1..............
+ Jynxtorq  1.................
+ Deliurbi  ............1.1...
+ Hirurust  .1.......1..11....
+ Motaalba  1..1..11.11.11..11
+ Anthtriv  ....111....1......
+ Trogtrog  .........1..11....
+ Prunmodu  ..11..1...........
+ Turdpila  .....1.....1......
+ Turdphil  ..11....1....1...1
+ Turdmeru  11..1...1.1111111.
+ Turdilia  .1.1..111..1......
+ Eritrube  .1111.1.....1...1.
+ Oenaoena  1....11.....1.....
+ Phoephoe  ......1...........
+ Acroarun  ....1.............
+ Acroscir  1.......1.........
+ Hippicte  ..1........1......
+ Sylvatri  .1................
+ Sylvbori  ......11...1.....1
+ Sylvcurr  1...11.11...1111..
+ Sylvcomm  ...........11...1.
+ Phylsibi  ..1....1...1.....1
+ Phyltrocs .11.1.1.1111111..1
+ Phyltrocd 11.............1..
+ Reguregu  .1..1.111111.111.1
+ Muscstri  .1......1.1.......
+ Ficehypo  ...1......1.......
+ Parumajo  .1..11.1.111...11.
+ Parucaer  ....1....1........
+ Paruater  ............1.....
+ Parumont  .....1......1.....
+ Cardchlo  1.1...............
+ Cardspin  1.1111111...11.11.
+ Pyrrpyrr  .1................
+ Loxicurv  1.......1.........
+ Frincoel  111111111111111111
+ Sturvulg  ..........1...1..1
+ Orioorio  ....1.............
+ Corvcoro  .111111111.111.1.1
+ Corvcora  .....1............
+ Garrglan  ..1...............
+  sites species 
+     18      50 
+--> method: swap 
+** margintest:[1] TRUE
+                             
+           SLLS  FS AGH  KMK 
+           v.e.TSl.Fsra Taua 
+           aHdHokafapanRrisu 
+           rohorakarlnsauvtn 
+           tgogvtarhalkgtoai 
+           hhlheashonnhslkhsO
+           oomodLkolddokaaesn
+           llelsealmeelanrvra
+           mmnmhdrmnttmrdiois
+ Pandhali  ............1.....
+ Falcsubb  .......1..........
+ Tetrtetr  .............1...1
+ Scolrust  ............1...1.
+ Colupalu  .................1
+ Cucucano  ................1.
+ Apusapus  .................1
+ Picucanu  ...........1......
+ Dryomart  ...............1..
+ Jynxtorq  .............1....
+ Deliurbi  ................11
+ Hirurust  .........1.....111
+ Motaalba  1.1....1.11.1111.1
+ Anthtriv  ..........1...1.11
+ Trogtrog  .......1........11
+ Prunmodu  ..........1.....11
+ Turdpila  ................11
+ Turdphil  .............11111
+ Turdmeru  11....111..11.1111
+ Turdilia  ....11....1....111
+ Eritrube  ........1.1.1.1111
+ Oenaoena  ....1........1..11
+ Phoephoe  .............1....
+ Acroarun  .................1
+ Acroscir  ..............1.1.
+ Hippicte  ................11
+ Sylvatri  .................1
+ Sylvbori  ....11..........11
+ Sylvcurr  ..1.1..1.1...11111
+ Sylvcomm  .............1..11
+ Phylsibi  .............1111.
+ Phyltrocs 1....111.1111.1111
+ Phyltrocd .....1.........1.1
+ Reguregu  .1...1..1111111111
+ Muscstri  ..............1.11
+ Ficehypo  ......1..........1
+ Parumajo  .......11.111.1111
+ Parucaer  ............1...1.
+ Paruater  .............1....
+ Parumont  ..........11......
+ Cardchlo  ..........1.....1.
+ Cardspin  ..1....11111111111
+ Pyrrpyrr  ................1.
+ Loxicurv  ...............1.1
+ Frincoel  111111111111111111
+ Sturvulg  ..............1.11
+ Orioorio  .................1
+ Corvcoro  .1111..1.111111111
+ Corvcora  .................1
+ Garrglan  ...........1......
+  sites species 
+     18      50 
+--> method: tswap 
+** margintest:[1] TRUE
+                             
+           SLLS  FS AGH  KMK 
+           v.e.TSl.Fsra Taua 
+           aHdHokafapanRrisu 
+           rohorakarlnsauvtn 
+           tgogvtarhalkgtoai 
+           hhlheashonnhslkhsO
+           oomodLkolddokaaesn
+           llelsealmeelanrvra
+           mmnmhdrmnttmrdiois
+ Pandhali  .................1
+ Falcsubb  1.................
+ Tetrtetr  ................11
+ Scolrust  ......1..........1
+ Colupalu  .................1
+ Cucucano  ................1.
+ Apusapus  .............1....
+ Picucanu  .................1
+ Dryomart  ..............1...
+ Jynxtorq  .............1....
+ Deliurbi  ................11
+ Hirurust  .......1...1.1..1.
+ Motaalba  111.1..1..111...11
+ Anthtriv  ............1.11.1
+ Trogtrog  ...........1....11
+ Prunmodu  ...............111
+ Turdpila  ................11
+ Turdphil  ..........1..1.111
+ Turdmeru  .......11111111111
+ Turdilia  ............111111
+ Eritrube  ........1..11.1111
+ Oenaoena  ..1....1.....1..1.
+ Phoephoe  ..........1.......
+ Acroarun  .................1
+ Acroscir  ..........1.....1.
+ Hippicte  ................11
+ Sylvatri  .................1
+ Sylvbori  ............1..111
+ Sylvcurr  .....1.11.1.1.1111
+ Sylvcomm  .............11..1
+ Phylsibi  ..............1111
+ Phyltrocs ....111..111111111
+ Phyltrocd ..............1.11
+ Reguregu  .11.11....11111111
+ Muscstri  ..............1.11
+ Ficehypo  ...............11.
+ Parumajo  .1...1.1111...1.11
+ Parucaer  .......1..1.......
+ Paruater  .................1
+ Parumont  ...............1.1
+ Cardchlo  ...............11.
+ Cardspin  1.1.1..1..11111111
+ Pyrrpyrr  ................1.
+ Loxicurv  .........11.......
+ Frincoel  111111111111111111
+ Sturvulg  .........1...1..1.
+ Orioorio  .........1........
+ Corvcoro  ...1111111.1111111
+ Corvcora  .................1
+ Garrglan  .................1
+  sites species 
+     18      50 
+--> method: quasiswap 
+** margintest:[1] TRUE
+                             
+           SLLS  FS AGH  KMK 
+           v.e.TSl.Fsra Taua 
+           aHdHokafapanRrisu 
+           rohorakarlnsauvtn 
+           tgogvtarhalkgtoai 
+           hhlheashonnhslkhsO
+           oomodLkolddokaaesn
+           llelsealmeelanrvra
+           mmnmhdrmnttmrdiois
+ Pandhali  ...........1......
+ Falcsubb  .................1
+ Tetrtetr  ................11
+ Scolrust  .......1........1.
+ Colupalu  .................1
+ Cucucano  ................1.
+ Apusapus  .................1
+ Picucanu  ............1.....
+ Dryomart  ................1.
+ Jynxtorq  .................1
+ Deliurbi  ..........1....1..
+ Hirurust  .........1.1..1..1
+ Motaalba  .1.....1111..11111
+ Anthtriv  .........1....1.11
+ Trogtrog  ............11...1
+ Prunmodu  ..........11.....1
+ Turdpila  ................11
+ Turdphil  ........1....11.11
+ Turdmeru  ..1.1.11..1.111111
+ Turdilia  ...1.....1..11..11
+ Eritrube  .1.....1..1.1..111
+ Oenaoena  .......1....1...11
+ Phoephoe  .................1
+ Acroarun  .................1
+ Acroscir  ..............1.1.
+ Hippicte  ................11
+ Sylvatri  .................1
+ Sylvbori  ..........1....111
+ Sylvcurr  .....1.1..111.1111
+ Sylvcomm  .............11.1.
+ Phylsibi  ..........1.1.11..
+ Phyltrocs 1.1.11.1..1.111111
+ Phyltrocd ...........1....11
+ Reguregu  1...11.1..11111111
+ Muscstri  ...............111
+ Ficehypo  .............1..1.
+ Parumajo  ..1.....11.1.11111
+ Parucaer  1..............1..
+ Paruater  ...............1..
+ Parumont  ..........1......1
+ Cardchlo  ................11
+ Cardspin  ..1.11..11.1111111
+ Pyrrpyrr  ................1.
+ Loxicurv  ................11
+ Frincoel  111111111111111111
+ Sturvulg  ......1........1.1
+ Orioorio  .............1....
+ Corvcoro  .1..11111111.11111
+ Corvcora  ................1.
+ Garrglan  ..............1...
+  sites species 
+     18      50 
+> ## clean
+> rm(list = ls())
+> 
+> ### end commsimulator
+> 
+> ### set up permatfull/swap tests
+> 
+> data(mite)
+> data(mite.env)
+> x <- as.matrix(subset(mite, mite.env$Topo == "Blanket"))
+> x <- x[, colSums(x) > 0]
+> gsum <- sum(x)
+> rsum <- rowSums(x)
+> csum <- colSums(x)
+> fill <- sum(x>0)
+> rfrq <- rowSums(x>0)
+> cfrq <- colSums(x>0)
+> 
+> margintest <-
++     function(x, gsum, rsum, csum, fill, rfrq, cfrq)
++ {
++     cat("grand sum: ")
++     print(all.equal(sum(x), gsum, check.attributes = FALSE))
++     cat("row sums:  ")
++     print(all.equal(rowSums(x), rsum, check.attributes = FALSE))
++     cat("col sums:  ")
++     print(all.equal(colSums(x), csum, check.attributes = FALSE))
++     cat("fill:      ")
++     print(all.equal(sum(x>0), fill, check.attributes = FALSE))
++     cat("row freqs: ")
++     print(all.equal(rowSums(x>0), rfrq, check.attributes = FALSE))
++     cat("col freqs: ")
++     print(all.equal(colSums(x>0), cfrq, check.attributes = FALSE))
++ }
+> 
+> ### permatfull
+> 
+> set.seed(4711)
+> margin <- c("none", "rows", "columns", "both")
+> shuffle <- c("ind", "samp", "both")
+> 
+> for(mar in margin) {
++     for(what in shuffle) {
++         cat("\n--> margin", mar, " shuffle", what, "<--\n")
++         set.seed(4711)
++         m <- permatfull(x, fixedmar = mar, shuffle = what, mtype = "count", 
++             times=1)$perm[[1]]
++         margintest(m, gsum, rsum, csum, fill, rfrq, cfrq)
++         print(m[,1:12])
++     }
++ }
+
+--> margin none  shuffle ind <--
+grand sum: [1] TRUE
+row sums:  [1] "Mean relative difference: 0.4053168"
+col sums:  [1] "Mean relative difference: 1.1797"
+fill:      [1] "Mean relative difference: 0.5960133"
+row freqs: [1] "Mean relative difference: 0.5960133"
+col freqs: [1] "Mean relative difference: 0.6122867"
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       8    6    5    2    5       2    3    2    3    4     1    6
+9       4    3    4   11    2       5    3    4    3    2     6    3
+11      7    3    5    2    2       4    3    3    6    5     2    2
+14      2    7    1    3    5       1    4    5    7    6     8    6
+15      6    1    4    6    1       2    6    2    3    4     1    3
+19      4    6    2    5    5       8    4    7    3    5     3    3
+25      3    4    8    4    3       2    5    1    2    4     5    4
+30      2    5    4    3    1       4    2    8    5    2     2    1
+32      2    2    5    3    5       4    5    4    4    4     4    5
+33      1    4    3    2    2       7    4    1    3    3     2    1
+34      1    3    1    4    4       2    4    7    2    5     5    2
+35      4    5    3    8   10       6    2    6    5    1     6    3
+36      5    2    3    5    5       4    2    5    2    2     3    5
+37      2    5    5    5    5       1    6    5    3    3     1    2
+38      2    5    5    4    2       3    2    8    2    4     5    3
+39      2    8    7    2    2       4    5    5    6    2     1    5
+40      4    4    3    4    3       3    4    0    2    1     4    5
+41      5    7    5    3    4       3    2    2    6    4     2    6
+42      5    7    1    6    3       5    2    2    0    5     4    5
+43      8    7    2    4    1       1    4    2    2    1     7    3
+44      2    6    3    4    7       4    1    8    1    2     4    9
+45      6    4    3    1    5       3    3    3    3    1     6    5
+46      1    3    2    9    2       2    0    6    3    4     4    2
+47      5    7    5    4    3       8    2    4    1    5     5    5
+48      4    2    3    8    3       5    3    7    5    1     4    3
+49      6    4    1    3    5       4    3    3    3    3     6    2
+50      4    2    0    4    4       3    1    3    6    2     2    2
+51      1    1    3    2    4       1    3    5    2    5     6    5
+52      4    3    5    3    5       5    2    6    3    2     4    5
+53      3    4    9    5    2       0    2    5    3    3     2    2
+54      7    0    6    3    4       6    4    6    4    6     2    5
+55      0    5    2    8    5       3    4    6    2    4     3    2
+56      3    1    5    5    1       2    5    2    6    3     2    4
+57      3    5    5    2    1       4    4    5    4    3     5    2
+58      4    7    5    6    3       3    2    1    2    3     1    7
+59      2    3    1    0    5       5    2    6    4    5     6    6
+60      3    1    4    5    4       8    6    3    2    6     3    5
+61      4    4    2    4    4       6    6    6    6    4     6    4
+62      6    4    4    0    5       1    3    4    3    7     0    5
+63      4    5    2    3    2       3    4    4    2    3     3    2
+64      5    3    3    4    5       3    4    2    3    3     3    4
+66      2    6    3    4    2       4    1    5    2    1     5    5
+67      4    1    2    4    3       3    4    4    1    5     2    1
+68      3    5    6    3    6       4    4    4    1    6     1    1
+
+--> margin none  shuffle samp <--
+grand sum: [1] TRUE
+row sums:  [1] "Mean relative difference: 0.6473947"
+col sums:  [1] "Mean relative difference: 1.243225"
+fill:      [1] TRUE
+row freqs: [1] "Mean relative difference: 0.3908451"
+col freqs: [1] "Mean relative difference: 0.6542373"
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       0    1    0    3    0       0    0    0    0   73     0    0
+9       0    7    0    0    0       1    1    1    1    0     0    0
+11      0    0    0    0    0       0    0    0    1    0     2    0
+14      0    0    0   30    0       0    1    1    0    0     1    0
+15      2    3    4    0    0       1    1    0    0    0     8    0
+19      3    0    0    0    0       0   55    0    0    1     0    0
+25      3    0    0   20    0       0    0    8    7    0     0   56
+30      0    0    0    0    3      17    0    0    0    0     0    0
+32      0    0    7   17    1       0    1    2    2    0     3    0
+33     16    0    3    0    3       0    2    7    0    0     0    0
+34      2    0    0    8    0       1    0    0    2    2     0    0
+35      0    1    0    0   26       0    0    0    0    0     0    0
+36      0    1   20    6    0       2    0    0   34    1     0    2
+37      0    0    8    0   16       2    0    0    0    5     3   14
+38      0    0    0    1    0      17    0    0    0    0     0    3
+39      0    2    0    0    0       0    2    0    0    3     6    0
+40      0    0    0    0   24       0    0    0    1   12     7    2
+41      3   28    2    0    6       0    0    0    7    0     0    0
+42      0    0    9    1    0       0   57    1    3    0     0    0
+43      0    0    0    0    6       5    0    2    0    1     0    4
+44      0    1    0    0    0       0    0    0   17    0    15    0
+45      0    0    1   18    0       0    6    2    0    1     0    2
+46      0   20    0    1    0       0   10    2   10    5    23    0
+47      0    0    0    9    0       0    0   39    0    0     1    1
+48      0    3    2   14    0       0   21    1    0    0     2    0
+49      0    0   12    5    0       0    5    1    0    4     5    0
+50      0    0    1    5    0       8    0    0    0    0     0    0
+51      0    0    5    0   40      16    1    0    0    0     0    0
+52      0    0    0    0    0       0    0    0    0    2    18    0
+53      0    0    0    0    0       4    0    0    0    0     3    0
+54      2   20    0    0    4       0   12    0    0    0     0    0
+55      5    0    0   11    0       0    3    8    1    0     0    0
+56      0    0    0    0    0       0    0    0    0    0     0    2
+57      0    0    1    0    3       1    0    0    0    0     0   37
+58      1    9    0    0    0       4    0    0    0    0     0    3
+59      0    0    4    5    0       0   18    0    2    0     2    2
+60      5    0    1    0    5       2    0    1    2    3     0    0
+61      2    2    1    0   54       1    1    1    0    0     0    2
+62      0    0   20    2    0       5   26    0    3   15     8    0
+63      0    1    0    0    0       0    0    2    0    0     0    0
+64      0   22   44    0    4       1    9    5    2    0     1    6
+66      0    0    0    0    0       2    3    0    0    7     0    1
+67      5    6    0    0    1       0    0    0    5    0     0    0
+68     12    0    0    0    0       0    1    8    1    0     7    2
+
+--> margin none  shuffle both <--
+grand sum: [1] TRUE
+row sums:  [1] "Mean relative difference: 0.4389986"
+col sums:  [1] "Mean relative difference: 1.20342"
+fill:      [1] TRUE
+row freqs: [1] "Mean relative difference: 0.3670669"
+col freqs: [1] "Mean relative difference: 0.5723684"
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       0    7    9    7    6      12    0   10    0    0     0    0
+9      10    0   12    0   11       0    8    0    7    0     7    0
+11      6   14    9    0    6       0   12    0    0    7     0   11
+14      0   13    7    0    0       0    0    0    0    0     0   10
+15     15    0    0    0    9       0   11    0   16   11     0    0
+19      0    8    9    8    0       0   11   12    9    0    12    0
+25      0   12    7   10    0       7   12    0    0   10     0   12
+30      7    0    0    8    0      10    0    8    9    0     0    0
+32      8    0    0    0    0       0   11    0    0    0     0    0
+33     11    6    0    8    0       9    0    0    0    0     0    0
+34      0   15    9    7    0      13    5    7    0   11     0    0
+35     11    0    0    0    0       9    0    0    5    0     0    0
+36      0    0   10    9    9       0    0    9    0    7     4    0
+37      9    0    0   13    0       8    0    0    0    0     0    0
+38     10    7   10    9   10       0   10    0   14   11     6    0
+39      8    0    0    9    0       0    0    0    0   10     0    8
+40      0    8    0    0    0       0   12    0    0    0    11    0
+41      0    0   11    0   13       0    5   10   13    0     0   13
+42      0    7    7    0    0      11   16   11   11   14     0    7
+43      9   11    0    0    6       0    0    0    0    0    11   13
+44      9    0    0    7   14       8    0    7   10    0     7    0
+45      0    0    0    0    0       0    7    0   11    0     0    0
+46      9    9    0    0    0       9    7    0    0    0     0    0
+47      0    7    0    7   10       0    7   10   11    0     0    0
+48      9    7    0    9   12       0   12    8    7   10    10    0
+49      0    0    8    0    0       6    0    0    0    0     0    0
+50      0    0    9   11    8      15    0    0   15    9     0    7
+51      0    0    0    0    0      10    0    0    0    6     0   17
+52      0    8    0    0    3       0    0   10    8    0     0   10
+53      0    0    0    0    0       0   12    7    0    0    10    8
+54      9    6   10    0    6       6    0    0    7   14     0    0
+55      7    0    0    0    0       9    0    0   12    0     0    0
+56      0    0    8    0    0      17   10    8    0    0     0    0
+57      0   13    0    0   17      11   16    0    0    8     8   11
+58      0    4   12    0    6       0    0    0    0   15    12    8
+59      0    7    0    0    0       0    9    0    0   10     0   12
+60      0   10    0    0    0       7    0    0    0    0     0    0
+61      0    0   16    7    0      10    0    6    0    0     0    0
+62     11    0    4    0    5       9   11    8    0   12     0    9
+63      0    0    0    0    6       0    0    0    9   11     0    0
+64      0    0    2    7    0       0    0    0   10    3     0    0
+66      0    0    0    0    5       0   11    0    0    0     0    8
+67      0    0    0   11    0       0    9    0    6    0     8    0
+68     13    0    0    0    0       0    9    0    0    0     0   10
+
+--> margin rows  shuffle ind <--
+grand sum: [1] TRUE
+row sums:  [1] TRUE
+col sums:  [1] "Mean relative difference: 1.1797"
+fill:      [1] "Mean relative difference: 0.5715292"
+row freqs: [1] "Mean relative difference: 0.5715292"
+col freqs: [1] "Mean relative difference: 0.6076233"
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       7    4    6    2    6       4    2    2    2    1     1    4
+9       4    2    2    4    5       4    5    1    4    3     5    3
+11      5    6    4    2    6       6    1    8    2    9    11    5
+14      9   12    6    9    4       6    6    7    5   10     7    4
+15      4    4    3    2    2       2    3    7    4    3     3    1
+19      0    2    4    4    4       3    4    2    2    4     1    5
+25      5    1    3    4    0       1    3    5    4    4     5    2
+30      3    0    3    2    1       7    4    3    2    1     4    0
+32      4    3    3    1    1       4    1    4    3    1     1    3
+33      4    4    2    4    3       5    2    7    1    8     4    1
+34      3    7    3    8    4       9    5    6    4    7     5    5
+35      3    1    4    3    5       2    2    3    4    2     5    4
+36      2    3    4    2    1       4    6    1    2    1     4    6
+37      2    9    1    4    6       2    4    2    5    6     3    2
+38      4    8    1    4    5       7    3    3    9    5     3    9
+39      1    4    4    1    4       1    3    1    6    5     3    2
+40      3    3    5    9    1       4    7    5    7    6     1    2
+41      4    3    3    3    3       2    2    0    3    1     4    2
+42      4    4    6    3    1       5    3    2    6    4     3    3
+43      3    3    6    2    8       4    6    4    4    5     1    4
+44      2    2    0    1    2       2    3    0    2    1     2    3
+45      6    7    3    8    3       2    2    4    5    8     1    4
+46      5    4    7    2    2       5    3    7    6    7     3    4
+47      4    4    3    3    1       5    2    3    4    6     5    4
+48      5    4    4    4    3       1    3    4    0    4     2    4
+49      2    6    1    1    0       1    6    5    3    2     1    2
+50      3    4    6    4    6       1    6    6    4    5     5    4
+51      0    2    2    7    3       3    4    5    7    4     3    5
+52      2    3    8    1    7       2    4    3    3    5     2    3
+53      5    7    3    5    3       5    3    6    7    4     4    5
+54      1    0    3    1    0       2    3    1    1    1     1    0
+55      0    1    2    2    3       5    0    1    2    0     2    3
+56      2    4    2    2    2       2    2    3    7    1     3    5
+57      0    1    0    0    0       0    1    0    0    1     0    0
+58      5    3    3    4    2       5    9    3    4    3     3    2
+59      7    2    2    2    4       3    0    1    2    1     3    3
+60      5    7    3    4    6       2    3    3    7    1     6    2
+61      2    0    1    1    1       1    1    1    1    2     1    4
+62      0    0    0    0    0       0    1    0    0    1     0    1
+63      3    2    0    3    3       2    2    1    1    0     4    1
+64      2    3    6    3    2       3    2    1    2    1     0    1
+66      2    1    6    2    4       2    2    4    5    1     1    2
+67     15   24   21   18   36      22   25   21   18   21    19   28
+68      6    4    4    2    0       4    6    1    1    1     4    6
+
+--> margin rows  shuffle samp <--
+grand sum: [1] TRUE
+row sums:  [1] TRUE
+col sums:  [1] "Mean relative difference: 1.173485"
+fill:      [1] TRUE
+row freqs: [1] TRUE
+col freqs: [1] "Mean relative difference: 0.6414474"
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       0    1    0    2    1       3    1    1    0    8     4    0
+9       1    3    0    0    1       0    2   19   20    0     9    0
+11      0    7   42    2   36       1    1    1    3    0    35   17
+14      8   12    0   24    3       0    2   20    0   41     1    5
+15      7    0    0    0    0       1    8    0    0    0     1    0
+19     14    0    1    0    0       2    0    2   10    0     0    0
+25     32    0    0    0    0       0    0    2    2    0     0    2
+30      0   18    0    0   20       1    0    7    1    0     2    0
+32      0    0    5    0    9       2    4    0    2    5     0    0
+33      2    0    0   23    0       0    1    0    1   38     1    1
+34      0    2   22   39    2       1    1    0    1    0     9    0
+35      0    0    1    0    4       2    1    0    2    0     3   21
+36      2   12    0    0    0       3    0    1    0    0     3    0
+37      0    0    0    0    1       3    0   22    2    0     0    2
+38      0    0    0    0   15       4    1    0    0    1     8    0
+39      0    0    0    0    0       0   40    3    0    0     0    0
+40     26   65    0    0    0       0    1    5    0    0     0    0
+41      0    5    0    0    0       2    0    0    0    0     0    1
+42      0    1    0    0    0       0    0    7    6    0     0    0
+43      0    0    1    3    7       0    0    0   16   14     0    0
+44      0    0   28    0    0       0    0    0    0    0     0    0
+45     11    0    1    1    1       0    0    4    1   52     6    6
+46      0    0    0   12    4       1    0   28   42    0     5    4
+47      0    1    0    1   24       0   20    0    0    0     0    0
+48     10    0    0    3    0      53    0   29    0    0     0    4
+49      7    0    7    0   17       0    0    0    0    1     0    0
+50      8    0   14    3    2       0    0    0    0    0     0    0
+51      3    0    0    3    0       0    0    0    0    0     0    1
+52     46    0    0    0    0       3    0    0    0    0     1    0
+53      3    0    0    0    0      10   17    0    0   25     0    2
+54      0    0    0    0    0       0    1    0    0    0     0    0
+55      0    0    0    0    0       0    5    0    0    0     0    0
+56      0   54    3    0    0      17    0    0    0    0     0    0
+57      0    0    0    0    0       0    0    0    0    0     1    2
+58      1    1    0    2    0       0    1    0   12    0    57    0
+59      0    0    0    0    0       0    0    2    0    0     0   29
+60      0    1    0    0    4       0   28    1    1   16    55    0
+61      0    0    5    3    9       0    0    0    0    0     0    0
+62      0    0    0    0    3       2    0    0    1    0     1    0
+63      0    2    2    2    0       0   19    8    0    0     0    1
+64      0    0    1    0    0       0    0    4    0    3     0    0
+66      0    0    0    0    0       0    1    0    3    0     9   21
+67      0    4    0   11    0       7    0    0    0  723     0    0
+68      0    0    0    3    1       0    0   22    0    3     0    0
+
+--> margin rows  shuffle both <--
+grand sum: [1] TRUE
+row sums:  [1] TRUE
+col sums:  [1] "Mean relative difference: 1.251856"
+fill:      [1] TRUE
+row freqs: [1] TRUE
+col freqs: [1] "Mean relative difference: 0.6503497"
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       6    0    6    0    0       9    4    0    0    4     0   10
+9       0    6    8    3    9       0    0    0    0    0     9    6
+11      5    6    0    0   10       0    4    5    7    0    11    0
+14      9    0   12    8   13       0    0   13   13   13    15    0
+15      0    6    0    4    0       6    2    0    0    0     8    7
+19      4    0    0    6    2       8    3    0    0    0     3    4
+25      0    0    5    0    3       7    9    7    4    0     0    0
+30      4    3    0    3    0       0    5    6    5    5     3    8
+32      0    8    0    0    3       8    0    2    0   11     0    6
+33     11    0    0    0    0       0    0    0    8   12     0    7
+34     10    9    0    0    9       8   12    0    0    0    10    0
+35      6    5    0    9    0       2    0    0    4    0     0    0
+36      6    5    8    0    0       0    6    0    0    0     4   12
+37      0    0    0    7    8       0    0   12   10    0    13    0
+38      0    8   14   15   14       0    0   13   12    0     0    0
+39      9    0    0    4    8       0    8    0    9    0     0   13
+40      0    0    0    0   10      14    0    0    0    0     0    0
+41      0    3    9    0    0       0    0    0    0    9     7    0
+42     21    0    0    0   12      17    0    0   15    0    15    0
+43      0    0    0    0    0      13   17    0   12    0     0   13
+44      0   13    0    0    0       0    0    0    0   17     0    0
+45      0    0    6   10    9       8    0    8    6   16     0    9
+46      0    0    0    8    9      13    0   12    0    7     0    4
+47     13    5   13    9    0       0    9    0    0    0     6    7
+48      0    0    8    0    0       0    0    0   12   11    12    0
+49      0    7    0   10    0       0    0    8   14    0     7    8
+50      0    0    0   10   13      11    0    0    0    0    18   13
+51      0    5    0    7    0       6    0    0    5    7     0   11
+52      0    0    0    0    5      12    0    0    0    0     0    0
+53      9    0    5    0    7       0    0    8    0    0     0   12
+54      0    0    0   11    0       0    0    0    6    4     5    0
+55      0    0    6    3    0       0    7    8    0    0     9    0
+56     13    0   14    0    0       0    7    0   13    9     0    0
+57      0    0    0    0    0       0    0    1    0    0     0    0
+58     16    0    0   10   10       0    0    9    0    0     0    0
+59      0    0   18    0   13       0    0    0    0    0     0   13
+60      0    0    0    9    0      10   13    0    0    0     0   15
+61      0    0    3    8    0       0    0    0    5    0     0    0
+62      0    3    1    0    1       0    5    0    0    0     0    0
+63      0    0    0    8   10       0    0    0    7    0     0    7
+64      0    0    0    0    0       7    0    5    5    9     0    0
+66      0    6    0    0    9       0    5    0    7    7     0    0
+67      0  136    0    0  147       0  133    0    0    0     0    0
+68      7    0    0    0    0       5    7    0    0    9     0    5
+
+--> margin columns  shuffle ind <--
+grand sum: [1] TRUE
+row sums:  [1] "Mean relative difference: 0.4160623"
+col sums:  [1] TRUE
+fill:      [1] "Mean relative difference: 0.3566138"
+row freqs: [1] "Mean relative difference: 0.406423"
+col freqs: [1] "Mean relative difference: 0.3577495"
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8      12    0    4    0    0       0    1    0    0    1     0    2
+9       7    1   12    0    0       0    1    0    2    3     0    4
+11     10    0   12    1    0       0    2    0    1    4     0    2
+14      4    0   11    0    0       0    1    0    3    1     1    3
+15     10    2   12    3    0       1    3    0    0    5     2    1
+19      7    0    5    0    0       0    5    0    0    4     0    2
+25      5    1   10    0    0       0    3    0    2    7     1    1
+30      4    1    8    1    0       0    0    1    2    3     0    3
+32      5    1   16    0    0       0    2    0    2    3     2    1
+33      3    0   10    0    0       1    1    0    2    4     1    3
+34      3    1   12    0    0       0    2    0    2    5     1    2
+35      8    0    8    0    0       0    1    0    0    3     3    1
+36      9    1    5    0    0       0    2    0    1    6     2    1
+37      5    0    8    0    0       0    2    0    0    5     1    1
+38      4    1    9    2    0       0    1    0    2    3     1    1
+39      4    1   12    1    0       1    1    0    0    4     1    2
+40      7    2   11    0    0       0    2    0    2    2     2    0
+41      9    1   14    0    0       0    4    0    1    7     3    3
+42      8    2    8    0    0       0    2    0    1    4     1    1
+43     13    2   12    0    0       1    3    1    0    2     4    3
+44      4    2    5    0    2       0    1    0    1    4     1    0
+45     10    1    8    1    0       1    3    1    1    3     1    1
+46      3    0    8    0    0       0    3    0    1    2     0    1
+47      8    0    9    0    0       0    2    0    0    1     2    2
+48      7    1    7    0    0       0    1    1    0    5     2    1
+49     10    0   13    2    0       0    0    0    2    3     0    0
+50      8    0    9    0    0       0    3    0    2    6     3    4
+51      3    0    6    2    0       0    1    0    0    7     0    1
+52      7    0    5    0    0       0    3    1    0    5     4    1
+53      6    0   10    0    1       0    3    0    0    6     0    4
+54     11    0   13    0    0       0    1    0    1    4     1    1
+55      0    0   18    0    0       0    1    0    1    2     2    1
+56      6    1   13    1    0       0    2    0    0    5     0    2
+57      6    0    7    0    0       2    0    0    0    3     1    0
+58      8    1   11    1    0       0    2    1    1    6     0    3
+59      4    2   13    0    0       0    0    0    0    2     2    0
+60      6    0   12    0    0       0    1    0    0    3     3    1
+61      8    0    5    1    0       0    3    0    0    5     1    1
+62     10    0   10    0    0       1    2    0    3    6     0    3
+63      8    0    8    0    0       0    1    0    0    3     2    1
+64      9    1   10    0    0       1    3    0    2    3     0    3
+66      4    0    7    0    0       0    3    0    0    7     3    3
+67      8    1   12    0    0       0    4    0    1    8     1    3
+68      8    0   12    0    1       0    6    0    2    4     3    2
+
+--> margin columns  shuffle samp <--
+grand sum: [1] TRUE
+row sums:  [1] "Mean relative difference: 0.6283446"
+col sums:  [1] TRUE
+fill:      [1] TRUE
+row freqs: [1] "Mean relative difference: 0.3269565"
+col freqs: [1] TRUE
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       4    0    3    0    0       1    5    1    0    0     6    2
+9       0    0    4    0    0       0    3    0    3    0     0    0
+11      3    0   16    0    0       0    2    0    2    0     9    1
+14     20    0    2    0    0       0    0    0    0    2     0    0
+15      1    5    8    0    0       0    0    0    0   18     3    1
+19      6    0   14    0    0       0    0    0    2    0     0    0
+25      3    0    9    0    0       0    0    0    0    0     0    2
+30     12    0    8    0    2       0    2    0    0    0     0    1
+32     38    0    3    0    0       0    0    0    0   12     0    2
+33     36    0    5    0    0       0    0    0    0   11     2    3
+34      0    0   16    0    0       0   16    0    0    1     0    1
+35     11    0   12    0    0       0    5    0    7    0     0    0
+36     10    0    0    0    0       0    2    0    0    0     4    1
+37      3    0    3    0    0       2    2    0    0    0    20    0
+38      1    0   16    0    0       0    4    0    3    0     0    0
+39     41    0   37    0    0       0    0    0    3   24     0    0
+40      3    0    9    0    0       0    0    0    0    0     0    0
+41      4    0    2    0    0       0    0    0    4    0     5    5
+42      2    0    0    0    0       0    0    1    0    1     0    0
+43      8    0   10    0    1       1   15    0    0    0     0    2
+44      3    0    2    0    0       0    5    0    0   16     0    1
+45      0    0    5    9    0       0    0    0    0    0     0    0
+46      3    4    6    0    0       0    3    0    1   26     0    1
+47      0    0   10    0    0       0    0    0    0    3     0    4
+48      5    2    7    0    0       1    0    0    4    0     0    2
+49      1    0   14    0    0       1    0    0    0    0     0    1
+50      3    0    8    0    0       0   12    0    0    0     0    9
+51      1    4    2    0    0       0    1    0    0    1     0    0
+52     19    0    2    2    0       0    0    0    0    0     0    0
+53      3    1    6    0    1       2    0    0    1    1     0    3
+54      2    0   22    1    0       1    7    2    2   20     0    2
+55      5    0   35    0    0       0    0    0    2    0     0    1
+56      0    0    4    0    0       0    2    0    1    0     0    0
+57      6    0    5    0    0       0    0    0    0    0     0    0
+58     12    0   31    0    0       0    0    0    0    0     4    2
+59      1    7    0    2    0       0    0    0    0   36     0    0
+60      0    0   17    0    0       0    0    0    0    0     0    7
+61      0    0   12    0    0       0    0    1    3    0     5    4
+62      8    0    0    0    0       0    0    0    1    0     0    1
+63      4    0   18    2    0       0    1    1    2    0     0   10
+64      5    3   15    0    0       0    0    0    0    0     0    0
+66      6    1   12    0    0       0    0    0    0    1     0    1
+67      4    0   17    0    0       0    1    0    0    5     0    6
+68      2    0    3    0    0       0    0    0    0    1     0    0
+
+--> margin columns  shuffle both <--
+grand sum: [1] TRUE
+row sums:  [1] "Mean relative difference: 0.4073882"
+col sums:  [1] TRUE
+fill:      [1] TRUE
+row freqs: [1] "Mean relative difference: 0.3514938"
+col freqs: [1] TRUE
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       6    0   15    0    0       0    6    0    4    5     0    2
+9      14    0   17    0    0       0    0    0    0   11     0    3
+11      8    0   10    4    0       0    0    0    2    0     0    2
+14     12    0   16    0    0       0    0    0    0    0     8    3
+15     12    4    6    0    0       0    4    0    0   15     0    0
+19     11    0    0    0    0       0    4    0    4   11     0    0
+25      0    0   11    0    0       0    0    0    0   15     0    2
+30      5    0    9    0    0       0    0    0    0    0     6    0
+32      8    0   10    0    0       0    0    0    2    0     0    3
+33      7    0   12    0    0       0    0    0    3    7     7    0
+34     11    0    9    0    0       1    0    0    0    0     0    0
+35      9    0   18    0    0       0    3    0    0    0     0    0
+36     12    0   11    2    1       0    0    0    0    0     0    3
+37      8    0   21    0    0       0    3    1    0    0     0    4
+38      8    0    9    0    0       0    0    0    2   10     6    0
+39     12    0   13    4    0       0    7    0    0    0     0    3
+40      5    0   12    0    0       0    6    0    4    0     0    0
+41      0    0   10    0    0       0    0    0    4    0     0    1
+42      9    0    9    0    0       0    0    0    0    0     0    0
+43      0    0   10    0    0       0    0    0    0   11     0    2
+44      7    3    0    0    0       0    3    0    0   12     0    0
+45      8    5    7    2    0       0    1    0    0    0     0    1
+46      7    1   12    0    1       0    4    0    3   14     0    0
+47     10    4    8    0    0       0    4    0    0    0     0    0
+48      5    0   14    0    0       0    0    0    1    0     0    2
+49     10    0    9    0    0       0    0    0    0   13     0    5
+50      0    0    3    0    2       0    7    0    0    8     0    4
+51      0    2   11    0    0       2    0    0    1    7     9    3
+52      0    0   11    0    0       1    6    1    0    6     6    2
+53      5    0   10    0    0       0    4    0    0    0     0    3
+54      4    0    7    0    0       0    0    0    0   13     0    0
+55     10    0   10    4    0       1    6    0    0    0     5    1
+56     10    3   10    0    0       2    0    0    0    0     4    4
+57      8    0    8    0    0       0    0    0    2    0     0    2
+58      4    0    0    0    0       1    4    1    0   10     0    5
+59     13    5    0    0    0       0    0    0    1    0     0    0
+60     11    0    8    0    0       0    0    0    0    0     0    0
+61      5    0    9    0    0       0    0    0    4    0     0    4
+62      6    0    7    0    0       1    0    1    0    0     0    3
+63      0    0   12    0    0       0    0    0    0    0     0    0
+64      4    0   15    0    0       0    8    0    0    0     0    3
+66      6    0   11    0    0       0    0    2    0    0     7    4
+67      8    0    8    0    0       0    8    0    2    0     0    0
+68      1    0   12    0    0       0    0    0    2   11     0    2
+
+--> margin both  shuffle ind <--
+grand sum: [1] TRUE
+row sums:  [1] TRUE
+col sums:  [1] TRUE
+fill:      [1] "Mean relative difference: 0.3059361"
+row freqs: [1] "Mean relative difference: 0.3301435"
+col freqs: [1] "Mean relative difference: 0.3117783"
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       2    0    5    0    0       0    3    0    1    4     1    1
+9       4    1    8    0    0       0    4    0    2    3     0    1
+11     10    2   15    1    0       0    3    0    1    4     5    4
+14     18    3   22    0    0       0    5    0    2   12     2    3
+15      2    1   10    0    0       0    2    1    0    5     0    1
+19      6    0   12    0    0       0    1    0    1    2     1    4
+25      4    1   11    1    0       0    3    0    0    3     0    3
+30      3    0    5    0    0       1    0    0    2    3     0    1
+32      3    0    5    0    0       0    1    0    0    4     1    0
+33      9    0   11    0    0       0    2    1    1    0     2    2
+34     12    0   14    0    0       1    2    0    1    9     1    1
+35      5    1    5    0    0       0    3    0    0    5     0    1
+36      8    0   13    0    0       0    4    0    1    4     2    0
+37      8    3   10    0    0       0    1    0    0    7     1    2
+38      9    0   14    1    0       0    3    0    3    5     2    6
+39      5    1   10    0    0       0    2    0    0    6     0    2
+40      7    1   10    3    0       0    0    0    0    8     2    2
+41      1    0    9    0    0       0    2    0    0    2     0    2
+42      6    0   15    0    0       0    3    0    0    3     3    2
+43      7    1   15    0    1       0    4    0    2    6     2    1
+44      5    0    4    0    0       0    0    0    1    3     0    0
+45      6    0   10    0    0       0    2    0    2    9     2    3
+46     12    0   16    1    0       0    2    1    0    1     3    1
+47      5    0    7    0    0       1    2    0    0    0     0    1
+48      3    0   11    1    0       0    1    0    1    5     1    2
+49      7    0    7    0    0       0    4    0    2    3     1    1
+50      8    2    7    0    0       0    0    1    2    6     1    1
+51      5    0    7    2    0       0    0    0    3    0     0    3
+52      7    2    2    0    1       0    1    0    0    1     1    2
+53      6    0   12    1    0       1    2    0    3    6     1    4
+54      2    0    7    0    0       0    0    0    0    1     0    1
+55      3    0    3    0    0       2    1    0    1    2     0    0
+56      5    0    9    0    0       0    3    0    0    3     2    0
+57      1    0    1    0    0       0    1    0    0    1     0    0
+58     10    0    7    0    0       0    2    0    2    6     1    2
+59      4    1    8    0    0       1    0    0    0    0     1    3
+60      3    1   14    0    0       0    2    0    1    5     2    1
+61      2    0    4    1    0       0    0    0    0    0     0    0
+62      0    0    0    0    0       0    0    0    0    0     0    0
+63      6    1    5    0    0       0    2    0    0    2     0    1
+64      6    0    7    0    0       0    2    0    0    1     4    1
+66      7    1    8    0    0       0    2    0    0    4     1    1
+67     49    4   45    3    2       2   11    1    4   23     9    8
+68      8    0   10    1    0       0    0    1    2    2     3    1
+
+--> margin both  shuffle samp <--
+grand sum: [1] TRUE
+row sums:  [1] TRUE
+col sums:  [1] TRUE
+fill:      [1] "Mean relative difference: 0.3059361"
+row freqs: [1] "Mean relative difference: 0.3301435"
+col freqs: [1] "Mean relative difference: 0.3117783"
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       2    0    5    0    0       0    3    0    1    4     1    1
+9       4    1    8    0    0       0    4    0    2    3     0    1
+11     10    2   15    1    0       0    3    0    1    4     5    4
+14     18    3   22    0    0       0    5    0    2   12     2    3
+15      2    1   10    0    0       0    2    1    0    5     0    1
+19      6    0   12    0    0       0    1    0    1    2     1    4
+25      4    1   11    1    0       0    3    0    0    3     0    3
+30      3    0    5    0    0       1    0    0    2    3     0    1
+32      3    0    5    0    0       0    1    0    0    4     1    0
+33      9    0   11    0    0       0    2    1    1    0     2    2
+34     12    0   14    0    0       1    2    0    1    9     1    1
+35      5    1    5    0    0       0    3    0    0    5     0    1
+36      8    0   13    0    0       0    4    0    1    4     2    0
+37      8    3   10    0    0       0    1    0    0    7     1    2
+38      9    0   14    1    0       0    3    0    3    5     2    6
+39      5    1   10    0    0       0    2    0    0    6     0    2
+40      7    1   10    3    0       0    0    0    0    8     2    2
+41      1    0    9    0    0       0    2    0    0    2     0    2
+42      6    0   15    0    0       0    3    0    0    3     3    2
+43      7    1   15    0    1       0    4    0    2    6     2    1
+44      5    0    4    0    0       0    0    0    1    3     0    0
+45      6    0   10    0    0       0    2    0    2    9     2    3
+46     12    0   16    1    0       0    2    1    0    1     3    1
+47      5    0    7    0    0       1    2    0    0    0     0    1
+48      3    0   11    1    0       0    1    0    1    5     1    2
+49      7    0    7    0    0       0    4    0    2    3     1    1
+50      8    2    7    0    0       0    0    1    2    6     1    1
+51      5    0    7    2    0       0    0    0    3    0     0    3
+52      7    2    2    0    1       0    1    0    0    1     1    2
+53      6    0   12    1    0       1    2    0    3    6     1    4
+54      2    0    7    0    0       0    0    0    0    1     0    1
+55      3    0    3    0    0       2    1    0    1    2     0    0
+56      5    0    9    0    0       0    3    0    0    3     2    0
+57      1    0    1    0    0       0    1    0    0    1     0    0
+58     10    0    7    0    0       0    2    0    2    6     1    2
+59      4    1    8    0    0       1    0    0    0    0     1    3
+60      3    1   14    0    0       0    2    0    1    5     2    1
+61      2    0    4    1    0       0    0    0    0    0     0    0
+62      0    0    0    0    0       0    0    0    0    0     0    0
+63      6    1    5    0    0       0    2    0    0    2     0    1
+64      6    0    7    0    0       0    2    0    0    1     4    1
+66      7    1    8    0    0       0    2    0    0    4     1    1
+67     49    4   45    3    2       2   11    1    4   23     9    8
+68      8    0   10    1    0       0    0    1    2    2     3    1
+
+--> margin both  shuffle both <--
+grand sum: [1] TRUE
+row sums:  [1] TRUE
+col sums:  [1] TRUE
+fill:      [1] "Mean relative difference: 0.3059361"
+row freqs: [1] "Mean relative difference: 0.3301435"
+col freqs: [1] "Mean relative difference: 0.3117783"
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       2    0    5    0    0       0    3    0    1    4     1    1
+9       4    1    8    0    0       0    4    0    2    3     0    1
+11     10    2   15    1    0       0    3    0    1    4     5    4
+14     18    3   22    0    0       0    5    0    2   12     2    3
+15      2    1   10    0    0       0    2    1    0    5     0    1
+19      6    0   12    0    0       0    1    0    1    2     1    4
+25      4    1   11    1    0       0    3    0    0    3     0    3
+30      3    0    5    0    0       1    0    0    2    3     0    1
+32      3    0    5    0    0       0    1    0    0    4     1    0
+33      9    0   11    0    0       0    2    1    1    0     2    2
+34     12    0   14    0    0       1    2    0    1    9     1    1
+35      5    1    5    0    0       0    3    0    0    5     0    1
+36      8    0   13    0    0       0    4    0    1    4     2    0
+37      8    3   10    0    0       0    1    0    0    7     1    2
+38      9    0   14    1    0       0    3    0    3    5     2    6
+39      5    1   10    0    0       0    2    0    0    6     0    2
+40      7    1   10    3    0       0    0    0    0    8     2    2
+41      1    0    9    0    0       0    2    0    0    2     0    2
+42      6    0   15    0    0       0    3    0    0    3     3    2
+43      7    1   15    0    1       0    4    0    2    6     2    1
+44      5    0    4    0    0       0    0    0    1    3     0    0
+45      6    0   10    0    0       0    2    0    2    9     2    3
+46     12    0   16    1    0       0    2    1    0    1     3    1
+47      5    0    7    0    0       1    2    0    0    0     0    1
+48      3    0   11    1    0       0    1    0    1    5     1    2
+49      7    0    7    0    0       0    4    0    2    3     1    1
+50      8    2    7    0    0       0    0    1    2    6     1    1
+51      5    0    7    2    0       0    0    0    3    0     0    3
+52      7    2    2    0    1       0    1    0    0    1     1    2
+53      6    0   12    1    0       1    2    0    3    6     1    4
+54      2    0    7    0    0       0    0    0    0    1     0    1
+55      3    0    3    0    0       2    1    0    1    2     0    0
+56      5    0    9    0    0       0    3    0    0    3     2    0
+57      1    0    1    0    0       0    1    0    0    1     0    0
+58     10    0    7    0    0       0    2    0    2    6     1    2
+59      4    1    8    0    0       1    0    0    0    0     1    3
+60      3    1   14    0    0       0    2    0    1    5     2    1
+61      2    0    4    1    0       0    0    0    0    0     0    0
+62      0    0    0    0    0       0    0    0    0    0     0    0
+63      6    1    5    0    0       0    2    0    0    2     0    1
+64      6    0    7    0    0       0    2    0    0    1     4    1
+66      7    1    8    0    0       0    2    0    0    4     1    1
+67     49    4   45    3    2       2   11    1    4   23     9    8
+68      8    0   10    1    0       0    0    1    2    2     3    1
+> 
+> ### permatswap
+> set.seed(4711)
+> methods <- c("swap", "quasiswap", "swsh", "abuswap")
+> margins <- c("rows", "columns", "both")
+> shuffle <- c("samp", "both")
+> 
+> incompatible <- function(method, margin)
++ {
++     (method == "swap" && margin != "both") ||
++     (method == "abuswap" && margin == "both") ||
++     (method == "quasiswap" && margin != "both") ||
++     (method == "swsh" && margin == "both")
++ }
+> 
+> for(method in methods) {
++     for(margin in margins) {
++         for(what in shuffle) {
++             if (incompatible(method = method, margin = margin))
++                 next
++             cat("\n*** ", method, " ***\n")
++             cat("--> margin", margin, " shuffle", what, "<--\n")
++             set.seed(4711)
++             m <- permatswap(x, method = method, fixedmar = margin, shuffle = what,
++                              mtype = "count", thin=100, times=1)$perm[[1]]
++             margintest(m, gsum, rsum, csum,fill, rfrq, cfrq)
++             print(m[,1:12])
++         }
++     }
++ }
+
+***  swap  ***
+--> margin both  shuffle samp <--
+grand sum: [1] TRUE
+row sums:  [1] TRUE
+col sums:  [1] TRUE
+fill:      [1] TRUE
+row freqs: [1] "Mean relative difference: 0.1074766"
+col freqs: [1] "Mean relative difference: 0.08316008"
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       0    3    0    2    1       0    2    0    0    1     4   10
+9       3    3    2    2    1       1   12    0    0    0     3    6
+11     38    5   35    9    0       0    5    0    1    0     6    2
+14     41    5   15    0    2       0    2    0    0   24    20    6
+15     11    0    6    0    0       0    1    0    0    0     5    1
+19     14    1    6    0    0       0    4    0    0   16     4    2
+25     12    4   12    2    0       1    0    0    1    1     2    1
+30     20    1    3    0    0       0    7    1    0    0     0    1
+32      4    0    9    0    0       0    5    0    0    5     9    2
+33     38    2   20    0    0       0    2    0    0    1     0    0
+34      5    0   18    1    0       0    1    0    1   12     4    1
+35      1    0    4    0    0       1    1    2    0   26     0    0
+36      3    1    2    0    0       1    3    0    0   20     0    0
+37      3    0    5    0    0       0    2    1    0   36     0    0
+38     13    0   11    0    0       0   12    0    4    0     0    0
+39      2    0    1    0    0       0    0    0    0    0     0    0
+40      1    0   31    0    0       0    0    0    0    1     0    3
+41      2    0    9    0    0       0    0    0    0    0     0    1
+42      0    0   12    0    0       1    0    0    2    0     0    1
+43      5    0    2    0    0       0    1    0    0    0     0    1
+44      0    0    0    0    0       0    6    0    0    0     0    0
+45     11    0    8    0    0       2    0    0    0    1     0    4
+46      4    0    0    0    0       0    2    0    1   12     0    2
+47      0    0    8    0    0       1    0    0    0   18     0    1
+48      0    0    3    0    0       0    0    0    0    0     0    1
+49     10    0    5    0    0       0    0    0    0    1     0    6
+50      4    0   37    0    0       0    0    0    2    2     0    0
+51      0    0    5    0    0       1    0    0    3    0     1    0
+52      1    0   12    0    0       0    2    0    2    2     0    0
+53      0    0   13    0    0       0    3    0    2    0     0    1
+54      2    0    7    0    0       0    0    0    0    0     0    1
+55      1    0    3    0    0       0    0    1    0    0     0    5
+56      1    0   16    0    0       0    0    0    3    0     0    0
+57      0    0    0    0    0       0    0    0    1    0     0    0
+58      0    0   13    0    0       0    0    1    0    0     0    0
+59      1    0    0    0    0       0    0    0    2    0     0    0
+60      1    2   16    0    0       0    0    0    7    0     0    0
+61      6    0    9    0    0       0    0    0    0    0     0    0
+62      3    0    0    0    0       0    0    0    1    0     0    0
+63     19    0    2    0    0       0   15    0    0    0     0    2
+64      1    0   27    0    0       0    0    0    3    0     0    3
+66      8    0   18    0    0       0    0    0    4    0     0    6
+67      4    0    3    0    0       0    0    0    0    0     0    2
+68      6    0   22    0    0       0    0    0    1    0     0    4
+
+***  swap  ***
+--> margin both  shuffle both <--
+grand sum: [1] TRUE
+row sums:  [1] TRUE
+col sums:  [1] TRUE
+fill:      [1] TRUE
+row freqs: [1] "Mean relative difference: 0.1074766"
+col freqs: [1] "Mean relative difference: 0.08316008"
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       0    3    0    2    1       0    2    0    0    1     4   10
+9       3    3    2    2    1       1   12    0    0    0     3    6
+11     38    5   35    9    0       0    5    0    1    0     6    2
+14     41    5   15    0    2       0    2    0    0   24    20    6
+15     11    0    6    0    0       0    1    0    0    0     5    1
+19     14    1    6    0    0       0    4    0    0   16     4    2
+25     12    4   12    2    0       1    0    0    1    1     2    1
+30     20    1    3    0    0       0    7    1    0    0     0    1
+32      4    0    9    0    0       0    5    0    0    5     9    2
+33     38    2   20    0    0       0    2    0    0    1     0    0
+34      5    0   18    1    0       0    1    0    1   12     4    1
+35      1    0    4    0    0       1    1    2    0   26     0    0
+36      3    1    2    0    0       1    3    0    0   20     0    0
+37      3    0    5    0    0       0    2    1    0   36     0    0
+38     13    0   11    0    0       0   12    0    4    0     0    0
+39      2    0    1    0    0       0    0    0    0    0     0    0
+40      1    0   31    0    0       0    0    0    0    1     0    3
+41      2    0    9    0    0       0    0    0    0    0     0    1
+42      0    0   12    0    0       1    0    0    2    0     0    1
+43      5    0    2    0    0       0    1    0    0    0     0    1
+44      0    0    0    0    0       0    6    0    0    0     0    0
+45     11    0    8    0    0       2    0    0    0    1     0    4
+46      4    0    0    0    0       0    2    0    1   12     0    2
+47      0    0    8    0    0       1    0    0    0   18     0    1
+48      0    0    3    0    0       0    0    0    0    0     0    1
+49     10    0    5    0    0       0    0    0    0    1     0    6
+50      4    0   37    0    0       0    0    0    2    2     0    0
+51      0    0    5    0    0       1    0    0    3    0     1    0
+52      1    0   12    0    0       0    2    0    2    2     0    0
+53      0    0   13    0    0       0    3    0    2    0     0    1
+54      2    0    7    0    0       0    0    0    0    0     0    1
+55      1    0    3    0    0       0    0    1    0    0     0    5
+56      1    0   16    0    0       0    0    0    3    0     0    0
+57      0    0    0    0    0       0    0    0    1    0     0    0
+58      0    0   13    0    0       0    0    1    0    0     0    0
+59      1    0    0    0    0       0    0    0    2    0     0    0
+60      1    2   16    0    0       0    0    0    7    0     0    0
+61      6    0    9    0    0       0    0    0    0    0     0    0
+62      3    0    0    0    0       0    0    0    1    0     0    0
+63     19    0    2    0    0       0   15    0    0    0     0    2
+64      1    0   27    0    0       0    0    0    3    0     0    3
+66      8    0   18    0    0       0    0    0    4    0     0    6
+67      4    0    3    0    0       0    0    0    0    0     0    2
+68      6    0   22    0    0       0    0    0    1    0     0    4
+
+***  quasiswap  ***
+--> margin both  shuffle samp <--
+grand sum: [1] TRUE
+row sums:  [1] TRUE
+col sums:  [1] TRUE
+fill:      [1] TRUE
+row freqs: [1] "Mean relative difference: 0.2614841"
+col freqs: [1] "Mean relative difference: 0.2735675"
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       0    3    5    2    0       0    0    0    0    5     0    2
+9       4    0   13    0    1       0    4    0    0    1     0    5
+11      9    4   21    0    0       0    3    0    5    0     0    0
+14     18    2   22    2    0       0    2    0    0   11     4    0
+15      0    0   15    0    0       0    0    0    0    0     0    0
+19      1    1    6    0    0       0   10    0    0    0     9    2
+25      0    3   10    0    1       0    3    0    0    5     0    3
+30     12    0   17    0    0       2    0    2    2    2     1    0
+32      1    0    0    0    0       0    0    1    0    3     0    0
+33     18    0    0    0    0       0    1    0    1    4     1    0
+34     16    0   18    0    1       0    4    1    3   11     0    3
+35      2    1    8    0    0       0    0    0    3    0     3   11
+36     14    0   22    0    0       0    0    0    0    9     0    0
+37      2    0   13    0    0       0    0    0    2   17     1    5
+38     16    1   11    1    0       0    4    0    0    0     2    0
+39      7    1    7    0    0       0    2    1    0   10     0    2
+40      5    1    0    0    0       0    0    0    0    5     0    9
+41      0    0   19    0    0       0    1    0    1    2     0    0
+42      6    0   16    0    0       0    3    0    0    4     3    0
+43      4    0   22    0    0       0    0    0    2    6     4    6
+44      0    0    9    0    0       0    6    0    0    3     3    0
+45      3    0    3    2    0       0    0    0    0   18     0    0
+46     14    2   22    1    0       0    0    0    5    2     3    6
+47      5    0    6    6    0       0    4    0    0    1     0    0
+48      4    0    5    0    0       0    0    0    0    9     3    0
+49     12    0    6    0    0       0    2    0    2    0     0    2
+50      0    0    7    0    0       0    0    0    0    0     0    0
+51      0    0    0    0    0       2    0    0    0    0     0    3
+52     18    0    0    1    0       1    6    0    0    7     0    1
+53      7    0   15    0    1       0    3    0    0    6     0    0
+54      0    0   10    0    0       0    1    0    0    0     0    1
+55      5    0    0    0    0       0    1    0    1    0     0    0
+56      0    0    1    0    0       0    2    0    0    0     6    0
+57      1    0    0    0    0       0    0    0    0    0     0    4
+58      1    1    2    0    0       1    0    0    0    6     0    2
+59      6    0    0    0    0       0    0    0    0    0     0    5
+60      5    1    0    0    0       0    0    0    1    8     0    0
+61      2    0    5    0    0       1    3    0    0    0     0    0
+62      0    0    0    0    0       0    0    0    0    0     0    4
+63      6    0    0    0    0       0   11    0    5    0     0    0
+64      4    1    0    0    0       1    0    0    0    0     5    0
+66      5    5    3    1    0       0    0    0    3    0     0    0
+67     52    0   72    0    0       1    9    1    2   23     5    0
+68     14    0   19    0    0       0    3    0    3    1     5    0
+
+***  quasiswap  ***
+--> margin both  shuffle both <--
+grand sum: [1] TRUE
+row sums:  [1] TRUE
+col sums:  [1] TRUE
+fill:      [1] TRUE
+row freqs: [1] "Mean relative difference: 0.2614841"
+col freqs: [1] "Mean relative difference: 0.2735675"
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       0    3    5    2    0       0    0    0    0    5     0    2
+9       4    0   13    0    1       0    4    0    0    1     0    5
+11      9    4   21    0    0       0    3    0    5    0     0    0
+14     18    2   22    2    0       0    2    0    0   11     4    0
+15      0    0   15    0    0       0    0    0    0    0     0    0
+19      1    1    6    0    0       0   10    0    0    0     9    2
+25      0    3   10    0    1       0    3    0    0    5     0    3
+30     12    0   17    0    0       2    0    2    2    2     1    0
+32      1    0    0    0    0       0    0    1    0    3     0    0
+33     18    0    0    0    0       0    1    0    1    4     1    0
+34     16    0   18    0    1       0    4    1    3   11     0    3
+35      2    1    8    0    0       0    0    0    3    0     3   11
+36     14    0   22    0    0       0    0    0    0    9     0    0
+37      2    0   13    0    0       0    0    0    2   17     1    5
+38     16    1   11    1    0       0    4    0    0    0     2    0
+39      7    1    7    0    0       0    2    1    0   10     0    2
+40      5    1    0    0    0       0    0    0    0    5     0    9
+41      0    0   19    0    0       0    1    0    1    2     0    0
+42      6    0   16    0    0       0    3    0    0    4     3    0
+43      4    0   22    0    0       0    0    0    2    6     4    6
+44      0    0    9    0    0       0    6    0    0    3     3    0
+45      3    0    3    2    0       0    0    0    0   18     0    0
+46     14    2   22    1    0       0    0    0    5    2     3    6
+47      5    0    6    6    0       0    4    0    0    1     0    0
+48      4    0    5    0    0       0    0    0    0    9     3    0
+49     12    0    6    0    0       0    2    0    2    0     0    2
+50      0    0    7    0    0       0    0    0    0    0     0    0
+51      0    0    0    0    0       2    0    0    0    0     0    3
+52     18    0    0    1    0       1    6    0    0    7     0    1
+53      7    0   15    0    1       0    3    0    0    6     0    0
+54      0    0   10    0    0       0    1    0    0    0     0    1
+55      5    0    0    0    0       0    1    0    1    0     0    0
+56      0    0    1    0    0       0    2    0    0    0     6    0
+57      1    0    0    0    0       0    0    0    0    0     0    4
+58      1    1    2    0    0       1    0    0    0    6     0    2
+59      6    0    0    0    0       0    0    0    0    0     0    5
+60      5    1    0    0    0       0    0    0    1    8     0    0
+61      2    0    5    0    0       1    3    0    0    0     0    0
+62      0    0    0    0    0       0    0    0    0    0     0    4
+63      6    0    0    0    0       0   11    0    5    0     0    0
+64      4    1    0    0    0       1    0    0    0    0     5    0
+66      5    5    3    1    0       0    0    0    3    0     0    0
+67     52    0   72    0    0       1    9    1    2   23     5    0
+68     14    0   19    0    0       0    3    0    3    1     5    0
+
+***  swsh  ***
+--> margin rows  shuffle samp <--
+grand sum: [1] TRUE
+row sums:  [1] TRUE
+col sums:  [1] "Mean relative difference: 0.7988952"
+fill:      [1] TRUE
+row freqs: [1] TRUE
+col freqs: [1] TRUE
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       8    0    2    0    6       4    0    0    0    0     3    1
+9      30    0    1    3    0       3    7    0    0    0     0    3
+11      1    0    6    2    0       0    7   17    7    1     0   42
+14      2    8    2    0    0       0    0    0   61    1     5    3
+15      1    0    2    0    0       0    0    0    1    1     0   29
+19      1    5    2    0    0       0    0    2    0   16    10    0
+25      2    0    1    0    0       1    0    0   12    5     0    0
+30      2    0    1    0    0       0    0    1   12    0     2    1
+32      5    4    2    0    0       0    0    0    5    0     0    9
+33      1    1   15    0    0       0    0    0    0    0     0   38
+34      9    0    1    1    0       5    2    0    4   22     1    4
+35     21    4    3    0    0       0    0    0    0   26     1    6
+36     20    0    2    0   12       1    4    3    0    0     0    1
+37      1    3    1    0    2       0    0    0    0    0     0   21
+38      1    0    4    0    0       1    2    0    0    0     0    6
+39      1    0    2    0    0       0    1    0    0    0     0   18
+40      6    0   26    0    0       0    1    0    1    0     0    0
+41      0    1   13    0    0       0    0    0    0    0     0    5
+42      1    0   12    0    0       1    0    0    0    0     0    0
+43     14    0    5    0    0       0    1    0    3    1     0    0
+44      0    0   28    0    0       0    0    0    0    0     0   24
+45     52    0    1    0    0       0   11    0    0    0     0    0
+46      2    0    3    0    0       0    0    1   42    4     0    0
+47      0    0    1    0    0       0   20    0    0    0     0    1
+48      6    0   29    0    0       0    0    0    0    0     0    0
+49     10    0    7    0    0       0   17    0    0    0     0    0
+50      8    0    3    0    0       0    0    0    0    0     0    9
+51      1    0    4    0    0       0    0    0    0    0     0    0
+52      5    0    9    0    0       0    0    0    0    1     0    0
+53      9    0    5    0    0       0    9    0    0    2    44   17
+54      1    0   21    0    0       0    0    0    0    1     0    0
+55      0    0    5    0    0       0   15    0    0    5     0    2
+56     17    0   16    0    0       0    0    0    0    0     0    3
+57      0    0    2    0    0       0    0    0    0    0     0    0
+58      0    0   12    0    0       0    1    0    0    2     0    0
+59      2    0    0    0    0       0    1    0    0    0     0    0
+60      2    0    0    0    0       0    0    0    1    0     0   55
+61      6    0    1    6    0       0    0    0    0    2     0    3
+62      1    0    0    0    0       0    0    0    5    0     0    0
+63      2    2    8    0    0       0    5    0    3   14     0   13
+64      4    0    0    0    0       0    1    0    3    0     0   16
+66     25    0    6    8    0       0    4    0    3    3     4    9
+67      0    0    3    0    0       0    0    0    0    0     0    0
+68     17    0    3    0    0       0    0    0    3    0     4    3
+
+***  swsh  ***
+--> margin rows  shuffle both <--
+grand sum: [1] TRUE
+row sums:  [1] TRUE
+col sums:  [1] "Mean relative difference: 0.6956672"
+fill:      [1] TRUE
+row freqs: [1] TRUE
+col freqs: [1] TRUE
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       4    0    9    0   13       5    0    0    0    0     5    5
+9       7    0    9   10    0       5    4    0    0    0     0    5
+11      9    0    9   10    0       0    9    8    5    8     0    8
+14     15   15    8    0    0       0    0    0   13   15     8   11
+15      5    0    7    0    0       0    0    0    3    5     0    4
+19      7    8    6    0    0       0    0    5    0    5     7    0
+25     10    0    3    0    0       6    0    0    8    9     0    0
+30      1    0    5    0    0       0    0    5    5    0     7    7
+32      4    6    7    0    0       0    0    0    5    0     0    7
+33      4    6   11    0    0       0    0    0    0    0     0   10
+34      8    0   11   12    0      10    9    0    9    8    15    7
+35      6    5    7    0    0       0    0    0    0    5     7    3
+36      5    0    7    0   11       9    5    9    0    0     0    3
+37     13   12    8    0    8       0    0    0    0    0     0    7
+38     14    0   14    0    0      15   11    0    0    0     0   14
+39      7    0    9    0    0       0    7    0    0    0     0   11
+40     13    0   15    0    0       0    7    0   11    0     0    0
+41      0    9    5    0    0       0    0    0    0    0     0    5
+42     12    0   17    0    0      13    0    0    0    0     0    0
+43     10    0   14    0    0       0   12    0   17   16     0    0
+44      0    0   17    0    0       0    0    0    0    0     0   11
+45      9    0   11    0    0       0    8    0    0    0     0    0
+46     12    0   10    0    0       0    0    4   10   15     0    0
+47      0    0    7    0    0       0   10    0    0    0     0    8
+48      6    0   12    0    0       0    0    0    0    0     0    0
+49      7    0    7    0    0       0   11    0    0    0     0    0
+50     16    0   17    0    0       0    0    0    0    0     0   16
+51      6    0    7    0    0       0    0    0    0    0     0    0
+52     11    0    7    0    0       0    0    0    0    6     0    0
+53      6    0    8    0    0       0    8    0    0   11    11   12
+54      9    0    2    0    0       0    0    0    0    8     0    0
+55      0    0    7    0    0       0    6    0    0    6     0    5
+56     14    0    8    0    0       0    0    0    0    0     0   14
+57      0    0    1    0    0       0    0    0    0    0     0    0
+58      0    0   12    0    0       0   11    0    0   11     0    0
+59     11    0    0    0    0       0   16    0    0    0     0    0
+60     12    0    0    0    0       0    0    0   11    0     0    9
+61      6    0    4    7    0       0    0    0    0    7     0    4
+62      2    0    0    0    0       0    0    0    1    0     0    0
+63      5    5    6    0    0       0    6    0    2    6     0    4
+64      7    0    0    0    0       0    9    0    7    0     0    4
+66      3    0   15    9    0       0   11    0    6    5     8    9
+67      0    0  112    0    0       0    0    0    0    0     0    0
+68      5    0    9    0    0       0    0    0   11    0     8   13
+
+***  swsh  ***
+--> margin columns  shuffle samp <--
+grand sum: [1] TRUE
+row sums:  [1] "Mean relative difference: 0.6253322"
+col sums:  [1] TRUE
+fill:      [1] TRUE
+row freqs: [1] TRUE
+col freqs: [1] TRUE
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8      12    0   16    0    2       2    0    0    0    0     3    3
+9       3    0   31    2    0       1    1    0    0    0     0    5
+11      8    0    3    9    0       0    2    1    1    1     0    1
+14      2    4    3    0    0       0    0    0    4    1     5    4
+15      3    0    3    0    0       0    0    0    2   18     0    2
+19      8    5    8    0    0       0    0    1    0    2     5    0
+25      3    0   22    0    0       1    0    0    1   24     0    0
+30      4    0   17    0    0       0    0    1    1    0     6    2
+32      5    1   35    0    0       0    0    0    2    0     0    9
+33      4    4    2    0    0       0    0    0    0    0     0    1
+34      6    0   12    1    0       1    5    0    2    3    20    2
+35     36    3   14    0    0       0    0    0    0   26     4    1
+36      1    0    7    0    1       2    2    1    0    0     0    6
+37      3    1    9    0    1       0    0    0    0    0     0    1
+38      6    0    3    0    0       1    7    0    0    0     0    1
+39     41    0    5    0    0       0    3    0    0    0     0    1
+40      4    0   12    0    0       0    4    0    1    0     0    0
+41      0    7   10    0    0       0    0    0    0    0     0    2
+42      1    0    8    0    0       1    0    0    0    0     0    0
+43     19    0    4    0    0       0    1    0    4   36     0    0
+44      0    0   16    0    0       0    0    0    0    0     0    7
+45      5    0    4    0    0       0   12    0    0    0     0    0
+46     20    0   16    0    0       0    0    2    3    1     0    0
+47      0    0    2    0    0       0    5    0    0    0     0    1
+48      3    0    6    0    0       0    0    0    0    0     0    0
+49      1    0    5    0    0       0    1    0    0    0     0    0
+50      3    0   15    0    0       0    0    0    0    0     0    4
+51      5    0    2    0    0       0    0    0    0    0     0    0
+52      2    0   18    0    0       0    0    0    0   20     0    0
+53      3    0    5    0    0       0    2    0    0    1     4   10
+54      6    0   10    0    0       0    0    0    0   12     0    0
+55      0    0   37    0    0       0    2    0    0    1     0    2
+56      2    0   17    0    0       0    0    0    0    0     0    1
+57      0    0   14    0    0       0    0    0    0    0     0    0
+58      0    0    8    0    0       0   15    0    0   16     0    0
+59     12    0    0    0    0       0    2    0    0    0     0    0
+60      1    0    0    0    0       0    0    0    3    0     0    1
+61     38    0    2    2    0       0    0    0    0   11     0    3
+62     10    0    0    0    0       0    0    0    7    0     0    0
+63     11    2   12    0    0       0   16    0    2    5     0    2
+64      3    0    0    0    0       0    3    0    2    0     0    1
+66      4    0    9    2    0       0    5    0    3    1     9    1
+67      0    0    2    0    0       0    0    0    0    0     0    0
+68      1    0    6    0    0       0    0    0    3    0     2    2
+
+***  swsh  ***
+--> margin columns  shuffle both <--
+grand sum: [1] TRUE
+row sums:  [1] "Mean relative difference: 0.3829337"
+col sums:  [1] TRUE
+fill:      [1] TRUE
+row freqs: [1] TRUE
+col freqs: [1] TRUE
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       5    0   14    0    2       1    0    0    0    0     7    1
+9      11    0   10    4    0       1    4    0    0    0     0    1
+11     16    0   15    2    0       0    5    1    2   11     0    1
+14      8    3    9    0    0       0    0    0    5    8     9    2
+15      7    0    9    0    0       0    0    0    2    8     0    3
+19      7    4   13    0    0       0    0    1    0    6     7    0
+25      7    0   19    0    0       1    0    0    3   16     0    0
+30      9    0    5    0    0       0    0    1    4    0     7    4
+32      7    3   14    0    0       0    0    0    1    0     0    2
+33      8    3    9    0    0       0    0    0    0    0     0    4
+34      5    0    6    3    0       2    5    0    2    9     2    1
+35      5    2    6    0    0       0    0    0    0    9     5    3
+36      6    0    7    0    1       1    4    2    0    0     0    3
+37     14    4   14    0    1       0    0    0    0    0     0    2
+38      9    0   14    0    0       1    4    0    0    0     0    2
+39      5    0    7    0    0       0    6    0    0    0     0    5
+40      7    0   14    0    0       0    7    0    3    0     0    0
+41      0    4   14    0    0       0    0    0    0    0     0    2
+42     10    0    7    0    0       2    0    0    0    0     0    0
+43      9    0   12    0    0       0    5    0    3    6     0    0
+44      0    0   14    0    0       0    0    0    0    0     0    2
+45     13    0    8    0    0       0    5    0    0    0     0    0
+46      7    0   10    0    0       0    0    1    3   12     0    0
+47      0    0    8    0    0       0    4    0    0    0     0    2
+48      9    0    7    0    0       0    0    0    0    0     0    0
+49     10    0   10    0    0       0    7    0    0    0     0    0
+50      5    0    9    0    0       0    0    0    0    0     0    3
+51      4    0    4    0    0       0    0    0    0    0     0    0
+52      5    0   12    0    0       0    0    0    0   12     0    0
+53      9    0    8    0    0       0    4    0    0   13     7    1
+54      8    0    7    0    0       0    0    0    0   15     0    0
+55      0    0    9    0    0       0    7    0    0   15     0    2
+56      7    0   14    0    0       0    0    0    0    0     0    5
+57      0    0   13    0    0       0    0    0    0    0     0    0
+58      0    0   11    0    0       0    4    0    0   12     0    0
+59     11    0    0    0    0       0    4    0    0    0     0    0
+60     11    0    0    0    0       0    0    0    4    0     0    5
+61     10    0   11    3    0       0    0    0    0    6     0    4
+62      7    0    0    0    0       0    0    0    1    0     0    0
+63      6    4   19    0    0       0    3    0    1   13     0    2
+64      9    0    0    0    0       0    4    0    1    0     0    6
+66      7    0   14    4    0       0    6    0    4    8     8    3
+67      0    0   12    0    0       0    0    0    0    0     0    0
+68      6    0   12    0    0       0    0    0    2    0     6    5
+
+***  abuswap  ***
+--> margin rows  shuffle samp <--
+grand sum: [1] TRUE
+row sums:  [1] TRUE
+col sums:  [1] "Mean relative difference: 0.2473584"
+fill:      [1] TRUE
+row freqs: [1] TRUE
+col freqs: [1] TRUE
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       5    4    8    2    1       2    0    0   10    1     4    0
+9       3    3    2    2    0       1   12    0    0    0     3    0
+11     36   17   35    9    0       2    5    0    6    1     0    1
+14     41    5    2    0    2       0    3    0    0   24    20   20
+15      0    0    6    0    0       0    1    0    0   29     5    0
+19     12    2    1    1    0       0    4    0    0   16     0    2
+25     12    5    2    0    0       1    1    1    2    1     2    1
+30      1    1    2    0    0       0    7    1    0    0     0   20
+32      4    0    9    0    0       0    5    0    0    5     0    4
+33     38    0    2    0    0       0    0    0    0    1     1    0
+34      5    0   14    0    0       0    1    0    1   11     4    2
+35      1    0    2    0    0       1   29    2    3    0     3   26
+36      3    1    2    0    0       1    4    0    0    0     0    0
+37      3    0    5    0    0       0    2    0    0   36     0    0
+38      8    0    6    0    0       0   15    2    4    0     0    0
+39      0    0    0    0    0       0    0    0    0    0     0   40
+40      1    0    1    0    0       0    0    0    1    3     0    0
+41      1    0   10    0    0       0    0    0    0    0     0    0
+42      0    0   12    0    0       0    0    0    0    0     0    1
+43      5    0    2    0    0       0   16    0    0    0     0    1
+44      0    0    0    0    0       0    1    0    0    0     0    0
+45      6    0    8    0    0       0    0    0    0   52     0    4
+46      4    0    4    0    0       0    2    0    1   12     0    2
+47      0    0   24    0    0       0    0    0   18    0     0    1
+48      0    0    3    0    0       0    0    0    0    6     0    0
+49     10    0   14    0    0       0   25    0    0    1     0    7
+50      4    0    3   37    0       0    9    0    2    0     0    1
+51      2    0    5    0    0       3    0    0    0    0     1    8
+52      1    0    4    0    0       0    0    0    2    0     0    0
+53      3    0    2    0    0       0    0   17    2    0     0    1
+54      2    0    7    0    0       0    0    0    0    0     0    1
+55      6    0    3    0    0       0    0    0    0    0     0    5
+56      1    0   16    0    0       0    0    0    0    0     0    0
+57      0    0    0    0    0       0    0    0    0    0     0    0
+58      1    0   12    0    0       0    0    0    0    2     0    4
+59      1    0    0    0    0       0    0    0    0    0     0    2
+60      1    0   55    0    0       0    0    0    7    0     0    0
+61      6    0    9    0    0       0    0    0    0    0     0    0
+62      3    0    5    0    0       0    0    0    0    0     0    1
+63     19    0   13    0    0       0    0    0    2    0     0    2
+64      3    0   11    0    0       0    0    0    0    3     0    3
+66      4    0    8    0    3       0    0    0    4    0     0   18
+67      4    0    3    0    0       0    0    0    0    0     0    0
+68      6    0   32    0    0       0    0    0    3    0     0    4
+
+***  abuswap  ***
+--> margin rows  shuffle both <--
+grand sum: [1] TRUE
+row sums:  [1] TRUE
+col sums:  [1] "Mean relative difference: 0.2473584"
+fill:      [1] TRUE
+row freqs: [1] TRUE
+col freqs: [1] TRUE
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       5    4    8    2    1       2    0    0   10    1     4    0
+9       3    3    2    2    0       1   12    0    0    0     3    0
+11     36   17   35    9    0       2    5    0    6    1     0    1
+14     41    5    2    0    2       0    3    0    0   24    20   20
+15      0    0    6    0    0       0    1    0    0   29     5    0
+19     12    2    1    1    0       0    4    0    0   16     0    2
+25     12    5    2    0    0       1    1    1    2    1     2    1
+30      1    1    2    0    0       0    7    1    0    0     0   20
+32      4    0    9    0    0       0    5    0    0    5     0    4
+33     38    0    2    0    0       0    0    0    0    1     1    0
+34      5    0   14    0    0       0    1    0    1   11     4    2
+35      1    0    2    0    0       1   29    2    3    0     3   26
+36      3    1    2    0    0       1    4    0    0    0     0    0
+37      3    0    5    0    0       0    2    0    0   36     0    0
+38      8    0    6    0    0       0   15    2    4    0     0    0
+39      0    0    0    0    0       0    0    0    0    0     0   40
+40      1    0    1    0    0       0    0    0    1    3     0    0
+41      1    0   10    0    0       0    0    0    0    0     0    0
+42      0    0   12    0    0       0    0    0    0    0     0    1
+43      5    0    2    0    0       0   16    0    0    0     0    1
+44      0    0    0    0    0       0    1    0    0    0     0    0
+45      6    0    8    0    0       0    0    0    0   52     0    4
+46      4    0    4    0    0       0    2    0    1   12     0    2
+47      0    0   24    0    0       0    0    0   18    0     0    1
+48      0    0    3    0    0       0    0    0    0    6     0    0
+49     10    0   14    0    0       0   25    0    0    1     0    7
+50      4    0    3   37    0       0    9    0    2    0     0    1
+51      2    0    5    0    0       3    0    0    0    0     1    8
+52      1    0    4    0    0       0    0    0    2    0     0    0
+53      3    0    2    0    0       0    0   17    2    0     0    1
+54      2    0    7    0    0       0    0    0    0    0     0    1
+55      6    0    3    0    0       0    0    0    0    0     0    5
+56      1    0   16    0    0       0    0    0    0    0     0    0
+57      0    0    0    0    0       0    0    0    0    0     0    0
+58      1    0   12    0    0       0    0    0    0    2     0    4
+59      1    0    0    0    0       0    0    0    0    0     0    2
+60      1    0   55    0    0       0    0    0    7    0     0    0
+61      6    0    9    0    0       0    0    0    0    0     0    0
+62      3    0    5    0    0       0    0    0    0    0     0    1
+63     19    0   13    0    0       0    0    0    2    0     0    2
+64      3    0   11    0    0       0    0    0    0    3     0    3
+66      4    0    8    0    3       0    0    0    4    0     0   18
+67      4    0    3    0    0       0    0    0    0    0     0    0
+68      6    0   32    0    0       0    0    0    3    0     0    4
+
+***  abuswap  ***
+--> margin columns  shuffle samp <--
+grand sum: [1] TRUE
+row sums:  [1] "Mean relative difference: 0.2329697"
+col sums:  [1] TRUE
+fill:      [1] TRUE
+row freqs: [1] TRUE
+col freqs: [1] TRUE
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       5    4    8    2    1       2    0    0    1    1     4    0
+9       3    3    2    2    0       1   12    0    0    0     3    0
+11     36    4   35    9    0       2    5    0    3   20     0    1
+14     41    5   10    0    2       0    1    0    0   24    20    1
+15      0    0   18    0    0       0    3    0    0    1     5    0
+19     12    2   12    1    0       0    4    0    0   16     0    2
+25     12    7   17    0    0       1    2    1    1    1     2    1
+30      4    1    2    0    0       0    7    1    0    0     0    2
+32      1    0    9    0    0       0    5    0    0    5     0    1
+33     38    0   15    0    0       0    0    0    0    1     6    0
+34      5    0   14    0    0       0    1    0    1   11     4    2
+35     11    0    3    0    0       1    2    2    2    0     9    3
+36      3    1    2    0    0       1    2    0    0    0     0    0
+37      3    0    5    0    0       0    2    0    0   36     0    0
+38      3    0    6    0    0       0   15    1    4    0     0    0
+39      0    0    0    0    0       0    0    0    0    0     0    6
+40      1    0    2    0    0       0    0    0    3    3     0    0
+41      3    0   10    0    0       0    0    0    0    0     0    0
+42      0    0   12    0    0       0    0    0    0    0     0    1
+43      5    0    2    0    0       0   16    0    0    0     0    2
+44      0    0    0    0    0       0    3    0    0    0     0    0
+45      8    0    8    0    0       0    0    0    0   26     0    4
+46      4    0    4    0    0       0    2    0    1   12     0    2
+47      0    0   16    0    0       0    0    0    3    0     0    1
+48      0    0    3    0    0       0    0    0    0    1     0    0
+49     10    0   14    0    0       0    1    0    0    1     0    7
+50      4    0   17    2    0       0    5    0    2    0     0    1
+51      2    0    5    0    0       1    0    0    0    0     5    1
+52      2    0    4    0    0       0    0    0    2    0     0    0
+53      3    0   37    0    0       0    0    1    2    0     0    1
+54      2    0    7    0    0       0    0    0    0    0     0    2
+55     20    0    3    0    0       0    0    0    0    0     0    5
+56      1    0   16    0    0       0    0    0    0    0     0    0
+57      0    0    0    0    0       0    0    0    0    0     0    0
+58      6    0   12    0    0       0    0    0    0    2     0    1
+59      1    0    0    0    0       0    0    0    0    0     0    1
+60      1    0   22    0    0       0    0    0    7    0     0    0
+61      6    0    9    0    0       0    0    0    0    0     0    0
+62      3    0    5    0    0       0    0    0    0    0     0   10
+63     19    0   31    0    0       0    0    0    2    0     0    2
+64      3    0    8    0    0       0    0    0    0   18     0    3
+66      8    0    6    0    1       0    0    0    4    0     0    9
+67      4    0    3    0    0       0    0    0    0    0     0    0
+68      6    0   16    0    0       0    0    0    3    0     0    4
+
+***  abuswap  ***
+--> margin columns  shuffle both <--
+grand sum: [1] TRUE
+row sums:  [1] "Mean relative difference: 0.2329697"
+col sums:  [1] TRUE
+fill:      [1] TRUE
+row freqs: [1] TRUE
+col freqs: [1] TRUE
+   Brachy PHTH HPAV RARD SSTR Protopl MEGR MPRO TVIE HMIN HMIN2 NPRA
+8       5    4    8    2    1       2    0    0    1    1     4    0
+9       3    3    2    2    0       1   12    0    0    0     3    0
+11     36    4   35    9    0       2    5    0    3   20     0    1
+14     41    5   10    0    2       0    1    0    0   24    20    1
+15      0    0   18    0    0       0    3    0    0    1     5    0
+19     12    2   12    1    0       0    4    0    0   16     0    2
+25     12    7   17    0    0       1    2    1    1    1     2    1
+30      4    1    2    0    0       0    7    1    0    0     0    2
+32      1    0    9    0    0       0    5    0    0    5     0    1
+33     38    0   15    0    0       0    0    0    0    1     6    0
+34      5    0   14    0    0       0    1    0    1   11     4    2
+35     11    0    3    0    0       1    2    2    2    0     9    3
+36      3    1    2    0    0       1    2    0    0    0     0    0
+37      3    0    5    0    0       0    2    0    0   36     0    0
+38      3    0    6    0    0       0   15    1    4    0     0    0
+39      0    0    0    0    0       0    0    0    0    0     0    6
+40      1    0    2    0    0       0    0    0    3    3     0    0
+41      3    0   10    0    0       0    0    0    0    0     0    0
+42      0    0   12    0    0       0    0    0    0    0     0    1
+43      5    0    2    0    0       0   16    0    0    0     0    2
+44      0    0    0    0    0       0    3    0    0    0     0    0
+45      8    0    8    0    0       0    0    0    0   26     0    4
+46      4    0    4    0    0       0    2    0    1   12     0    2
+47      0    0   16    0    0       0    0    0    3    0     0    1
+48      0    0    3    0    0       0    0    0    0    1     0    0
+49     10    0   14    0    0       0    1    0    0    1     0    7
+50      4    0   17    2    0       0    5    0    2    0     0    1
+51      2    0    5    0    0       1    0    0    0    0     5    1
+52      2    0    4    0    0       0    0    0    2    0     0    0
+53      3    0   37    0    0       0    0    1    2    0     0    1
+54      2    0    7    0    0       0    0    0    0    0     0    2
+55     20    0    3    0    0       0    0    0    0    0     0    5
+56      1    0   16    0    0       0    0    0    0    0     0    0
+57      0    0    0    0    0       0    0    0    0    0     0    0
+58      6    0   12    0    0       0    0    0    0    2     0    1
+59      1    0    0    0    0       0    0    0    0    0     0    1
+60      1    0   22    0    0       0    0    0    7    0     0    0
+61      6    0    9    0    0       0    0    0    0    0     0    0
+62      3    0    5    0    0       0    0    0    0    0     0   10
+63     19    0   31    0    0       0    0    0    2    0     0    2
+64      3    0    8    0    0       0    0    0    0   18     0    3
+66      8    0    6    0    1       0    0    0    4    0     0    9
+67      4    0    3    0    0       0    0    0    0    0     0    0
+68      6    0   16    0    0       0    0    0    3    0     0    4
+Warning messages:
+1: In permatswap(x, method = method, fixedmar = margin, shuffle = what,  :
+  quantitative swap method may not yield random null models, use only to study its properties
+2: In permatswap(x, method = method, fixedmar = margin, shuffle = what,  :
+  quantitative swap method may not yield random null models, use only to study its properties
+> ### end permatswap
+> 
+> nm=nullmodel(m,"abuswap_c")
+> sm<-simulate(nm,nsim=100,thin=100,burnin=100)
+> 
+> ### clean
+> rm(list = ls())
+> 
+> ## end permatfull/swap
+> 
+> ## The following vegan functions depend on *oecosimu*: adipart
+> ## hiersimu multipart raupcrick. The following functions directly
+> ## depend on *commsimulator*: permatfull1 permatswap1.  All these have
+> ## derived and/or method functions. These should not be broken.
+> 
+> ## Do not break raupcrick:
+> set.seed(4711)
+> data(sipoo)
+> as.numeric(raupcrick(sipoo, nsimul = 99))
+  [1] 0.09 0.03 0.29 0.02 0.63 0.48 0.15 0.70 0.76 0.64 0.10 0.20 0.26 0.79 0.80
+ [16] 0.87 0.90 0.02 0.37 0.04 0.03 0.44 0.16 0.26 0.36 0.25 0.15 0.22 0.30 0.47
+ [31] 0.85 0.46 0.57 0.40 0.02 0.26 0.62 0.06 0.71 0.82 0.35 0.06 0.13 0.02 0.59
+ [46] 0.63 0.32 0.93 0.04 0.06 0.05 0.17 0.05 0.11 0.20 0.13 0.14 0.67 0.34 0.33
+ [61] 0.63 0.79 0.02 0.06 0.16 0.44 0.18 0.06 0.01 0.01 0.09 0.15 0.18 0.29 0.40
+ [76] 0.08 0.12 0.01 0.01 0.01 0.08 0.04 0.58 0.02 0.10 0.26 0.37 0.53 0.23 0.11
+ [91] 0.26 0.15 0.16 0.68 0.37 0.35 0.85 0.53 0.01 0.29 0.05 0.10 0.16 0.25 0.39
+[106] 0.79 0.37 0.98 0.02 0.04 0.12 0.04 0.91 0.02 0.12 0.27 0.38 0.07 0.31 0.43
+[121] 0.60 0.34 0.74 0.80 0.99 0.19 0.15 0.60 0.18 0.37 0.69 0.97 0.01 0.07 0.18
+[136] 0.20 0.08 0.55 0.27 0.01 0.01 0.25 0.18 0.63 0.65 0.61 1.00 0.09 0.49 0.15
+[151] 0.15 0.48 0.90
+> rm(list = ls())
+> ## end raupcrick
+> 
+> 
+> 
+> proc.time()
+   user  system elapsed 
+  2.046   0.106   2.142 
diff --git a/tests/vegan-tests.R b/tests/vegan-tests.R
new file mode 100644
index 0000000..74f8ea2
--- /dev/null
+++ b/tests/vegan-tests.R
@@ -0,0 +1,262 @@
+### vegan-tests: unit tests for vegan functions
+
+### This file contains unit tests for vegan functions. This file is
+### run in R CMD check and its results are compared against previously
+### saved results in vegan-tests.Rout.save. If you change tests, you
+### must generate new vegan-tests.Rout.save in this directory.
+
+### The current plan is that tests/ are not included in the CRAN
+### release, but only in the development versin of vegan in R-Forge.
+
+### The tests here are not intended for human reading. The tests need
+### not be ecological or biologically meaningful, but they are only
+### intended for testing strange arguments, protect against
+### regressions and test correctness of results.
+
+### The tests are in a single file and you should clean work space
+### after the unit test. You should set random number seed (if needed)
+### for comparison against vegan-tests.Rout.save, and you should
+### remove the seed after the unit test. If possible, avoid very long
+### lasting tests.
+
+###<--- BEGIN TESTS --->
+suppressPackageStartupMessages(require(vegan))
+###<--- BEGIN anova.cca test --->
+### anova.cca tests: should work with (1) subset, (2) missing values,
+### (3) with functions of variables poly(A1,2), (4) variables in data
+### frame attached or in data=, or (5) in working environment
+set.seed(4711)
+data(dune)
+data(dune.env)
+df <- dune.env
+df$Management[c(1,5)] <- NA
+## formula
+fla <- as.formula("dune ~ Management + poly(A1, 2) + spno")
+### variable in the .GlobalEnv
+spno <- specnumber(dune)
+### data= argument
+## cca/rda
+m <-  cca(fla, data=df,  na.action=na.exclude,  subset = Use != "Pasture" & spno > 7)
+anova(m, permutations=99)
+## vegan 2.1-40 cannot handle missing data in next two
+##anova(m, by="term", permutations=99)
+##anova(m, by="margin", permutations=99)
+anova(m, by="axis", permutations=99)
+## capscale
+p <- capscale(fla, data=df, na.action=na.exclude, subset = Use != "Pasture" & spno > 7)
+anova(p, permutations=99)
+## vegan 2.1-40 cannot handle missing data in next two
+##anova(p, by="term", permutations=99)
+##anova(p, by="margin", permutations=99)
+anova(p, by="axis", permutations=99)
+## see that capscale can be updated and also works with 'dist' input
+dis <- vegdist(dune)
+p <- update(p, dis ~ .)
+anova(p, permutations=99)
+## vegan 2.1-40 cannot handle missing data in next two
+##anova(p, by="term", permutations=99)
+##anova(p, by="margin", permutations=99)
+anova(p, by="axis", permutations=99)
+### attach()ed data frame instead of data=
+attach(df)
+q <- cca(fla, na.action = na.omit, subset = Use != "Pasture" & spno > 7)
+anova(q, permutations=99)
+## commented tests below fail in vegan 2.1-40 because number of
+## observations changes
+##anova(q, by="term", permutations=99) 
+##anova(q, by="margin", permutations=99)
+anova(q, by="axis", permutations=99)
+### Check that constrained ordination functions can be embedded.
+### The data.frame 'df' is still attach()ed.
+foo <- function(bar, Y, X, ...)
+{
+    bar <- match.fun(bar)
+    bar(Y ~ X, ...)
+}
+foo("cca", dune, Management, na.action = na.omit)
+foo("rda", dune, Management, na.action = na.omit)
+foo("capscale", dune, Management, dist="jaccard", na.action = na.omit)
+foo("capscale", vegdist(dune), Management, na.action = na.omit)
+foo("capscale", dune, Management, na.action = na.omit) ## fails in 2.2-1
+###
+detach(df)
+### Check that statistics match in partial constrained ordination
+m <- cca(dune ~ A1 + Moisture + Condition(Management), dune.env, subset = A1 > 3)
+tab <- anova(m, by = "axis", permutations = 99)
+m
+tab
+all.equal(tab[,2], c(m$CCA$eig, m$CA$tot.chi), check.attributes=FALSE)
+tab[nrow(tab),1] == m$CA$rank
+## clean-up
+rm(df, spno, fla, m, p, q, tab, dis, foo, .Random.seed)
+### <--- END anova.cca test --->
+
+### Sven Neulinger <sneulinger@ifam.uni-kiel.de> reported failures in
+### partial analysis which (mostly) were fixed in r2087. Below his test.
+
+set.seed(4711)
+X <- matrix(rnorm(30*6), 30, 6)
+
+A <- factor(rep(rep(c("a","b"), each=3),5))
+B <- factor(rep(c("a","b","c"), 10))
+## Sven Neulinger's tests failed still in 2.2-1, now due to look-up
+## order: function stats::C was found before matrix 'C'. The test was
+## OK when non-function name was used ('CC').
+C <- factor(rep(c(1:5), each=6))
+
+## partial db-RDA
+cap.model.cond <- capscale(X ~ A + B + Condition(C))
+anova(cap.model.cond, by="axis", strata=C)  # -> error pre r2287
+anova(cap.model.cond, by="terms", strata=C)  # -> error pre r2287
+
+## db-RDA without conditional factor
+cap.model <- capscale(X ~ A + B)
+anova(cap.model, by="axis", strata=C)  # -> no error
+anova(cap.model, by="terms", strata=C)  # -> no error
+
+# partial RDA
+rda.model.cond <- rda(X ~ A + B + Condition(C))
+anova(rda.model.cond, by="axis", strata=C)  # -> no error
+anova(rda.model.cond, by="terms", strata=C)  # -> error pre r2287
+
+# RDA without conditional factor
+rda.model <- rda(X ~ A + B)
+anova(rda.model, by="axis", strata=C)  # -> no error
+anova(rda.model, by="terms", strata=C)  # -> no error
+## clean.up
+rm(X, A, B, C, cap.model.cond, cap.model, rda.model.cond, rda.model)
+### end Sven Neulinger's tests
+
+### Benedicte Bachelot informed us that several anova.cca* functions
+### failed if community data name was the same as a function name: the
+### function name was found first, and used instead ofa data. This
+### seems to be related to the same problem that Sven Neulinger
+### communicated, and his examples still faile if Condition or strata
+### are function names. However, the following examples that failed
+### should work now:
+
+set.seed(4711)
+cca <- dune
+m <- cca(cca ~ ., dune.env)
+anova(m, by="term")
+m <- capscale(cca ~ ., dune.env)
+anova(m, by="term")
+rm(m, cca)
+
+### end Benedicte Bachelot tests
+
+### Richard Telford tweeted this example on 23/2/2015. Fails in 2.2-1,
+### but should work now. Also issue #100 in github.com/vegandevs/vegan.
+set.seed(4711)
+data(dune, dune.env)
+foo <- function(x, env) {
+    m <- rda(x ~ Manure + A1, data = env)
+    anova(m, by = "margin")
+}
+out <- lapply(dune, foo, env = dune.env)
+out$Poatriv
+rm(foo, out)
+### end Richard Telford test
+
+
+### nestednodf: test case by Daniel Spitale in a comment to News on
+### the release of vegan 1.17-6 in vegan.r-forge.r-project.org.
+x <- c(1,0,1,1,1,1,1,1,0,0,0,1,1,1,0,1,1,0,0,0,1,1,0,0,0)
+m1 <- matrix(x, nrow=5, ncol=5, byrow=FALSE)# as in Fig 2 Almeida-Neto et al 2008.
+(nodf1 <- nestednodf(m1, order = FALSE, weighted = FALSE))
+## Now the same matrix but with abundance data
+x <- c(5,0,2,1,1,4,1,1,0,0,0,7,1,1,0,3,1,0,0,0,9,1,0,0,0)
+m <- matrix(x, nrow=5, ncol=5, byrow=FALSE)
+(nodfq <- nestednodf(m, order = FALSE, weighted = FALSE))
+identical(nodf1, nodfq)
+rm(x, m, m1, nodfq, nodf1)
+### end nestednodf
+
+### envfit & plot.envfit: latter failed if na.action resulted in only
+### observation with a given factor level was removed. plot.envfit would
+### fail with error about too long subscript
+### fixed case where data presented to envfit also has extraneous levels
+data(dune)
+data(dune.env)
+## add a new level to one of the factors
+levels(dune.env$Management) <- c(levels(dune.env$Management), "foo")
+## fit nMDS and envfit
+set.seed(1)
+mod <- metaMDS(dune)
+ef <- envfit(mod, dune.env, permutations = 99)
+plot(mod)
+plot(ef, p.max = 0.1)
+rm(mod, ef)
+### end envfit & plot.envfit
+
+### protest (& Procrustes analysis): Stability of the permutations and
+### other results.
+data(mite)
+mod <- rda(mite)
+x <- scores(mod, display = "si", choices=1:6)
+set.seed(4711)
+xp <- x[sample(nrow(x)),]
+pro <- protest(x, xp, permutations = how(nperm = 99))
+pro
+pro$t
+rm(x, xp, pro)
+### end protest
+
+### Check that functions related to predict.rda work correctly for all
+### constrained ordination methods.
+
+### simulate.rda/cca/capscale: based on predict.* and the following
+### should get back the data
+data(dune, dune.env)
+ind <- seq_len(nrow(dune))
+target <- as.matrix(dune)
+## rda
+mod <- rda(dune ~ Condition(Moisture) + Management + A1, dune.env)
+dat <- simulate(mod, indx = ind)
+all.equal(dat, target, check.attributes = FALSE)
+## cca
+mod <- cca(dune ~ Condition(Moisture) + Management + A1, dune.env)
+dat <- simulate(mod, indx = ind)
+all.equal(dat, target, check.attributes = FALSE)
+## capscale: Euclidean distances -- non-Euclidean distances have an
+## imaginary component and will not give back the data.
+d <- dist(dune)
+mod <- capscale(d ~ Condition(Moisture) + Management + A1, dune.env)
+dat <- simulate(mod, indx = ind)
+all.equal(dat, d, check.attributes = FALSE)
+## clean up
+rm(ind, target, mod, dat, d)
+### end simulate.*
+
+### test metaMDS works with long expression for comm
+### originally reported to GLS by Richard Telford
+data(varespec)
+set.seed(1)
+mod <- metaMDS(subset(varespec, select = colSums(varespec) > 0, subset = rowSums(varespec) > 0))
+mod
+rm(mod)
+### The above should run without error & last lines tests changes to the
+### printed output
+
+## dbrda tests
+
+## the following three should be all equal
+data(varespec, varechem)
+(mr <- rda(varespec ~ Al + P + Condition(pH), varechem))
+(md <- dbrda(varespec ~ Al + P + Condition(pH), varechem))
+(mc <- capscale(varespec ~ Al + P + Condition(pH), varechem))
+## the following two should be zero (within 1e-15)
+p <- shuffleSet(nrow(varespec), 999)
+range(permustats(anova(mr, permutations=p))$permutations -
+          permustats(anova(md, permutations=p))$permutations)
+range(permustats(anova(mr, permutations=p))$permutations -
+          permustats(anova(mc, permutations=p))$permutations)
+## the following two should be equal
+d <- vegdist(wisconsin(sqrt(varespec)))
+(md <- dbrda(d ~ Al + P + Condition(pH), varechem))
+(mc <- capscale(d ~ Al + P + Condition(pH), varechem))
+(amd <- anova(md, permutations = p))
+(amc <- anova(mc, permutations = p))
+## should be zero (within 1e-15)
+range(permustats(amd)$permutations - permustats(amc)$permutations)
+rm(mr, md, mc, d, amd, amc)
diff --git a/tests/vegan-tests.Rout.save b/tests/vegan-tests.Rout.save
new file mode 100644
index 0000000..e5c5028
--- /dev/null
+++ b/tests/vegan-tests.Rout.save
@@ -0,0 +1,886 @@
+
+R Under development (unstable) (2016-06-08 r70729) -- "Unsuffered Consequences"
+Copyright (C) 2016 The R Foundation for Statistical Computing
+Platform: x86_64-pc-linux-gnu (64-bit)
+
+R is free software and comes with ABSOLUTELY NO WARRANTY.
+You are welcome to redistribute it under certain conditions.
+Type 'license()' or 'licence()' for distribution details.
+
+R is a collaborative project with many contributors.
+Type 'contributors()' for more information and
+'citation()' on how to cite R or R packages in publications.
+
+Type 'demo()' for some demos, 'help()' for on-line help, or
+'help.start()' for an HTML browser interface to help.
+Type 'q()' to quit R.
+
+> ### vegan-tests: unit tests for vegan functions
+> 
+> ### This file contains unit tests for vegan functions. This file is
+> ### run in R CMD check and its results are compared against previously
+> ### saved results in vegan-tests.Rout.save. If you change tests, you
+> ### must generate new vegan-tests.Rout.save in this directory.
+> 
+> ### The current plan is that tests/ are not included in the CRAN
+> ### release, but only in the development versin of vegan in R-Forge.
+> 
+> ### The tests here are not intended for human reading. The tests need
+> ### not be ecological or biologically meaningful, but they are only
+> ### intended for testing strange arguments, protect against
+> ### regressions and test correctness of results.
+> 
+> ### The tests are in a single file and you should clean work space
+> ### after the unit test. You should set random number seed (if needed)
+> ### for comparison against vegan-tests.Rout.save, and you should
+> ### remove the seed after the unit test. If possible, avoid very long
+> ### lasting tests.
+> 
+> ###<--- BEGIN TESTS --->
+> suppressPackageStartupMessages(require(vegan))
+> ###<--- BEGIN anova.cca test --->
+> ### anova.cca tests: should work with (1) subset, (2) missing values,
+> ### (3) with functions of variables poly(A1,2), (4) variables in data
+> ### frame attached or in data=, or (5) in working environment
+> set.seed(4711)
+> data(dune)
+> data(dune.env)
+> df <- dune.env
+> df$Management[c(1,5)] <- NA
+> ## formula
+> fla <- as.formula("dune ~ Management + poly(A1, 2) + spno")
+> ### variable in the .GlobalEnv
+> spno <- specnumber(dune)
+> ### data= argument
+> ## cca/rda
+> m <-  cca(fla, data=df,  na.action=na.exclude,  subset = Use != "Pasture" & spno > 7)
+> anova(m, permutations=99)
+Permutation test for cca under reduced model
+Permutation: free
+Number of permutations: 99
+
+Model: cca(formula = dune ~ Management + poly(A1, 2) + spno, data = df, na.action = na.exclude, subset = Use != "Pasture" & spno > 7)
+         Df ChiSquare      F Pr(>F)  
+Model     6   1.25838 1.3106   0.07 .
+Residual  5   0.80011                
+---
+Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
+> ## vegan 2.1-40 cannot handle missing data in next two
+> ##anova(m, by="term", permutations=99)
+> ##anova(m, by="margin", permutations=99)
+> anova(m, by="axis", permutations=99)
+Permutation test for cca under reduced model
+Marginal tests for axes
+Permutation: free
+Number of permutations: 99
+
+Model: cca(formula = dune ~ Management + poly(A1, 2) + spno, data = df, na.action = na.exclude, subset = object$subset)
+         Df ChiSquare      F Pr(>F)   
+CCA1      1   0.46993 2.9366   0.01 **
+CCA2      1   0.26217 1.6384   0.15   
+CCA3      1   0.19308 1.2066   0.29   
+CCA4      1   0.18345 1.1464   0.37   
+CCA5      1   0.08871 0.5544   0.77   
+CCA6      1   0.06104 0.3815   0.90   
+Residual  5   0.80011                 
+---
+Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
+> ## capscale
+> p <- capscale(fla, data=df, na.action=na.exclude, subset = Use != "Pasture" & spno > 7)
+> anova(p, permutations=99)
+Permutation test for capscale under reduced model
+Permutation: free
+Number of permutations: 99
+
+Model: capscale(formula = dune ~ Management + poly(A1, 2) + spno, data = df, na.action = na.exclude, subset = Use != "Pasture" & spno > 7)
+         Df Variance      F Pr(>F)  
+Model     6   59.582 1.6462   0.04 *
+Residual  5   30.160                
+---
+Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
+> ## vegan 2.1-40 cannot handle missing data in next two
+> ##anova(p, by="term", permutations=99)
+> ##anova(p, by="margin", permutations=99)
+> anova(p, by="axis", permutations=99)
+Permutation test for capscale under reduced model
+Marginal tests for axes
+Permutation: free
+Number of permutations: 99
+
+Model: capscale(formula = dune ~ Management + poly(A1, 2) + spno, data = df, na.action = na.exclude, subset = object$subset)
+         Df Variance      F Pr(>F)  
+CAP1      1  25.0252 4.1487   0.03 *
+CAP2      1  15.8759 2.6319   0.07 .
+CAP3      1   8.0942 1.3419   0.25  
+CAP4      1   5.0675 0.8401   0.64  
+CAP5      1   3.5671 0.5914   0.85  
+CAP6      1   1.9520 0.3236   0.96  
+Residual  5  30.1605                
+---
+Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
+> ## see that capscale can be updated and also works with 'dist' input
+> dis <- vegdist(dune)
+> p <- update(p, dis ~ .)
+> anova(p, permutations=99)
+Permutation test for capscale under reduced model
+Permutation: free
+Number of permutations: 99
+
+Model: capscale(formula = dis ~ Management + poly(A1, 2) + spno, data = df, na.action = na.exclude, subset = Use != "Pasture" & spno > 7)
+         Df SumOfSqs      F Pr(>F)
+Model     6  1.52798 1.6548   0.11
+Residual  5  0.76948              
+> ## vegan 2.1-40 cannot handle missing data in next two
+> ##anova(p, by="term", permutations=99)
+> ##anova(p, by="margin", permutations=99)
+> anova(p, by="axis", permutations=99)
+imaginary variation was discarded
+Permutation test for capscale under reduced model
+Marginal tests for axes
+Permutation: free
+Number of permutations: 99
+
+Model: capscale(formula = dis ~ Management + poly(A1, 2) + spno, data = df, na.action = na.exclude, subset = object$subset)
+         Df SumOfSqs      F Pr(>F)  
+CAP1      1  0.77834 4.9533   0.02 *
+CAP2      1  0.45691 2.9078   0.03 *
+CAP3      1  0.14701 0.9355   0.50  
+CAP4      1  0.11879 0.7560   0.65  
+CAP5      1  0.04213 0.2681   0.98  
+CAP6      1  0.00522 0.0332   1.00  
+Residual  5  0.76948                
+---
+Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
+> ### attach()ed data frame instead of data=
+> attach(df)
+> q <- cca(fla, na.action = na.omit, subset = Use != "Pasture" & spno > 7)
+> anova(q, permutations=99)
+Permutation test for cca under reduced model
+Permutation: free
+Number of permutations: 99
+
+Model: cca(formula = dune ~ Management + poly(A1, 2) + spno, na.action = na.omit, subset = Use != "Pasture" & spno > 7)
+         Df ChiSquare      F Pr(>F)
+Model     6   1.25838 1.3106   0.12
+Residual  5   0.80011              
+> ## commented tests below fail in vegan 2.1-40 because number of
+> ## observations changes
+> ##anova(q, by="term", permutations=99) 
+> ##anova(q, by="margin", permutations=99)
+> anova(q, by="axis", permutations=99)
+Permutation test for cca under reduced model
+Marginal tests for axes
+Permutation: free
+Number of permutations: 99
+
+Model: cca(formula = dune ~ Management + poly(A1, 2) + spno, na.action = na.omit, subset = object$subset)
+         Df ChiSquare      F Pr(>F)  
+CCA1      1   0.46993 2.9366   0.03 *
+CCA2      1   0.26217 1.6384   0.20  
+CCA3      1   0.19308 1.2066   0.34  
+CCA4      1   0.18345 1.1464   0.33  
+CCA5      1   0.08871 0.5544   0.69  
+CCA6      1   0.06104 0.3815   0.89  
+Residual  5   0.80011                
+---
+Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
+> ### Check that constrained ordination functions can be embedded.
+> ### The data.frame 'df' is still attach()ed.
+> foo <- function(bar, Y, X, ...)
++ {
++     bar <- match.fun(bar)
++     bar(Y ~ X, ...)
++ }
+> foo("cca", dune, Management, na.action = na.omit)
+Call: cca(formula = Y ~ X, na.action = ..1)
+
+              Inertia Proportion Rank
+Total          2.0949     1.0000     
+Constrained    0.6236     0.2977    3
+Unconstrained  1.4713     0.7023   14
+Inertia is mean squared contingency coefficient 
+2 observations deleted due to missingness 
+
+Eigenvalues for constrained axes:
+   CCA1    CCA2    CCA3 
+0.31573 0.20203 0.10584 
+
+Eigenvalues for unconstrained axes:
+   CA1    CA2    CA3    CA4    CA5    CA6    CA7    CA8    CA9   CA10   CA11 
+0.4478 0.1910 0.1788 0.1409 0.1202 0.0949 0.0732 0.0570 0.0531 0.0448 0.0312 
+  CA12   CA13   CA14 
+0.0181 0.0104 0.0098 
+
+> foo("rda", dune, Management, na.action = na.omit)
+Call: rda(formula = Y ~ X, na.action = ..1)
+
+              Inertia Proportion Rank
+Total         85.1176     1.0000     
+Constrained   32.7765     0.3851    3
+Unconstrained 52.3412     0.6149   14
+Inertia is variance 
+2 observations deleted due to missingness 
+
+Eigenvalues for constrained axes:
+  RDA1   RDA2   RDA3 
+15.956 13.621  3.199 
+
+Eigenvalues for unconstrained axes:
+   PC1    PC2    PC3    PC4    PC5    PC6    PC7    PC8    PC9   PC10   PC11 
+14.893  9.136  6.042  5.674  3.638  2.865  2.504  1.968  1.888  1.239  0.959 
+  PC12   PC13   PC14 
+ 0.779  0.501  0.255 
+
+> foo("capscale", dune, Management, dist="jaccard", na.action = na.omit)
+Call: bar(formula = Y ~ X, distance = "jaccard", na.action = ..2)
+
+              Inertia Proportion Rank
+Total          5.1432     1.0000     
+Constrained    1.6453     0.3199    3
+Unconstrained  3.4979     0.6801   14
+Inertia is squared Jaccard distance 
+2 observations deleted due to missingness 
+
+Eigenvalues for constrained axes:
+  CAP1   CAP2   CAP3 
+0.8504 0.6047 0.1902 
+
+Eigenvalues for unconstrained axes:
+  MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8   MDS9  MDS10  MDS11 
+1.0474 0.4406 0.4386 0.4054 0.2847 0.1947 0.1546 0.1506 0.0957 0.0935 0.0761 
+ MDS12  MDS13  MDS14 
+0.0603 0.0436 0.0120 
+
+> foo("capscale", vegdist(dune), Management, na.action = na.omit)
+Call: bar(formula = Y ~ X, na.action = ..1)
+
+              Inertia Proportion Eigenvals Rank
+Total          3.7652     1.0000    3.9493     
+Constrained    1.4179     0.3766    1.4456    3
+Unconstrained  2.3473     0.6234    2.5037   13
+Imaginary                          -0.1841    4
+Inertia is squared Bray distance 
+2 observations deleted due to missingness 
+
+Eigenvalues for constrained axes:
+  CAP1   CAP2   CAP3 
+0.7910 0.5497 0.1050 
+
+Eigenvalues for unconstrained axes:
+  MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8   MDS9  MDS10  MDS11 
+1.0756 0.3691 0.3349 0.2695 0.1651 0.0931 0.0726 0.0673 0.0286 0.0174 0.0093 
+ MDS12  MDS13 
+0.0011 0.0001 
+
+> foo("capscale", dune, Management, na.action = na.omit) ## fails in 2.2-1
+Call: bar(formula = Y ~ X, na.action = ..1)
+
+              Inertia Proportion Rank
+Total         85.1176     1.0000     
+Constrained   32.7765     0.3851    3
+Unconstrained 52.3412     0.6149   14
+Inertia is mean squared Euclidean distance 
+2 observations deleted due to missingness 
+
+Eigenvalues for constrained axes:
+  CAP1   CAP2   CAP3 
+15.956 13.621  3.199 
+
+Eigenvalues for unconstrained axes:
+  MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8   MDS9  MDS10  MDS11 
+14.893  9.136  6.042  5.674  3.638  2.865  2.504  1.968  1.888  1.239  0.959 
+ MDS12  MDS13  MDS14 
+ 0.779  0.501  0.255 
+
+> ###
+> detach(df)
+> ### Check that statistics match in partial constrained ordination
+> m <- cca(dune ~ A1 + Moisture + Condition(Management), dune.env, subset = A1 > 3)
+> tab <- anova(m, by = "axis", permutations = 99)
+> m
+Call: cca(formula = dune ~ A1 + Moisture + Condition(Management), data
+= dune.env, subset = A1 > 3)
+
+              Inertia Proportion Rank
+Total          2.0976     1.0000     
+Conditional    0.6251     0.2980    3
+Constrained    0.5555     0.2648    4
+Unconstrained  0.9170     0.4372   10
+Inertia is mean squared contingency coefficient 
+
+Eigenvalues for constrained axes:
+   CCA1    CCA2    CCA3    CCA4 
+0.27109 0.14057 0.08761 0.05624 
+
+Eigenvalues for unconstrained axes:
+    CA1     CA2     CA3     CA4     CA5     CA6     CA7     CA8     CA9    CA10 
+0.31042 0.13634 0.11974 0.09408 0.07763 0.06425 0.04449 0.02925 0.02785 0.01299 
+
+> tab
+Permutation test for cca under reduced model
+Marginal tests for axes
+Permutation: free
+Number of permutations: 99
+
+Model: cca(formula = dune ~ A1 + Moisture + Condition(Management), data = dune.env, subset = object$subset)
+         Df ChiSquare      F Pr(>F)  
+CCA1      1   0.27109 2.9561   0.04 *
+CCA2      1   0.14057 1.5329   0.21  
+CCA3      1   0.08761 0.9553   0.72  
+CCA4      1   0.05624 0.6132   0.97  
+Residual 10   0.91705                
+---
+Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
+> all.equal(tab[,2], c(m$CCA$eig, m$CA$tot.chi), check.attributes=FALSE)
+[1] TRUE
+> tab[nrow(tab),1] == m$CA$rank
+[1] TRUE
+> ## clean-up
+> rm(df, spno, fla, m, p, q, tab, dis, foo, .Random.seed)
+> ### <--- END anova.cca test --->
+> 
+> ### Sven Neulinger <sneulinger@ifam.uni-kiel.de> reported failures in
+> ### partial analysis which (mostly) were fixed in r2087. Below his test.
+> 
+> set.seed(4711)
+> X <- matrix(rnorm(30*6), 30, 6)
+> 
+> A <- factor(rep(rep(c("a","b"), each=3),5))
+> B <- factor(rep(c("a","b","c"), 10))
+> ## Sven Neulinger's tests failed still in 2.2-1, now due to look-up
+> ## order: function stats::C was found before matrix 'C'. The test was
+> ## OK when non-function name was used ('CC').
+> C <- factor(rep(c(1:5), each=6))
+> 
+> ## partial db-RDA
+> cap.model.cond <- capscale(X ~ A + B + Condition(C))
+> anova(cap.model.cond, by="axis", strata=C)  # -> error pre r2287
+Permutation test for capscale under reduced model
+Marginal tests for axes
+Blocks:  strata 
+Permutation: free
+Number of permutations: 999
+
+Model: capscale(formula = X ~ A + B + Condition(C))
+         Df Variance      F Pr(>F)
+CAP1      1   0.2682 1.3075  0.242
+CAP2      1   0.0685 0.3339  0.921
+CAP3      1   0.0455 0.2217  0.966
+Residual 22   4.5130              
+> anova(cap.model.cond, by="terms", strata=C)  # -> error pre r2287
+Permutation test for capscale under reduced model
+Terms added sequentially (first to last)
+Blocks:  strata 
+Permutation: free
+Number of permutations: 999
+
+Model: capscale(formula = X ~ A + B + Condition(C))
+         Df Variance      F Pr(>F)
+A         1   0.1316 0.6415  0.680
+B         2   0.2506 0.6108  0.824
+Residual 22   4.5130              
+> 
+> ## db-RDA without conditional factor
+> cap.model <- capscale(X ~ A + B)
+> anova(cap.model, by="axis", strata=C)  # -> no error
+Permutation test for capscale under reduced model
+Marginal tests for axes
+Blocks:  strata 
+Permutation: free
+Number of permutations: 999
+
+Model: capscale(formula = X ~ A + B)
+         Df Variance      F Pr(>F)
+CAP1      1   0.2682 1.3267  0.240
+CAP2      1   0.0685 0.3388  0.913
+CAP3      1   0.0455 0.2249  0.964
+Residual 26   5.2565              
+> anova(cap.model, by="terms", strata=C)  # -> no error
+Permutation test for capscale under reduced model
+Terms added sequentially (first to last)
+Blocks:  strata 
+Permutation: free
+Number of permutations: 999
+
+Model: capscale(formula = X ~ A + B)
+         Df Variance      F Pr(>F)
+A         1   0.1316 0.6509  0.693
+B         2   0.2506 0.6198  0.829
+Residual 26   5.2565              
+> 
+> # partial RDA
+> rda.model.cond <- rda(X ~ A + B + Condition(C))
+> anova(rda.model.cond, by="axis", strata=C)  # -> no error
+Permutation test for rda under reduced model
+Marginal tests for axes
+Blocks:  strata 
+Permutation: free
+Number of permutations: 999
+
+Model: rda(formula = X ~ A + B + Condition(C))
+         Df Variance      F Pr(>F)
+RDA1      1   0.2682 1.3075  0.286
+RDA2      1   0.0685 0.3339  0.921
+RDA3      1   0.0455 0.2217  0.963
+Residual 22   4.5130              
+> anova(rda.model.cond, by="terms", strata=C)  # -> error pre r2287
+Permutation test for rda under reduced model
+Terms added sequentially (first to last)
+Blocks:  strata 
+Permutation: free
+Number of permutations: 999
+
+Model: rda(formula = X ~ A + B + Condition(C))
+         Df Variance      F Pr(>F)
+A         1   0.1316 0.6415  0.669
+B         2   0.2506 0.6108  0.827
+Residual 22   4.5130              
+> 
+> # RDA without conditional factor
+> rda.model <- rda(X ~ A + B)
+> anova(rda.model, by="axis", strata=C)  # -> no error
+Permutation test for rda under reduced model
+Marginal tests for axes
+Blocks:  strata 
+Permutation: free
+Number of permutations: 999
+
+Model: rda(formula = X ~ A + B)
+         Df Variance      F Pr(>F)
+RDA1      1   0.2682 1.3267  0.258
+RDA2      1   0.0685 0.3388  0.898
+RDA3      1   0.0455 0.2249  0.971
+Residual 26   5.2565              
+> anova(rda.model, by="terms", strata=C)  # -> no error
+Permutation test for rda under reduced model
+Terms added sequentially (first to last)
+Blocks:  strata 
+Permutation: free
+Number of permutations: 999
+
+Model: rda(formula = X ~ A + B)
+         Df Variance      F Pr(>F)
+A         1   0.1316 0.6509  0.695
+B         2   0.2506 0.6198  0.820
+Residual 26   5.2565              
+> ## clean.up
+> rm(X, A, B, C, cap.model.cond, cap.model, rda.model.cond, rda.model)
+> ### end Sven Neulinger's tests
+> 
+> ### Benedicte Bachelot informed us that several anova.cca* functions
+> ### failed if community data name was the same as a function name: the
+> ### function name was found first, and used instead ofa data. This
+> ### seems to be related to the same problem that Sven Neulinger
+> ### communicated, and his examples still faile if Condition or strata
+> ### are function names. However, the following examples that failed
+> ### should work now:
+> 
+> set.seed(4711)
+> cca <- dune
+> m <- cca(cca ~ ., dune.env)
+> anova(m, by="term")
+Permutation test for cca under reduced model
+Terms added sequentially (first to last)
+Permutation: free
+Number of permutations: 999
+
+Model: cca(formula = cca ~ A1 + Moisture + Management + Use + Manure, data = dune.env)
+           Df ChiSquare      F Pr(>F)   
+A1          1   0.22476 2.5704  0.010 **
+Moisture    3   0.51898 1.9783  0.008 **
+Management  3   0.39543 1.5074  0.064 . 
+Use         2   0.10910 0.6238  0.905   
+Manure      3   0.25490 0.9717  0.493   
+Residual    7   0.61210                 
+---
+Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
+> m <- capscale(cca ~ ., dune.env)
+> anova(m, by="term")
+Permutation test for capscale under reduced model
+Terms added sequentially (first to last)
+Permutation: free
+Number of permutations: 999
+
+Model: capscale(formula = cca ~ A1 + Moisture + Management + Use + Manure, data = dune.env)
+           Df Variance      F Pr(>F)   
+A1          1   8.1148 2.7156  0.008 **
+Moisture    3  21.6497 2.4150  0.008 **
+Management  3  19.1153 2.1323  0.009 **
+Use         2   4.7007 0.7865  0.730   
+Manure      3   9.6257 1.0737  0.377   
+Residual    7  20.9175                 
+---
+Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
+> rm(m, cca)
+> 
+> ### end Benedicte Bachelot tests
+> 
+> ### Richard Telford tweeted this example on 23/2/2015. Fails in 2.2-1,
+> ### but should work now. Also issue #100 in github.com/vegandevs/vegan.
+> set.seed(4711)
+> data(dune, dune.env)
+> foo <- function(x, env) {
++     m <- rda(x ~ Manure + A1, data = env)
++     anova(m, by = "margin")
++ }
+> out <- lapply(dune, foo, env = dune.env)
+> out$Poatriv
+Permutation test for rda under reduced model
+Marginal effects of terms
+Permutation: free
+Number of permutations: 999
+
+Model: rda(formula = x ~ Manure + A1, data = env)
+         Df Variance      F Pr(>F)   
+Manure    4   4.7257 5.7006  0.009 **
+A1        1   0.0153 0.0736  0.783   
+Residual 14   2.9014                 
+---
+Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
+> rm(foo, out)
+> ### end Richard Telford test
+> 
+> 
+> ### nestednodf: test case by Daniel Spitale in a comment to News on
+> ### the release of vegan 1.17-6 in vegan.r-forge.r-project.org.
+> x <- c(1,0,1,1,1,1,1,1,0,0,0,1,1,1,0,1,1,0,0,0,1,1,0,0,0)
+> m1 <- matrix(x, nrow=5, ncol=5, byrow=FALSE)# as in Fig 2 Almeida-Neto et al 2008.
+> (nodf1 <- nestednodf(m1, order = FALSE, weighted = FALSE))
+N columns  : 53.33333 
+N rows     : 63.33333 
+NODF       : 58.33333 
+Matrix fill: 0.56 
+> ## Now the same matrix but with abundance data
+> x <- c(5,0,2,1,1,4,1,1,0,0,0,7,1,1,0,3,1,0,0,0,9,1,0,0,0)
+> m <- matrix(x, nrow=5, ncol=5, byrow=FALSE)
+> (nodfq <- nestednodf(m, order = FALSE, weighted = FALSE))
+N columns  : 53.33333 
+N rows     : 63.33333 
+NODF       : 58.33333 
+Matrix fill: 0.56 
+> identical(nodf1, nodfq)
+[1] TRUE
+> rm(x, m, m1, nodfq, nodf1)
+> ### end nestednodf
+> 
+> ### envfit & plot.envfit: latter failed if na.action resulted in only
+> ### observation with a given factor level was removed. plot.envfit would
+> ### fail with error about too long subscript
+> ### fixed case where data presented to envfit also has extraneous levels
+> data(dune)
+> data(dune.env)
+> ## add a new level to one of the factors
+> levels(dune.env$Management) <- c(levels(dune.env$Management), "foo")
+> ## fit nMDS and envfit
+> set.seed(1)
+> mod <- metaMDS(dune)
+Run 0 stress 0.1192678 
+Run 1 stress 0.1886532 
+Run 2 stress 0.1192678 
+... New best solution
+... Procrustes: rmse 4.497004e-05  max resid 0.0001297349 
+... Similar to previous best
+Run 3 stress 0.1192678 
+... New best solution
+... Procrustes: rmse 1.801542e-05  max resid 5.078152e-05 
+... Similar to previous best
+Run 4 stress 0.1183186 
+... New best solution
+... Procrustes: rmse 0.02025988  max resid 0.06488321 
+Run 5 stress 0.1192685 
+Run 6 stress 0.1939202 
+Run 7 stress 0.1808919 
+Run 8 stress 0.1183186 
+... Procrustes: rmse 1.538285e-05  max resid 4.789705e-05 
+... Similar to previous best
+Run 9 stress 0.1192679 
+Run 10 stress 0.1183186 
+... New best solution
+... Procrustes: rmse 1.244871e-05  max resid 3.745684e-05 
+... Similar to previous best
+Run 11 stress 0.1192686 
+Run 12 stress 0.1192683 
+Run 13 stress 0.1886532 
+Run 14 stress 0.1183186 
+... Procrustes: rmse 2.260742e-06  max resid 5.293932e-06 
+... Similar to previous best
+Run 15 stress 0.1192678 
+Run 16 stress 0.1183186 
+... Procrustes: rmse 3.225938e-06  max resid 7.314283e-06 
+... Similar to previous best
+Run 17 stress 0.2075713 
+Run 18 stress 0.1192678 
+Run 19 stress 0.1192685 
+Run 20 stress 0.1183186 
+... Procrustes: rmse 2.295609e-05  max resid 6.384852e-05 
+... Similar to previous best
+*** Solution reached
+> ef <- envfit(mod, dune.env, permutations = 99)
+> plot(mod)
+> plot(ef, p.max = 0.1)
+> rm(mod, ef)
+> ### end envfit & plot.envfit
+> 
+> ### protest (& Procrustes analysis): Stability of the permutations and
+> ### other results.
+> data(mite)
+> mod <- rda(mite)
+> x <- scores(mod, display = "si", choices=1:6)
+> set.seed(4711)
+> xp <- x[sample(nrow(x)),]
+> pro <- protest(x, xp, permutations = how(nperm = 99))
+> pro
+
+Call:
+protest(X = x, Y = xp, permutations = how(nperm = 99)) 
+
+Procrustes Sum of Squares (m12 squared):        0.9147 
+Correlation in a symmetric Procrustes rotation: 0.292 
+Significance:  0.08 
+
+Permutation: free
+Number of permutations: 99
+
+> pro$t
+ [1] 0.2056649 0.2008622 0.2062525 0.2656158 0.2739148 0.1990895 0.3124461
+ [8] 0.2287779 0.2033140 0.2396172 0.1868019 0.2736072 0.1830199 0.2026019
+[15] 0.2402570 0.2286169 0.2791609 0.2214468 0.2356083 0.2188325 0.2097262
+[22] 0.2596154 0.2560289 0.2190367 0.2174689 0.2438396 0.1991101 0.2374612
+[29] 0.2030745 0.2205115 0.2566758 0.1448623 0.2354268 0.2419134 0.3144177
+[36] 0.2368505 0.2442661 0.2272011 0.3184241 0.2200089 0.2598430 0.2301587
+[43] 0.2763337 0.2332606 0.1935269 0.2315727 0.2573623 0.2021127 0.2387335
+[50] 0.2419087 0.2213094 0.2231619 0.2577845 0.2828219 0.2554605 0.2830915
+[57] 0.2342396 0.2137396 0.2151201 0.2432896 0.1956238 0.2055716 0.2329736
+[64] 0.2086125 0.2039124 0.1955711 0.2038045 0.2358886 0.2579199 0.1808128
+[71] 0.2155189 0.2967100 0.2480105 0.2010537 0.2718478 0.2182713 0.2471893
+[78] 0.2310223 0.2007771 0.2902640 0.2392380 0.2551756 0.3476679 0.2632614
+[85] 0.2289929 0.2222382 0.2503562 0.1983700 0.2084773 0.2406556 0.2478302
+[92] 0.2136439 0.3251671 0.2048928 0.3098776 0.2501555 0.2677039 0.2427125
+[99] 0.2693285
+> rm(x, xp, pro)
+> ### end protest
+> 
+> ### Check that functions related to predict.rda work correctly for all
+> ### constrained ordination methods.
+> 
+> ### simulate.rda/cca/capscale: based on predict.* and the following
+> ### should get back the data
+> data(dune, dune.env)
+> ind <- seq_len(nrow(dune))
+> target <- as.matrix(dune)
+> ## rda
+> mod <- rda(dune ~ Condition(Moisture) + Management + A1, dune.env)
+> dat <- simulate(mod, indx = ind)
+> all.equal(dat, target, check.attributes = FALSE)
+[1] TRUE
+> ## cca
+> mod <- cca(dune ~ Condition(Moisture) + Management + A1, dune.env)
+> dat <- simulate(mod, indx = ind)
+> all.equal(dat, target, check.attributes = FALSE)
+[1] TRUE
+> ## capscale: Euclidean distances -- non-Euclidean distances have an
+> ## imaginary component and will not give back the data.
+> d <- dist(dune)
+> mod <- capscale(d ~ Condition(Moisture) + Management + A1, dune.env)
+> dat <- simulate(mod, indx = ind)
+> all.equal(dat, d, check.attributes = FALSE)
+[1] TRUE
+> ## clean up
+> rm(ind, target, mod, dat, d)
+> ### end simulate.*
+> 
+> ### test metaMDS works with long expression for comm
+> ### originally reported to GLS by Richard Telford
+> data(varespec)
+> set.seed(1)
+> mod <- metaMDS(subset(varespec, select = colSums(varespec) > 0, subset = rowSums(varespec) > 0))
+Square root transformation
+Wisconsin double standardization
+Run 0 stress 0.1843196 
+Run 1 stress 0.2455912 
+Run 2 stress 0.2169407 
+Run 3 stress 0.2313231 
+Run 4 stress 0.1974406 
+Run 5 stress 0.1858402 
+Run 6 stress 0.1948414 
+Run 7 stress 0.2265717 
+Run 8 stress 0.222507 
+Run 9 stress 0.2023215 
+Run 10 stress 0.2673177 
+Run 11 stress 0.1976151 
+Run 12 stress 0.1852397 
+Run 13 stress 0.2341085 
+Run 14 stress 0.1955867 
+Run 15 stress 0.2137409 
+Run 16 stress 0.2109638 
+Run 17 stress 0.1825658 
+... New best solution
+... Procrustes: rmse 0.04169825  max resid 0.1521436 
+Run 18 stress 0.1843197 
+Run 19 stress 0.2570119 
+Run 20 stress 0.3760596 
+*** No convergence -- monoMDS stopping criteria:
+    20: stress ratio > sratmax
+> mod
+
+Call:
+metaMDS(comm = subset(varespec, select = colSums(varespec) >      0, subset = rowSums(varespec) > 0)) 
+
+global Multidimensional Scaling using monoMDS
+
+Data:     wisconsin(sqrt(subset(varespec, select = colSums(varespec) > 0, subset = rowSums(varespec) > 0))) 
+Distance: bray 
+
+Dimensions: 2 
+Stress:     0.1825658 
+Stress type 1, weak ties
+No convergent solutions - best solution after 20 tries
+Scaling: centring, PC rotation, halfchange scaling 
+Species: expanded scores based on 'wisconsin(sqrt(subset(varespec, select = colSums(varespec) > 0, subset = rowSums(varespec) > 0)))' 
+
+> rm(mod)
+> ### The above should run without error & last lines tests changes to the
+> ### printed output
+> 
+> ## dbrda tests
+> 
+> ## the following three should be all equal
+> data(varespec, varechem)
+> (mr <- rda(varespec ~ Al + P + Condition(pH), varechem))
+Call: rda(formula = varespec ~ Al + P + Condition(pH), data = varechem)
+
+                Inertia Proportion Rank
+Total         1825.6594     1.0000     
+Conditional    234.0961     0.1282    1
+Constrained    424.4375     0.2325    2
+Unconstrained 1167.1258     0.6393   20
+Inertia is variance 
+
+Eigenvalues for constrained axes:
+  RDA1   RDA2 
+314.60 109.84 
+
+Eigenvalues for unconstrained axes:
+  PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8 
+692.3 171.3 106.1  59.9  35.1  30.1  22.4  16.8 
+(Showed only 8 of all 20 unconstrained eigenvalues)
+
+> (md <- dbrda(varespec ~ Al + P + Condition(pH), varechem))
+Call: dbrda(formula = varespec ~ Al + P + Condition(pH), data =
+varechem)
+
+                Inertia Proportion Rank
+Total         1825.6594     1.0000     
+Conditional    234.0961     0.1282    1
+Constrained    424.4375     0.2325    2
+Unconstrained 1167.1258     0.6393   20
+Inertia is mean squared Euclidean distance 
+
+Eigenvalues for constrained axes:
+dbRDA1 dbRDA2 
+314.60 109.84 
+
+Eigenvalues for unconstrained axes:
+ MDS1  MDS2  MDS3  MDS4  MDS5  MDS6  MDS7  MDS8 
+692.3 171.3 106.1  59.9  35.1  30.1  22.4  16.8 
+(Showed only 8 of all 20 unconstrained eigenvalues)
+
+> (mc <- capscale(varespec ~ Al + P + Condition(pH), varechem))
+Call: capscale(formula = varespec ~ Al + P + Condition(pH), data =
+varechem)
+
+                Inertia Proportion Rank
+Total         1825.6594     1.0000     
+Conditional    234.0961     0.1282    1
+Constrained    424.4375     0.2325    2
+Unconstrained 1167.1258     0.6393   20
+Inertia is mean squared Euclidean distance 
+
+Eigenvalues for constrained axes:
+  CAP1   CAP2 
+314.60 109.84 
+
+Eigenvalues for unconstrained axes:
+ MDS1  MDS2  MDS3  MDS4  MDS5  MDS6  MDS7  MDS8 
+692.3 171.3 106.1  59.9  35.1  30.1  22.4  16.8 
+(Showed only 8 of all 20 unconstrained eigenvalues)
+
+> ## the following two should be zero (within 1e-15)
+> p <- shuffleSet(nrow(varespec), 999)
+> range(permustats(anova(mr, permutations=p))$permutations -
++           permustats(anova(md, permutations=p))$permutations)
+[1] -1.776357e-15  3.996803e-15
+> range(permustats(anova(mr, permutations=p))$permutations -
++           permustats(anova(mc, permutations=p))$permutations)
+[1] -1.776357e-15  4.884981e-15
+> ## the following two should be equal
+> d <- vegdist(wisconsin(sqrt(varespec)))
+> (md <- dbrda(d ~ Al + P + Condition(pH), varechem))
+Call: dbrda(formula = d ~ Al + P + Condition(pH), data = varechem)
+
+              Inertia Proportion Rank RealDims
+Total         2.54753    1.00000              
+Conditional   0.18911    0.07423    1         
+Constrained   0.39839    0.15638    2        2
+Unconstrained 1.96003    0.76939   20       17
+Inertia is squared Bray distance 
+
+Eigenvalues for constrained axes:
+ dbRDA1  dbRDA2 
+0.29646 0.10193 
+
+Eigenvalues for unconstrained axes:
+  MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8 
+0.4503 0.3031 0.2389 0.1677 0.1495 0.1444 0.1339 0.1112 
+(Showed only 8 of all 20 unconstrained eigenvalues)
+
+> (mc <- capscale(d ~ Al + P + Condition(pH), varechem))
+Call: capscale(formula = d ~ Al + P + Condition(pH), data = varechem)
+
+               Inertia Proportion Eigenvals Rank
+Total          2.54753    1.00000   2.59500     
+Conditional    0.18911    0.07423   0.19141    1
+Constrained    0.39839    0.15638   0.39920    2
+Unconstrained  1.96003    0.76939   2.00439   19
+Imaginary                          -0.04747    4
+Inertia is squared Bray distance 
+
+Eigenvalues for constrained axes:
+   CAP1    CAP2 
+0.29718 0.10201 
+
+Eigenvalues for unconstrained axes:
+  MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8 
+0.4505 0.3032 0.2394 0.1677 0.1504 0.1450 0.1341 0.1113 
+(Showed only 8 of all 19 unconstrained eigenvalues)
+
+> (amd <- anova(md, permutations = p))
+Permutation test for dbrda under reduced model
+Permutation: free
+Number of permutations: 999
+
+Model: dbrda(formula = d ~ Al + P + Condition(pH), data = varechem)
+         Df SumOfSqs      F Pr(>F)   
+Model     2  0.39839 2.0325  0.002 **
+Residual 20  1.96003                 
+---
+Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
+> (amc <- anova(mc, permutations = p))
+Permutation test for capscale under reduced model
+Permutation: free
+Number of permutations: 999
+
+Model: capscale(formula = d ~ Al + P + Condition(pH), data = varechem)
+         Df SumOfSqs      F Pr(>F)   
+Model     2  0.39839 2.0325  0.002 **
+Residual 20  1.96003                 
+---
+Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
+> ## should be zero (within 1e-15)
+> range(permustats(amd)$permutations - permustats(amc)$permutations)
+[1] -8.881784e-16  6.661338e-16
+> rm(mr, md, mc, d, amd, amc)
+> 
+> proc.time()
+   user  system elapsed 
+  9.516   0.056   9.566 

debug log:

solving c93e390 ...
found c93e390 in https://yhetil.org/guix/1466081273-15127-4-git-send-email-donttrustben@gmail.com/

applying [1/1] https://yhetil.org/guix/1466081273-15127-4-git-send-email-donttrustben@gmail.com/
diff --git a/gnu/packages/patches/vegan-revert-test-deletion.patch b/gnu/packages/patches/vegan-revert-test-deletion.patch
new file mode 100644
index 0000000..c93e390

1:44: trailing whitespace.
+> 
1:49: trailing whitespace.
+> 
1:51: trailing whitespace.
+> 
1:56: trailing whitespace.
+> 
1:58: trailing whitespace.
+> 
Checking patch gnu/packages/patches/vegan-revert-test-deletion.patch...
Applied patch gnu/packages/patches/vegan-revert-test-deletion.patch cleanly.
warning: squelched 2668 whitespace errors
warning: 2673 lines add whitespace errors.

index at:
100644 c93e3905e18cf26d2cc801f4612dcce415ef9f26	gnu/packages/patches/vegan-revert-test-deletion.patch

(*) Git path names are given by the tree(s) the blob belongs to.
    Blobs themselves have no identifier aside from the hash of its contents.^

Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/guix.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.