Running 'aitchison-tests.R' [2s]
  Running 'cca-object-tests.R' [164s]
  Running 'decostand-tests.R' [159s]
  Running 'oecosimu-tests.R' [2s]
  Comparing 'oecosimu-tests.Rout' to 'oecosimu-tests.Rout.save' ... OK
  Running 'vegan-tests.R' [175s]
Running the tests in 'tests/cca-object-tests.R' failed.
Complete output:
  > ## test the stability of cca object and its support functions
  > suppressPackageStartupMessages(require(vegan))
  > suppressPackageStartupMessages(require(parallel))
  > set.seed(4711)
  > op <- options(digits=5)
  > ## models
  > data(dune, dune.env)
  > mcca <- cca(dune ~ Condition(Management) + Manure + A1, dune.env)
  > mrda <- rda(dune ~ Condition(Management) + Manure + A1, dune.env)
  > mrda1 <- rda(dune ~ Condition(Management) + Manure + A1, dune.env, scale=TRUE)
  > mcap <- capscale(dune ~ Condition(Management) + Manure + A1, dune.env,
  +           dist = "bray")
  > mdb <- dbrda(dune ~ Condition(Management) + Manure + A1, dune.env,
  +              dist = "bray")
  > mancap <- capscale(dune ~ Condition(Management) + Manure + A1, dune.env,
  +           dist = "manhattan")
  > mandb <- dbrda(dune ~ Condition(Management) + Manure + A1, dune.env,
  +                dist = "manhattan")
  > ## 0-rank constraints
  > m0cca <- cca(dune ~ Condition(Management) + Management, dune.env)
  > ## univariate model, rank-1 constraint
  > H <- diversity(dune)
  > m1rda <- rda(H ~  A1, dune.env)
  > 
  > ## general appearance
  > mcca
  Call: cca(formula = dune ~ Condition(Management) + Manure + A1, data =
  dune.env)
  
                Inertia Proportion Rank
  Total           2.115      1.000     
  Conditional     0.604      0.285    3
  Constrained     0.450      0.213    4
  Unconstrained   1.062      0.502   12
  Inertia is scaled Chi-square 
  Some constraints or conditions were aliased because they were redundant
  
  Eigenvalues for constrained axes:
    CCA1   CCA2   CCA3   CCA4 
  0.2226 0.1226 0.0639 0.0406 
  
  Eigenvalues for unconstrained axes:
    CA1   CA2   CA3   CA4   CA5   CA6   CA7   CA8   CA9  CA10  CA11  CA12 
  0.318 0.159 0.140 0.116 0.079 0.075 0.045 0.040 0.038 0.028 0.013 0.012 
  
  > mrda
  Call: rda(formula = dune ~ Condition(Management) + Manure + A1, data =
  dune.env)
  
                Inertia Proportion Rank
  Total          84.124      1.000     
  Conditional    29.231      0.347    3
  Constrained    16.791      0.200    4
  Unconstrained  38.102      0.453   12
  Inertia is variance 
  Some constraints or conditions were aliased because they were redundant
  
  Eigenvalues for constrained axes:
  RDA1 RDA2 RDA3 RDA4 
  8.54 4.33 2.21 1.72 
  
  Eigenvalues for unconstrained axes:
    PC1   PC2   PC3   PC4   PC5   PC6   PC7   PC8   PC9  PC10  PC11  PC12 
  10.25  8.21  4.95  3.36  3.12  2.49  1.87  1.26  1.02  0.74  0.48  0.35 
  
  > mcap
  Call: capscale(formula = dune ~ Condition(Management) + Manure + A1,
  data = dune.env, distance = "bray")
  
                Inertia Proportion Rank
  Total          4.2990     1.0000     
  Conditional    1.5001     0.3489    3
  Constrained    1.0726     0.2495    4
  Unconstrained  2.0212     0.4701   12
  Imaginary     -0.2949    -0.0686    5
  Inertia is squared Bray distance 
  Species scores projected from 'dune' 
  Some constraints or conditions were aliased because they were redundant
  
  Eigenvalues for constrained axes:
   CAP1  CAP2  CAP3  CAP4 
  0.674 0.243 0.105 0.051 
  
  Eigenvalues for unconstrained axes:
   MDS1  MDS2  MDS3  MDS4  MDS5  MDS6  MDS7  MDS8  MDS9 MDS10 MDS11 MDS12 
  0.749 0.338 0.308 0.213 0.137 0.136 0.062 0.039 0.017 0.011 0.006 0.004 
  
  > mdb
  Call: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data
  = dune.env, distance = "bray")
  
                Inertia Proportion Rank RealDims
  Total           4.299      1.000              
  Conditional     1.469      0.342    3         
  Constrained     1.035      0.241    4        4
  Unconstrained   1.796      0.418   12        9
  Inertia is squared Bray distance 
  Some constraints or conditions were aliased because they were redundant
  
  Eigenvalues for constrained axes:
  dbRDA1 dbRDA2 dbRDA3 dbRDA4 
   0.667  0.238  0.091  0.038 
  
  Eigenvalues for unconstrained axes:
    MDS1   MDS2   MDS3   MDS4   MDS5   MDS6   MDS7   MDS8   MDS9  iMDS1  iMDS2 
   0.742  0.337  0.307  0.206  0.133  0.128  0.040  0.027  0.000 -0.020 -0.046 
   iMDS3 
  -0.059 
  
  > mancap
  Call: capscale(formula = dune ~ Condition(Management) + Manure + A1,
  data = dune.env, distance = "manhattan")
  
                 Inertia Proportion Rank
  Total         994.0921     1.0000     
  Conditional   412.3038     0.4148    3
  Constrained   213.0794     0.2143    4
  Unconstrained 452.2644     0.4550   12
  Imaginary     -83.5555    -0.0841    6
  Inertia is mean squared Manhattan distance 
  Species scores projected from 'dune' 
  Some constraints or conditions were aliased because they were redundant
  
  Eigenvalues for constrained axes:
   CAP1  CAP2  CAP3  CAP4 
  125.7  49.3  24.2  13.9 
  
  Eigenvalues for unconstrained axes:
   MDS1  MDS2  MDS3  MDS4  MDS5  MDS6  MDS7  MDS8  MDS9 MDS10 MDS11 MDS12 
  163.7  97.1  59.0  40.2  34.9  24.9  12.7  10.9   4.7   1.9   1.5   0.8 
  
  > mandb
  Call: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data
  = dune.env, distance = "manhattan")
  
                Inertia Proportion Rank RealDims
  Total         994.092      1.000              
  Conditional   404.069      0.406    3         
  Constrained   202.576      0.204    4        4
  Unconstrained 387.447      0.390   12        8
  Inertia is mean squared Manhattan distance 
  Some constraints or conditions were aliased because they were redundant
  
  Eigenvalues for constrained axes:
  dbRDA1 dbRDA2 dbRDA3 dbRDA4 
   123.2   47.4   21.9   10.1 
  
  Eigenvalues for unconstrained axes:
   MDS1  MDS2  MDS3  MDS4  MDS5  MDS6  MDS7  MDS8 iMDS1 iMDS2 iMDS3 iMDS4 
  161.5  96.1  58.8  38.5  33.4  24.6   9.6   6.0  -0.6  -6.3 -13.3 -20.8 
  
  > m0cca
  Call: cca(formula = dune ~ Condition(Management) + Management, data =
  dune.env)
  
                Inertia Proportion Rank
  Total           2.115      1.000     
  Conditional     0.604      0.285    3
  Unconstrained   1.511      0.715   16
  Inertia is scaled Chi-square 
  
  Eigenvalues for unconstrained axes:
    CA1   CA2   CA3   CA4   CA5   CA6   CA7   CA8   CA9  CA10  CA11  CA12  CA13 
  0.447 0.203 0.163 0.135 0.129 0.095 0.079 0.065 0.050 0.043 0.039 0.024 0.018 
   CA14  CA15  CA16 
  0.009 0.008 0.004 
  
  > m1rda
  Call: rda(formula = H ~ A1, data = dune.env)
  
                Inertia Proportion Rank
  Total         0.07321    1.00000     
  Constrained   0.00294    0.04020    1
  Unconstrained 0.07027    0.95980    1
  Inertia is variance 
  
  Eigenvalues for constrained axes:
      RDA1 
  0.002943 
  
  Eigenvalues for unconstrained axes:
     PC1 
  0.0703 
  
  > ## names
  > sort(names(mcca))
   [1] "CA"          "CCA"         "Ybar"        "call"        "call"       
   [6] "colsum"      "grand.total" "inertia"     "method"      "pCCA"       
  [11] "rowsum"      "terminfo"    "terms"       "tot.chi"    
  > sort(names(mrda))
   [1] "CA"             "CCA"            "Ybar"           "call"          
   [5] "colsum"         "inertia"        "method"         "pCCA"          
   [9] "regularization" "terminfo"       "terms"          "tot.chi"       
  > sort(names(mcap))
   [1] "CA"        "CCA"       "Ybar"      "adjust"    "call"      "colsum"   
   [7] "inertia"   "method"    "pCCA"      "sqrt.dist" "terminfo"  "terms"    
  [13] "tot.chi"   "vdata"    
  > sort(names(mdb))
   [1] "CA"        "CCA"       "Ybar"      "adjust"    "call"      "colsum"   
   [7] "inertia"   "method"    "pCCA"      "sqrt.dist" "terminfo"  "terms"    
  [13] "tot.chi"  
  > 
  > ## diagnostics
  > hatvalues(mcca)
        1       2       3       4       5       6       7       8       9      10 
  0.38964 0.66464 0.39824 0.48282 0.43153 0.42904 0.57721 0.85494 0.66464 0.47319 
       11      12      13      14      15      16      17      18      19      20 
  0.35412 0.62534 0.39046 0.32811 0.58922 0.38621 0.13392 0.20951 0.29994 0.31726 
  > hatvalues(mrda)
   [1] 0.53471 0.65751 0.33777 0.40784 0.40677 0.37400 0.56067 0.84957 0.65751
  [10] 0.42120 0.42260 0.64583 0.40092 0.33039 0.62433 0.39796 0.23669 0.20371
  [19] 0.25735 0.27267
  > hatvalues(mandb)
   [1] 0.53471 0.65751 0.33777 0.40784 0.40677 0.37400 0.56067 0.84957 0.65751
  [10] 0.42120 0.42260 0.64583 0.40092 0.33039 0.62433 0.39796 0.23669 0.20371
  [19] 0.25735 0.27267
  > hatvalues(m1rda)
   [1] 0.096575 0.070198 0.053353 0.054682 0.073302 0.053353 0.096575 0.054682
   [9] 0.064657 0.076626 0.070198 0.060002 0.064657 0.269467 0.540109 0.058007
  [17] 0.058007 0.050693 0.064657 0.070198
  > 
  > zapsmall(head(cooks.distance(mcca)))
    Achimill Agrostol Airaprae Alopgeni Anthodor Bellpere Bromhord Chenalbu
  1   0.2015   0.3909   0.0100   0.3198   0.0036   0.3208   0.1238   0.0004
  2   0.1249   0.5641   0.0138   0.5688   0.9650   0.2343   0.0899   0.0372
  3   0.0202   0.0466   0.0015   0.7564   0.0005   0.0621   0.3002   0.0001
  4   0.0404   0.6089   0.0013   0.3372   0.0005   0.0288   0.9104   0.0001
  5   0.0670   0.1356   0.0482   0.1869   0.3149   0.3882   0.2014   0.0265
  6   0.0017   0.0004   0.0060   0.1985   0.0043   0.3420   0.3112   0.0546
    Cirsarve Comapalu Eleopalu Elymrepe Empenigr Hyporadi Juncarti Juncbufo
  1   0.4134   0.2264   0.0216   0.5968   0.0064   0.0085   0.0017   0.0017
  2   0.0001   0.3117   0.0656   3.3013   0.0089   0.1618   0.8448   1.2765
  3   1.0040   0.0347   0.0033   0.0338   0.0010   0.0013   0.0003   0.0003
  4   3.0432   0.0290   0.0028   0.1762   0.0008   0.0011   0.0002   0.0002
  5   0.0005   1.0857   0.0478   0.1519   0.0308   0.0660   0.0687   0.2020
  6   0.0001   0.1346   0.0490   0.7247   0.0038   0.0002   0.0218   0.3566
    Lolipere Planlanc Poaprat Poatriv Ranuflam Rumeacet Sagiproc Salirepe
  1   1.5527   0.0010  0.7923  0.0079   0.0073   0.0001   0.1837   0.0485
  2   0.6645   2.4053  0.0603  1.1534   0.0331   2.1543   0.0002   0.0667
  3   0.0436   0.0002  0.0001  0.0555   0.0011   0.0000   0.3373   0.0074
  4   0.6133   0.0001  0.5616  0.0444   0.0009   0.0000   1.1185   0.0062
  5   0.0608   0.2669  0.0101  0.0460   0.0075   0.0783   0.0292   0.2324
  6   0.2028   0.0874  0.0005  0.1772   0.0294   0.2935   0.0888   0.0288
    Scorautu Trifprat Trifrepe Vicilath Bracruta Callcusp
  1   0.1877   0.0003   0.0156   0.0001   0.0578   0.0018
  2   0.0461   1.7937   0.0000   1.7194   0.8086   0.0164
  3   0.0351   0.0000   0.0389   0.0000   0.0110   0.0003
  4   0.0179   0.0000   0.0181   0.0000   0.0053   0.0002
  5   0.0184   0.1001   0.3751   0.0695   0.0640   0.0000
  6   0.0343   1.6066   0.1480   0.0601   0.2804   0.0179
  > zapsmall(head(cooks.distance(mrda)))
    Achimill Agrostol Airaprae Alopgeni Anthodor Bellpere Bromhord Chenalbu
  1   0.1761   1.5406   0.0313   1.1176   0.0094   1.1835   0.3910   0.0006
  2   0.1158   0.3965   0.0116   0.5059   1.4020   0.2724   0.1134   0.0392
  3   0.0133   0.0020   0.0030   0.6281   0.0009   0.0920   0.1284   0.0001
  4   0.0214   0.8231   0.0030   0.0617   0.0009   0.1397   0.7559   0.0001
  5   0.0498   0.0658   0.0365   0.1882   0.3664   0.3256   0.1322   0.0324
  6   0.0145   0.0020   0.0029   0.1431   0.0244   0.2416   0.1994   0.0384
    Cirsarve Comapalu Eleopalu Elymrepe Empenigr Hyporadi Juncarti Juncbufo
  1   1.1927   0.6321   0.0316   0.0002   0.0127   0.0207   0.0019   0.0026
  2   0.0002   0.2331   0.0341   4.2057   0.0047   0.1666   0.9432   1.3977
  3   0.3951   0.0600   0.0030   0.0000   0.0012   0.0020   0.0002   0.0002
  4   2.3160   0.0598   0.0030   0.0000   0.0012   0.0020   0.0002   0.0002
  5   0.0005   0.7370   0.0110   0.1449   0.0149   0.0456   0.0628   0.2543
  6   0.0000   0.0588   0.0178   0.6361   0.0012   0.0001   0.0295   0.2742
    Lolipere Planlanc Poaprat Poatriv Ranuflam Rumeacet Sagiproc Salirepe
  1   0.2819   0.0021  0.1434  0.6899   0.0089   0.0000   0.6367   0.0748
  2   1.5095   2.7465  0.3092  1.0935   0.0173   1.9478   0.0005   0.0276
  3   0.0006   0.0002  0.1187  0.1113   0.0008   0.0000   0.1676   0.0071
  4   0.1564   0.0002  0.0268  0.0256   0.0008   0.0000   1.1039   0.0071
  5   0.3844   0.2391  0.1254  0.0186   0.0003   0.0398   0.0449   0.0873
  6   0.7320   0.1480  0.0063  0.0894   0.0111   0.5069   0.0606   0.0070
    Scorautu Trifprat Trifrepe Vicilath Bracruta Callcusp
  1   0.7907   0.0003   0.1297   0.0005   0.2576   0.0023
  2   0.0160   1.5145   0.0015   2.1843   0.9008   0.0144
  3   0.0632   0.0000   0.0515   0.0000   0.0203   0.0002
  4   0.0908   0.0000   0.0010   0.0000   0.0300   0.0002
  5   0.0022   0.0881   0.3779   0.0844   0.0838   0.0026
  6   0.0092   1.3701   0.1927   0.0551   0.3486   0.0118
  > zapsmall(head(cooks.distance(mrda1)))
    Achimill Agrostol Airaprae Alopgeni Anthodor Bellpere Bromhord Chenalbu
  1   0.1761   1.5406   0.0313   1.1176   0.0094   1.1835   0.3910   0.0006
  2   0.1158   0.3965   0.0116   0.5059   1.4020   0.2724   0.1134   0.0392
  3   0.0133   0.0020   0.0030   0.6281   0.0009   0.0920   0.1284   0.0001
  4   0.0214   0.8231   0.0030   0.0617   0.0009   0.1397   0.7559   0.0001
  5   0.0498   0.0658   0.0365   0.1882   0.3664   0.3256   0.1322   0.0324
  6   0.0145   0.0020   0.0029   0.1431   0.0244   0.2416   0.1994   0.0384
    Cirsarve Comapalu Eleopalu Elymrepe Empenigr Hyporadi Juncarti Juncbufo
  1   1.1927   0.6321   0.0316   0.0002   0.0127   0.0207   0.0019   0.0026
  2   0.0002   0.2331   0.0341   4.2057   0.0047   0.1666   0.9432   1.3977
  3   0.3951   0.0600   0.0030   0.0000   0.0012   0.0020   0.0002   0.0002
  4   2.3160   0.0598   0.0030   0.0000   0.0012   0.0020   0.0002   0.0002
  5   0.0005   0.7370   0.0110   0.1449   0.0149   0.0456   0.0628   0.2543
  6   0.0000   0.0588   0.0178   0.6361   0.0012   0.0001   0.0295   0.2742
    Lolipere Planlanc Poaprat Poatriv Ranuflam Rumeacet Sagiproc Salirepe
  1   0.2819   0.0021  0.1434  0.6899   0.0089   0.0000   0.6367   0.0748
  2   1.5095   2.7465  0.3092  1.0935   0.0173   1.9478   0.0005   0.0276
  3   0.0006   0.0002  0.1187  0.1113   0.0008   0.0000   0.1676   0.0071
  4   0.1564   0.0002  0.0268  0.0256   0.0008   0.0000   1.1039   0.0071
  5   0.3844   0.2391  0.1254  0.0186   0.0003   0.0398   0.0449   0.0873
  6   0.7320   0.1480  0.0063  0.0894   0.0111   0.5069   0.0606   0.0070
    Scorautu Trifprat Trifrepe Vicilath Bracruta Callcusp
  1   0.7907   0.0003   0.1297   0.0005   0.2576   0.0023
  2   0.0160   1.5145   0.0015   2.1843   0.9008   0.0144
  3   0.0632   0.0000   0.0515   0.0000   0.0203   0.0002
  4   0.0908   0.0000   0.0010   0.0000   0.0300   0.0002
  5   0.0022   0.0881   0.3779   0.0844   0.0838   0.0026
  6   0.0092   1.3701   0.1927   0.0551   0.3486   0.0118
  > zapsmall(head(cooks.distance(mcap, "canoco")))
       CAP1    CAP2    CAP3    CAP4
  1 0.42135 0.71383 0.52485 0.00003
  2 0.35667 0.91934 0.00051 0.34825
  3 0.04306 0.05516 0.09142 0.00035
  4 0.03627 0.08478 0.01578 0.00073
  5 0.23671 0.09188 0.00653 0.26523
  6 0.00064 0.00000 0.00033 0.07231
  > zapsmall(head(cooks.distance(mdb, "canoco")))
     dbRDA1  dbRDA2  dbRDA3  dbRDA4
  1 0.45656 0.82736 0.95105 0.09224
  2 0.38438 0.83291 0.00814 0.35065
  3 0.04581 0.06482 0.16066 0.00937
  4 0.04026 0.09692 0.03121 0.00801
  5 0.26263 0.06530 0.00010 0.22079
  6 0.00141 0.00135 0.00737 0.12833
  > zapsmall(head(cooks.distance(mancap, "canoco")))
       CAP1    CAP2    CAP3    CAP4
  1 0.00378 0.00009 0.18185 0.45549
  2 0.32121 1.64122 0.11530 2.20497
  3 0.00679 0.01562 0.11032 0.01045
  4 0.00349 0.02163 0.01335 0.11390
  5 0.20285 0.07583 0.00167 0.29463
  6 0.00344 0.03919 0.01336 0.27877
  > zapsmall(head(cooks.distance(mandb, "canoco")))
     dbRDA1  dbRDA2  dbRDA3  dbRDA4
  1 0.00914 0.00480 0.50784 0.16442
  2 0.34821 1.48377 0.23249 1.60030
  3 0.00735 0.01721 0.17781 0.00061
  4 0.00158 0.01292 0.00085 0.06147
  5 0.23684 0.04827 0.04109 0.20639
  6 0.00207 0.05014 0.04443 0.36650
  > zapsmall(head(cooks.distance(m1rda)))
       col1
  1 0.47753
  2 0.00170
  3 0.00011
  4 0.02525
  5 0.10022
  6 0.01147
  > 
  > head(goodness(mcca, display = "sites"))
        CCA1     CCA2    CCA3    CCA4
  1 0.185250 0.224787 0.23190 0.23203
  2 0.044206 0.054137 0.13403 0.24479
  3 0.168758 0.475105 0.48459 0.48764
  4 0.116243 0.295806 0.30207 0.30380
  5 0.014540 0.057912 0.19448 0.19467
  6 0.067333 0.067749 0.13876 0.13929
  > head(goodness(mrda, display = "sites"))
          RDA1     RDA2    RDA3    RDA4
  1 0.42239542 0.432516 0.43329 0.43348
  2 0.01888621 0.044210 0.11461 0.17317
  3 0.26198074 0.298577 0.30272 0.30748
  4 0.23011480 0.259364 0.26228 0.26592
  5 0.00027964 0.036798 0.11025 0.11469
  6 0.01492482 0.083895 0.09990 0.09993
  > head(goodness(mrda1, display = "sites"))
         RDA1     RDA2    RDA3    RDA4
  1 0.4207789 0.451576 0.48069 0.48189
  2 0.0552381 0.058798 0.14704 0.22767
  3 0.2344181 0.381112 0.39558 0.40051
  4 0.0988545 0.153807 0.15997 0.16183
  5 0.0049954 0.029302 0.16899 0.17120
  6 0.0391326 0.042622 0.10319 0.10322
  > head(goodness(m1rda, display = "sites"))
         RDA1
  1 0.0049860
  2 0.1415108
  3 0.2006191
  4 0.0037679
  5 0.0089639
  6 0.0056118
  > goodness(m1rda)       # fails in 2.5-3
           RDA1
  col1 0.040196
  > ## head(goodness(mcap, display = "sites")) # currently disabled
  > ## head(goodness(mdb, display="sites"))  # not implemented for partial dbrda
  > ## head(goodness(mancap, display="sites")) # currently disabled
  > ## head(goodness(mandb, display="sites")) # not implemneted for partial dbrda
  > head(goodness(m0cca))
      
  [1,]
  > 
  > head(inertcomp(mcca))
                pCCA       CCA       CA
  Achimill 0.0153429 0.0048302 0.030529
  Agrostol 0.0381018 0.0161939 0.027816
  Airaprae 0.0258133 0.0134079 0.064877
  Alopgeni 0.0487892 0.0092962 0.037121
  Anthodor 0.0141466 0.0069150 0.072781
  Bellpere 0.0069739 0.0106965 0.020072
  > head(inertcomp(mrda))
              pCCA     CCA      CA
  Achimill 0.60877 0.18696 0.74111
  Agrostol 2.81228 1.14782 3.23990
  Airaprae 0.15351 0.10549 0.35942
  Alopgeni 3.26316 0.57391 3.06819
  Anthodor 0.53421 0.27983 2.07806
  Bellpere 0.21140 0.29749 0.57268
  > head(inertcomp(mrda1))
              pCCA      CCA      CA
  Achimill 0.39612 0.121651 0.48223
  Agrostol 0.39059 0.159420 0.44999
  Airaprae 0.24823 0.170578 0.58120
  Alopgeni 0.47256 0.083113 0.44433
  Anthodor 0.18471 0.096757 0.71853
  Bellpere 0.19546 0.275055 0.52949
  > head(inertcomp(mcap, display="sites"))
        pCCA      CCA       CA
  1 0.058628 0.105577 0.104294
  2 0.100405 0.035067 0.077139
  3 0.058628 0.070870 0.039223
  4 0.058628 0.072386 0.056966
  5 0.043474 0.018994 0.080773
  6 0.043474 0.028915 0.066973
  > head(inertcomp(mdb, display = "sites"))
        pCCA      CCA       CA
  1 0.058383 0.103846 0.080795
  2 0.093318 0.028218 0.073292
  3 0.058383 0.069481 0.024416
  4 0.058383 0.070979 0.052324
  5 0.042268 0.016687 0.063247
  6 0.042268 0.026426 0.051382
  > head(inertcomp(mancap, display = "sites"))
      pCCA     CCA     CA
  1 14.310 19.2048 21.046
  2 31.248 11.5984 26.506
  3 14.310 15.4320  9.898
  4 14.310 15.5966 15.754
  5 17.177  5.8883 21.460
  6 17.177  8.8555 27.470
  > head(inertcomp(mandb, display = "sites"))
      pCCA     CCA      CA
  1 14.211 18.6264 15.3043
  2 29.512  9.8634 25.4006
  3 14.211 14.9565  6.8683
  4 14.211 15.1159 14.6604
  5 16.995  5.4240 16.8238
  6 16.995  8.3251 22.2002
  > zapsmall(head(inertcomp(m0cca)))
               pCCA       CA
  Achimill 0.015343 0.035359
  Agrostol 0.038102 0.044009
  Airaprae 0.025813 0.078285
  Alopgeni 0.048789 0.046417
  Anthodor 0.014147 0.079696
  Bellpere 0.006974 0.030769
  > inertcomp(m1rda)
             CCA       CA
  col1 0.0029428 0.070268
  > 
  > abs(zapsmall(intersetcor(mcca)))
              CCA1    CCA2    CCA3    CCA4
  Manure.L 0.16256 0.52974 0.27392 0.47312
  Manure.Q 0.31167 0.59055 0.43511 0.14091
  Manure.C 0.33679 0.23680 0.08339 0.60440
  Manure^4 0.27194 0.16138 0.68107 0.13507
  A1       0.64369 0.26617 0.35227 0.08656
  > abs(zapsmall(intersetcor(mrda)))
              RDA1    RDA2    RDA3    RDA4
  Manure.L 0.44970 0.45430 0.17052 0.41752
  Manure.Q 0.64906 0.44643 0.11403 0.14879
  Manure.C 0.47200 0.13567 0.08333 0.60716
  Manure^4 0.27404 0.47959 0.51866 0.03987
  A1       0.48811 0.17985 0.50083 0.29462
  > abs(zapsmall(intersetcor(mrda1)))
              RDA1    RDA2    RDA3    RDA4
  Manure.L 0.35700 0.44353 0.26187 0.50157
  Manure.Q 0.47776 0.41663 0.48816 0.13407
  Manure.C 0.40999 0.08092 0.01974 0.67542
  Manure^4 0.39647 0.04685 0.69440 0.04289
  A1       0.53789 0.47469 0.36590 0.13184
  > abs(zapsmall(intersetcor(mcap)))
              CAP1    CAP2    CAP3    CAP4
  Manure.L 0.34428 0.46883 0.08077 0.33049
  Manure.Q 0.46742 0.48537 0.22608 0.13137
  Manure.C 0.35114 0.05579 0.08638 0.48645
  Manure^4 0.26818 0.13779 0.62087 0.05599
  A1       0.57349 0.28004 0.35091 0.07576
  > abs(zapsmall(intersetcor(mdb)))
            dbRDA1  dbRDA2  dbRDA3  dbRDA4
  Manure.L 0.33636 0.46901 0.14552 0.19669
  Manure.Q 0.46084 0.46800 0.19559 0.10617
  Manure.C 0.35058 0.05075 0.15478 0.29989
  Manure^4 0.26690 0.10088 0.53857 0.08724
  A1       0.56939 0.29083 0.30919 0.02422
  > abs(zapsmall(intersetcor(mancap)))
              CAP1    CAP2    CAP3    CAP4
  Manure.L 0.38584 0.48506 0.00005 0.26424
  Manure.Q 0.45373 0.44871 0.24500 0.15056
  Manure.C 0.35825 0.09885 0.10252 0.45075
  Manure^4 0.41554 0.33601 0.44684 0.03505
  A1       0.36136 0.17672 0.51779 0.16025
  > abs(zapsmall(intersetcor(mandb)))
            dbRDA1  dbRDA2  dbRDA3  dbRDA4
  Manure.L 0.37496 0.48082 0.08018 0.15731
  Manure.Q 0.44695 0.41430 0.22423 0.11920
  Manure.C 0.35996 0.11590 0.00423 0.28532
  Manure^4 0.41300 0.28868 0.42071 0.06480
  A1       0.35511 0.20385 0.49290 0.06262
  > abs(zapsmall(intersetcor(m1rda)))
        RDA1
  A1 0.20049
  > 
  > tolerance(mcca)
  
  Species Tolerance
  
  Scaling: 2
  
              CCA1     CCA2
  Achimill 0.61007 0.503578
  Agrostol 1.35694 1.449646
  Airaprae 0.10516 0.078256
  Alopgeni 0.98368 1.398741
  Anthodor 0.64966 0.568219
  Bellpere 0.50902 0.824771
  Bromhord 0.51376 0.715512
  Chenalbu 0.00000 0.000000
  Cirsarve 0.00000 0.000000
  Comapalu 0.77116 0.573877
  Eleopalu 1.38967 1.527094
  Elymrepe 0.63733 0.927844
  Empenigr 0.00000 0.000000
  Hyporadi 0.75384 0.361128
  Juncarti 1.49080 1.279732
  Juncbufo 0.83160 0.650590
  Lolipere 0.70897 0.735395
  Planlanc 0.51563 0.436023
  Poaprat  0.77305 0.833332
  Poatriv  0.91211 1.060493
  Ranuflam 1.55143 1.374797
  Rumeacet 0.46610 0.821992
  Sagiproc 0.91313 1.312686
  Salirepe 0.28643 0.213149
  Scorautu 0.97673 0.906578
  Trifprat 0.56768 0.419267
  Trifrepe 0.95609 0.941391
  Vicilath 0.52385 0.187524
  Bracruta 1.14404 1.091019
  Callcusp 1.57627 1.446282
  
  > tolerance(m0cca)
  
  Species Tolerance
  
  Scaling: 2
  
                CA1     CA2
  Achimill 0.930813 0.67460
  Agrostol 0.949483 0.83992
  Airaprae 0.249010 1.16549
  Alopgeni 0.726918 0.86630
  Anthodor 1.160427 1.20647
  Bellpere 0.321717 0.58968
  Bromhord 0.304392 0.25205
  Chenalbu 0.000000 0.00000
  Cirsarve 0.000000 0.00000
  Comapalu 0.041889 0.39785
  Eleopalu 0.278432 0.81396
  Elymrepe 0.482478 1.09766
  Empenigr 0.000000 0.00000
  Hyporadi 1.243512 1.04260
  Juncarti 0.551515 0.67321
  Juncbufo 0.346137 0.67554
  Lolipere 0.472723 1.00637
  Planlanc 0.685082 0.75194
  Poaprat  0.622322 1.05260
  Poatriv  0.539912 0.92947
  Ranuflam 0.641115 0.77679
  Rumeacet 0.311899 0.85299
  Sagiproc 1.005528 1.03234
  Salirepe 1.981465 1.87444
  Scorautu 1.153131 1.16089
  Trifprat 0.063055 0.11141
  Trifrepe 0.938071 0.96335
  Vicilath 0.266341 1.28007
  Bracruta 1.095827 1.12812
  Callcusp 0.152449 0.82496
  
  > 
  > vif.cca(mcca)
  ManagementHF ManagementNM ManagementSF     Manure.L     Manure.Q     Manure.C 
        2.6392      59.4353       4.6922      29.4621      20.0580       7.0095 
      Manure^4           A1 
            NA       1.4324 
  > vif.cca(mrda)
  ManagementHF ManagementNM ManagementSF     Manure.L     Manure.Q     Manure.C 
        2.7608      82.0791       5.0631      38.4808      24.0685       7.4689 
      Manure^4           A1 
            NA       1.3916 
  > vif.cca(mcap)
  ManagementHF ManagementNM ManagementSF     Manure.L     Manure.Q     Manure.C 
        2.7608      82.0791       5.0631      38.4808      24.0685       7.4689 
      Manure^4           A1 
            NA       1.3916 
  > vif.cca(mdb)
  ManagementHF ManagementNM ManagementSF     Manure.L     Manure.Q     Manure.C 
        2.7608      82.0791       5.0631      38.4808      24.0685       7.4689 
      Manure^4           A1 
            NA       1.3916 
  > 
  > alias(mcca)
  Model :
  dune ~ Condition(Management) + Manure + A1
  
  Complete :
           ManagementHF ManagementNM ManagementSF Manure.L Manure.Q Manure.C A1
  Manure^4               8.3666                    5.2915  -4.4721   2.6458    
  
  > alias(mrda)
  Model :
  dune ~ Condition(Management) + Manure + A1
  
  Complete :
           ManagementHF ManagementNM ManagementSF Manure.L Manure.Q Manure.C A1
  Manure^4               8.3666                    5.2915  -4.4721   2.6458    
  
  > alias(mcap)
  Model :
  dune ~ Condition(Management) + Manure + A1
  
  Complete :
           ManagementHF ManagementNM ManagementSF Manure.L Manure.Q Manure.C A1
  Manure^4               8.3666                    5.2915  -4.4721   2.6458    
  
  > alias(mdb)
  Model :
  dune ~ Condition(Management) + Manure + A1
  
  Complete :
           ManagementHF ManagementNM ManagementSF Manure.L Manure.Q Manure.C A1
  Manure^4               8.3666                    5.2915  -4.4721   2.6458    
  
  > 
  > ## basic statistic
  > 
  > abs(coef(mcca))
                   CCA1     CCA2      CCA3    CCA4
  ManagementHF  0.62129 0.677568  0.035035 1.54946
  ManagementNM 10.01217 2.637011 14.104915 5.41558
  ManagementSF  0.61605 2.920127  0.607816 1.98726
  Manure.L      5.75979 5.151196  8.203284 5.62141
  Manure.Q      4.27478 0.010966  8.396272 3.23064
  Manure.C      3.40803 1.878886  4.693036 0.25152
  Manure^4           NA       NA        NA      NA
  A1            0.49572 0.368902  0.137792 0.11238
  > abs(coef(mrda))
                   RDA1     RDA2     RDA3     RDA4
  ManagementHF 0.039701 0.196654 0.230283 0.331044
  ManagementNM 1.885616 2.733188 2.661844 0.965079
  ManagementSF 0.241056 0.566718 0.447380 0.355072
  Manure.L     1.502678 1.057175 2.212531 0.972634
  Manure.Q     0.627410 1.680780 1.472947 0.605660
  Manure.C     0.776016 0.849770 0.855201 0.183062
  Manure^4           NA       NA       NA       NA
  A1           0.045186 0.061152 0.080351 0.056434
  > abs(coef(mrda1))
                   RDA1     RDA2     RDA3     RDA4
  ManagementHF 0.047647 0.200658 0.035428 0.398849
  ManagementNM 2.609121 0.067114 3.393206 0.846634
  ManagementSF 0.138903 0.649111 0.090944 0.506550
  Manure.L     1.832076 0.744465 2.036043 1.077390
  Manure.Q     1.090769 0.253091 2.052449 0.537289
  Manure.C     0.942621 0.147407 1.065170 0.210566
  Manure^4           NA       NA       NA       NA
  A1           0.063521 0.099114 0.029881 0.025905
  > abs(coef(mcap))
                   CAP1     CAP2     CAP3     CAP4
  ManagementHF 0.054464 0.196369 0.064230 0.396506
  ManagementNM 2.144319 0.975995 3.530608 1.013304
  ManagementSF 0.118096 0.671018 0.100124 0.480901
  Manure.L     1.510554 0.193391 2.360417 1.151619
  Manure.Q     0.831594 0.804571 1.997158 0.653864
  Manure.C     0.769068 0.163012 1.201823 0.163625
  Manure^4           NA       NA       NA       NA
  A1           0.074664 0.082683 0.048984 0.024736
  > abs(coef(mdb))
                 dbRDA1   dbRDA2    dbRDA3   dbRDA4
  ManagementHF 0.057234 0.205998 0.0072718 0.396366
  ManagementNM 2.148560 0.765167 3.3694004 1.577340
  ManagementSF 0.112226 0.684272 0.0077129 0.473942
  Manure.L     1.506447 0.341904 2.1389592 1.501846
  Manure.Q     0.835134 0.685757 1.9060884 0.976819
  Manure.C     0.771676 0.100214 1.2176754 0.030482
  Manure^4           NA       NA        NA       NA
  A1           0.074999 0.084173 0.0483834 0.019273
  > abs(coef(m1rda))
        RDA1
  A1 0.10527
  > 
  > eigenvals(mcca)
     CCA1    CCA2    CCA3    CCA4     CA1     CA2     CA3     CA4     CA5     CA6 
  0.22257 0.12260 0.06390 0.04055 0.31761 0.15858 0.13966 0.11608 0.07907 0.07534 
      CA7     CA8     CA9    CA10    CA11    CA12 
  0.04527 0.04018 0.03777 0.02799 0.01267 0.01158 
  > eigenvals(mrda)
     RDA1    RDA2    RDA3    RDA4     PC1     PC2     PC3     PC4     PC5     PC6 
   8.5394  4.3297  2.2061  1.7162 10.2523  8.2069  4.9525  3.3577  3.1226  2.4941 
      PC7     PC8     PC9    PC10    PC11    PC12 
   1.8660  1.2579  1.0186  0.7428  0.4814  0.3488 
  > eigenvals(mrda1)
    RDA1   RDA2   RDA3   RDA4    PC1    PC2    PC3    PC4    PC5    PC6    PC7 
  2.6117 1.6991 1.1039 0.7261 3.4684 2.5471 2.1158 1.7223 1.4426 0.9611 0.8089 
     PC8    PC9   PC10   PC11   PC12 
  0.7378 0.4903 0.3805 0.2472 0.1570 
  > eigenvals(mcap)
     CAP1    CAP2    CAP3    CAP4    MDS1    MDS2    MDS3    MDS4    MDS5    MDS6 
  0.67370 0.24300 0.10457 0.05136 0.74894 0.33796 0.30841 0.21316 0.13698 0.13604 
     MDS7    MDS8    MDS9   MDS10   MDS11   MDS12 
  0.06196 0.03929 0.01687 0.01110 0.00646 0.00402 
  > eigenvals(mdb)
    dbRDA1   dbRDA2   dbRDA3   dbRDA4     MDS1     MDS2     MDS3     MDS4 
   0.66660  0.23850  0.09102  0.03844  0.74204  0.33668  0.30662  0.20627 
      MDS5     MDS6     MDS7     MDS8     MDS9    iMDS1    iMDS2    iMDS3 
   0.13339  0.12829  0.03980  0.02745  0.00041 -0.01985 -0.04601 -0.05923 
  > eigenvals(mancap)
     CAP1    CAP2    CAP3    CAP4    MDS1    MDS2    MDS3    MDS4    MDS5    MDS6 
  125.658  49.308  24.239  13.875 163.684  97.079  59.006  40.210  34.854  24.943 
     MDS7    MDS8    MDS9   MDS10   MDS11   MDS12 
   12.724  10.918   4.686   1.896   1.506   0.758 
  > eigenvals(mandb)
   dbRDA1  dbRDA2  dbRDA3  dbRDA4    MDS1    MDS2    MDS3    MDS4    MDS5    MDS6 
  123.163  47.370  21.915  10.128 161.475  96.116  58.781  38.534  33.355  24.565 
     MDS7    MDS8   iMDS1   iMDS2   iMDS3   iMDS4 
    9.591   5.971  -0.590  -6.265 -13.300 -20.787 
  > eigenvals(m0cca)
      CA1     CA2     CA3     CA4     CA5     CA6     CA7     CA8     CA9    CA10 
  0.44737 0.20300 0.16301 0.13457 0.12940 0.09494 0.07904 0.06526 0.05004 0.04321 
     CA11    CA12    CA13    CA14    CA15    CA16 
  0.03870 0.02385 0.01773 0.00917 0.00796 0.00416 
  > eigenvals(m0cca, model = "constrained")
  NULL
  > eigenvals(m1rda)
      RDA1      PC1 
  0.002943 0.070268 
  > 
  > nobs(mcca)
  [1] 20
  > nobs(mrda)
  [1] 20
  > nobs(mcap)
  [1] 20
  > nobs(mdb)
  [1] 20
  > nobs(m0cca)
  [1] 20
  > nobs(m1rda)
  [1] 20
  > 
  > RsquareAdj(mcca)
  $r.squared
  [1] 0.21256
  
  $adj.r.squared
  [1] 0.054162
  
  > RsquareAdj(mrda)
  $r.squared
  [1] 0.1996
  
  $adj.r.squared
  [1] 0.057747
  
  > RsquareAdj(mrda1)
  $r.squared
  [1] 0.20469
  
  $adj.r.squared
  [1] 0.044112
  
  > RsquareAdj(mcap)
  $r.squared
  [1] 0.24951
  
  $adj.r.squared
  [1] 0.13734
  
  > RsquareAdj(mdb)
  $r.squared
  [1] 0.24065
  
  $adj.r.squared
  [1] 0.12042
  
  > RsquareAdj(m1rda)
  $r.squared
  [1] 0.040196
  
  $adj.r.squared
  [1] -0.013127
  
  > 
  > head(model.frame(mcca))
    Management Manure  A1
  1         SF      4 2.8
  2         BF      2 3.5
  3         SF      4 4.3
  4         SF      4 4.2
  5         HF      2 6.3
  6         HF      2 4.3
  > head(model.frame(mrda))
    Management Manure  A1
  1         SF      4 2.8
  2         BF      2 3.5
  3         SF      4 4.3
  4         SF      4 4.2
  5         HF      2 6.3
  6         HF      2 4.3
  > head(model.frame(mrda1))
    Management Manure  A1
  1         SF      4 2.8
  2         BF      2 3.5
  3         SF      4 4.3
  4         SF      4 4.2
  5         HF      2 6.3
  6         HF      2 4.3
  > head(model.frame(mcap))
    Management Manure  A1
  1         SF      4 2.8
  2         BF      2 3.5
  3         SF      4 4.3
  4         SF      4 4.2
  5         HF      2 6.3
  6         HF      2 4.3
  > head(model.frame(mdb))
    Management Manure  A1
  1         SF      4 2.8
  2         BF      2 3.5
  3         SF      4 4.3
  4         SF      4 4.2
  5         HF      2 6.3
  6         HF      2 4.3
  > head(model.frame(m0cca))
    Management
  1         SF
  2         BF
  3         SF
  4         SF
  5         HF
  6         HF
  > head(model.frame(m1rda))
     A1
  1 2.8
  2 3.5
  3 4.3
  4 4.2
  5 6.3
  6 4.3
  > 
  > ## testing and model building -
  > 
  > deviance(mcca)
  [1] 727.34
  > deviance(mrda)
  [1] 723.93
  > deviance(mrda1)
  [1] 286.5
  > deviance(mcap)
  [1] 38.402
  > deviance(mdb)
  [1] 34.121
  > deviance(m0cca)
  [1] 1035.3
  > deviance(m1rda)
  [1] 1.3351
  > 
  > per <- shuffleSet(nrow(dune), 49)
  > permutest(mcca, per)
  
  Permutation test for cca under reduced model 
  
  Permutation: free
  Number of permutations: 49
   
  Model: cca(formula = dune ~ Condition(Management) + Manure + A1, data =
  dune.env)
  Permutation test for all constrained eigenvalues
           Df Inertia    F Pr(>F)
  Model     4    0.45 1.27   0.12
  Residual 12    1.06            
  > permutest(mrda, per)
  
  Permutation test for rda under reduced model 
  
  Permutation: free
  Number of permutations: 49
   
  Model: rda(formula = dune ~ Condition(Management) + Manure + A1, data =
  dune.env)
  Permutation test for all constrained eigenvalues
           Df Inertia    F Pr(>F)  
  Model     4    16.8 1.32   0.08 .
  Residual 12    38.1              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > permutest(mrda1, per)
  
  Permutation test for rda under reduced model 
  
  Permutation: free
  Number of permutations: 49
   
  Model: rda(formula = dune ~ Condition(Management) + Manure + A1, data =
  dune.env, scale = TRUE)
  Permutation test for all constrained eigenvalues
           Df Inertia    F Pr(>F)
  Model     4    6.14 1.22   0.16
  Residual 12   15.08            
  > permutest(mcap, per)
  
  Permutation test for capscale under reduced model 
  
  Permutation: free
  Number of permutations: 49
   
  Model: capscale(formula = dune ~ Condition(Management) + Manure + A1,
  data = dune.env, distance = "bray")
  Permutation test for all constrained eigenvalues
           Df Inertia    F Pr(>F)  
  Model     4    1.07 1.59   0.08 .
  Residual 12    2.02              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > permutest(mdb, per)
  
  Permutation test for dbrda under reduced model 
  
  Permutation: free
  Number of permutations: 49
   
  Model: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data
  = dune.env, distance = "bray")
  Permutation test for all constrained eigenvalues
           Df Inertia    F Pr(>F)  
  Model     4    1.03 1.73   0.08 .
  Residual 12    1.80              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > permutest(mancap, per)
  
  Permutation test for capscale under reduced model 
  
  Permutation: free
  Number of permutations: 49
   
  Model: capscale(formula = dune ~ Condition(Management) + Manure + A1,
  data = dune.env, distance = "manhattan")
  Permutation test for all constrained eigenvalues
           Df Inertia    F Pr(>F)
  Model     4     213 1.41   0.12
  Residual 12     452            
  > permutest(mandb, per)
  
  Permutation test for dbrda under reduced model 
  
  Permutation: free
  Number of permutations: 49
   
  Model: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data
  = dune.env, distance = "manhattan")
  Permutation test for all constrained eigenvalues
           Df Inertia    F Pr(>F)  
  Model     4     203 1.57   0.08 .
  Residual 12     387              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > permutest(m1rda, per)
  
  Permutation test for rda under reduced model 
  
  Permutation: free
  Number of permutations: 49
   
  Model: rda(formula = H ~ A1, data = dune.env)
  Permutation test for all constrained eigenvalues
           Df Inertia    F Pr(>F)
  Model     1  0.0029 0.75   0.44
  Residual 18  0.0703            
  > 
  > drop1(mcca,  test = "permutation", permutations = per)
                        Df  AIC    F Pr(>F)  
  <none>                   87.9              
  Condition(Management)  2 87.9              
  Manure                 3 86.5 1.03   0.36  
  A1                     1 89.0 2.00   0.06 .
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > drop1(mrda,  test = "permutation", permutations = per)
                        Df  AIC    F Pr(>F)
  <none>                   87.8            
  Condition(Management)  2 89.2            
  Manure                 3 87.4 1.30   0.12
  A1                     1 87.5 1.09   0.40
  > drop1(mrda1, test = "permutation", permutations = per)
                        Df  AIC    F Pr(>F)
  <none>                   69.2            
  Condition(Management)  2 69.8            
  Manure                 3 68.2 1.12   0.22
  A1                     1 69.6 1.48   0.14
  > drop1(mcap,  test = "permutation", permutations = per)
                        Df  AIC    F Pr(>F)  
  <none>                   29.1              
  Condition(Management)  2 29.4              
  Manure                 3 28.4 1.24   0.22  
  A1                     1 30.4 2.19   0.08 .
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > drop1(mdb,   test = "permutation", permutations = per)
                        Df  AIC    F Pr(>F)  
  <none>                   26.7              
  Condition(Management)  2 27.2              
  Manure                 3 26.4 1.32   0.18  
  A1                     1 28.4 2.46   0.08 .
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > drop1(m1rda, test = "permutation", permutations = per)
         Df   AIC    F Pr(>F)
  <none>    -50.1            
  A1      1 -51.3 0.75   0.44
  > 
  > anova(mcca, permutations = per)
  Permutation test for cca under reduced model
  Permutation: free
  Number of permutations: 49
  
  Model: cca(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env)
           Df ChiSquare    F Pr(>F)
  Model     4      0.45 1.27   0.12
  Residual 12      1.06            
  > anova(mrda, permutations = per)
  Permutation test for rda under reduced model
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env)
           Df Variance    F Pr(>F)  
  Model     4     16.8 1.32   0.08 .
  Residual 12     38.1              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(mrda1, permutations = per)
  Permutation test for rda under reduced model
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, scale = TRUE)
           Df Variance    F Pr(>F)
  Model     4     6.14 1.22   0.16
  Residual 12    15.08            
  > anova(mcap, permutations = per)
  Permutation test for capscale under reduced model
  Permutation: free
  Number of permutations: 49
  
  Model: capscale(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "bray")
           Df SumOfSqs    F Pr(>F)  
  Model     4     1.07 1.59   0.08 .
  Residual 12     2.02              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(mdb, permutations = per)
  Permutation test for dbrda under reduced model
  Permutation: free
  Number of permutations: 49
  
  Model: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "bray")
           Df SumOfSqs    F Pr(>F)  
  Model     4     1.03 1.73   0.08 .
  Residual 12     1.80              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(mancap, permutations = per)
  Permutation test for capscale under reduced model
  Permutation: free
  Number of permutations: 49
  
  Model: capscale(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "manhattan")
           Df Variance    F Pr(>F)
  Model     4      213 1.41   0.12
  Residual 12      452            
  > anova(mandb, permutations = per)
  Permutation test for dbrda under reduced model
  Permutation: free
  Number of permutations: 49
  
  Model: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "manhattan")
           Df Variance    F Pr(>F)  
  Model     4      203 1.57   0.08 .
  Residual 12      387              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(m0cca, permutations = per)
  No constrained component
  
  Model: cca(formula = dune ~ Condition(Management) + Management, data = dune.env)
           Df ChiSquare  F Pr(>F)
  Model     0      0.00  0       
  Residual 19      1.51          
  > 
  > anova(mcca, permutations = per, by="term")
  Permutation test for cca under reduced model
  Terms added sequentially (first to last)
  Permutation: free
  Number of permutations: 49
  
  Model: cca(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env)
           Df ChiSquare    F Pr(>F)  
  Manure    3     0.273 1.03   0.36  
  A1        1     0.177 2.00   0.06 .
  Residual 12     1.062              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(mrda, permutations = per, by="term")
  Permutation test for rda under reduced model
  Terms added sequentially (first to last)
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env)
           Df Variance    F Pr(>F)
  Manure    3     13.3 1.40    0.1
  A1        1      3.5 1.09    0.4
  Residual 12     38.1            
  > anova(mrda1, permutations = per, by="term")
  Permutation test for rda under reduced model
  Terms added sequentially (first to last)
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, scale = TRUE)
           Df Variance    F Pr(>F)
  Manure    3     4.28 1.14   0.20
  A1        1     1.86 1.48   0.14
  Residual 12    15.08            
  > anova(mcap, permutations = per, by="term")
  Permutation test for capscale under reduced model
  Terms added sequentially (first to last)
  Permutation: free
  Number of permutations: 49
  
  Model: capscale(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "bray")
           Df SumOfSqs    F Pr(>F)  
  Manure    3    0.703 1.39   0.12  
  A1        1    0.370 2.19   0.08 .
  Residual 12    2.021              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(mdb, permutations = per, by="term")
  Permutation test for dbrda under reduced model
  Terms added sequentially (first to last)
  Permutation: free
  Number of permutations: 49
  
  Model: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "bray")
           Df SumOfSqs    F Pr(>F)  
  Manure    3    0.667 1.49   0.12  
  A1        1    0.367 2.46   0.08 .
  Residual 12    1.796              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(mancap, permutations = per, by="term")
  Permutation test for capscale under reduced model
  Terms added sequentially (first to last)
  Permutation: free
  Number of permutations: 49
  
  Model: capscale(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "manhattan")
           Df Variance    F Pr(>F)
  Manure    3      173 1.53   0.14
  A1        1       40 1.07   0.34
  Residual 12      452            
  > anova(mandb, permutations = per, by="term")
  Permutation test for dbrda under reduced model
  Terms added sequentially (first to last)
  Permutation: free
  Number of permutations: 49
  
  Model: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "manhattan")
           Df Variance    F Pr(>F)
  Manure    3      163 1.68   0.14
  A1        1       39 1.22   0.26
  Residual 12      387            
  > anova(m1rda, permutations = per, by="term")
  Permutation test for rda under reduced model
  Terms added sequentially (first to last)
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = H ~ A1, data = dune.env)
           Df Variance    F Pr(>F)
  A1        1   0.0029 0.75   0.44
  Residual 18   0.0703            
  > 
  > anova(mcca, permutations = per, by="margin")
  Permutation test for cca under reduced model
  Marginal effects of terms
  Permutation: free
  Number of permutations: 49
  
  Model: cca(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env)
           Df ChiSquare    F Pr(>F)  
  Manure    3     0.274 1.03   0.36  
  A1        1     0.177 2.00   0.06 .
  Residual 12     1.062              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(mrda, permutations = per, by="margin")
  Permutation test for rda under reduced model
  Marginal effects of terms
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env)
           Df Variance    F Pr(>F)
  Manure    3     12.4 1.30   0.12
  A1        1      3.5 1.09   0.40
  Residual 12     38.1            
  > anova(mrda1, permutations = per, by="margin")
  Permutation test for rda under reduced model
  Marginal effects of terms
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, scale = TRUE)
           Df Variance    F Pr(>F)
  Manure    3     4.21 1.12   0.22
  A1        1     1.86 1.48   0.14
  Residual 12    15.08            
  > anova(mcap, permutations = per, by="margin")
  Permutation test for capscale under reduced model
  Marginal effects of terms
  Permutation: free
  Number of permutations: 49
  
  Model: capscale(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "bray")
           Df SumOfSqs    F Pr(>F)  
  Manure    3    0.627 1.24   0.22  
  A1        1    0.370 2.19   0.08 .
  Residual 12    2.021              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(mdb, permutations = per, by="margin")
  Permutation test for dbrda under reduced model
  Marginal effects of terms
  Permutation: free
  Number of permutations: 49
  
  Model: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "bray")
           Df SumOfSqs    F Pr(>F)  
  Manure    3    0.594 1.32   0.18  
  A1        1    0.367 2.46   0.08 .
  Residual 12    1.796              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(mancap, permutations = per, by="margin")
  Permutation test for capscale under reduced model
  Marginal effects of terms
  Permutation: free
  Number of permutations: 49
  
  Model: capscale(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "manhattan")
           Df Variance    F Pr(>F)
  Manure    3      165 1.46   0.12
  A1        1       40 1.07   0.34
  Residual 12      452            
  > anova(mandb, permutations = per, by="margin")
  Permutation test for dbrda under reduced model
  Marginal effects of terms
  Permutation: free
  Number of permutations: 49
  
  Model: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "manhattan")
           Df Variance    F Pr(>F)
  Manure    3      155 1.60   0.12
  A1        1       39 1.22   0.26
  Residual 12      387            
  > anova(m1rda, permutations = per, by="margin")
  Permutation test for rda under reduced model
  Marginal effects of terms
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = H ~ A1, data = dune.env)
           Df Variance    F Pr(>F)
  A1        1   0.0029 0.75   0.44
  Residual 18   0.0703            
  > 
  > anova(mcca, permutations = per, by="axis")
  Permutation test for cca under reduced model
  Forward tests for axes
  Permutation: free
  Number of permutations: 49
  
  Model: cca(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env)
           Df ChiSquare    F Pr(>F)
  CCA1      1     0.223 2.52   0.16
  CCA2      1     0.123 1.39   0.56
  CCA3      1     0.064 0.72   0.96
  CCA4      1     0.041 0.46   0.96
  Residual 12     1.062            
  > anova(mrda, permutations = per, by="axis")
  Permutation test for rda under reduced model
  Forward tests for axes
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env)
           Df Variance    F Pr(>F)
  RDA1      1      8.5 2.69   0.10
  RDA2      1      4.3 1.36   0.62
  RDA3      1      2.2 0.69   0.98
  RDA4      1      1.7 0.54   0.94
  Residual 12     38.1            
  > anova(mrda1, permutations = per, by="axis")
  Permutation test for rda under reduced model
  Forward tests for axes
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, scale = TRUE)
           Df Variance    F Pr(>F)
  RDA1      1     2.61 2.08   0.22
  RDA2      1     1.70 1.35   0.62
  RDA3      1     1.10 0.88   0.94
  RDA4      1     0.73 0.58   0.98
  Residual 12    15.08            
  > anova(mcap, permutations = per, by="axis")
  Permutation test for capscale under reduced model
  Forward tests for axes
  Permutation: free
  Number of permutations: 49
  
  Model: capscale(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "bray")
           Df SumOfSqs    F Pr(>F)
  CAP1      1    0.674 4.00   0.12
  CAP2      1    0.243 1.44   0.66
  CAP3      1    0.105 0.62   0.98
  CAP4      1    0.051 0.30   0.96
  Residual 12    2.021            
  > anova(mdb, permutations = per, by="axis")
  Permutation test for dbrda under reduced model
  Forward tests for axes
  Permutation: free
  Number of permutations: 49
  
  Model: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "bray")
           Df SumOfSqs    F Pr(>F)  
  dbRDA1    1    0.667 4.45   0.08 .
  dbRDA2    1    0.238 1.59   0.58  
  dbRDA3    1    0.091 0.61   0.98  
  dbRDA4    1    0.038 0.26   0.94  
  Residual 12    1.796              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(mancap, permutations = per, by="axis")
  Permutation test for capscale under reduced model
  Forward tests for axes
  Permutation: free
  Number of permutations: 49
  
  Model: capscale(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "manhattan")
           Df Variance    F Pr(>F)
  CAP1      1      126 3.33   0.18
  CAP2      1       49 1.31   0.74
  CAP3      1       24 0.64   0.98
  CAP4      1       14 0.37   0.98
  Residual 12      452            
  > anova(mandb, permutations = per, by="axis")
  Permutation test for dbrda under reduced model
  Forward tests for axes
  Permutation: free
  Number of permutations: 49
  
  Model: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "manhattan")
           Df Variance    F Pr(>F)
  dbRDA1    1      123 3.81   0.18
  dbRDA2    1       47 1.47   0.68
  dbRDA3    1       22 0.68   0.98
  dbRDA4    1       10 0.31   0.94
  Residual 12      387            
  > anova(m1rda, permutations = per, by="axis")
  Permutation test for rda under reduced model
  Forward tests for axes
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = H ~ A1, data = dune.env)
           Df Variance    F Pr(>F)
  RDA1      1   0.0029 0.75   0.44
  Residual 18   0.0703            
  > 
  > ## permutation tests in parallel
  > clust <- makeCluster(2) # socket cluster: the only one that works in Windows
  > 
  > permutest(mcca,   per, parallel = clust) # use socket cluster
  
  Permutation test for cca under reduced model 
  
  Permutation: free
  Number of permutations: 49
   
  Model: cca(formula = dune ~ Condition(Management) + Manure + A1, data =
  dune.env)
  Permutation test for all constrained eigenvalues
           Df Inertia    F Pr(>F)
  Model     4    0.45 1.27   0.12
  Residual 12    1.06            
  > permutest(mrda,   per, parallel = clust) # use socket cluster
  
  Permutation test for rda under reduced model 
  
  Permutation: free
  Number of permutations: 49
   
  Model: rda(formula = dune ~ Condition(Management) + Manure + A1, data =
  dune.env)
  Permutation test for all constrained eigenvalues
           Df Inertia    F Pr(>F)  
  Model     4    16.8 1.32   0.08 .
  Residual 12    38.1              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > permutest(mrda1,  per, parallel = clust) # use socket cluster
  
  Permutation test for rda under reduced model 
  
  Permutation: free
  Number of permutations: 49
   
  Model: rda(formula = dune ~ Condition(Management) + Manure + A1, data =
  dune.env, scale = TRUE)
  Permutation test for all constrained eigenvalues
           Df Inertia    F Pr(>F)
  Model     4    6.14 1.22   0.16
  Residual 12   15.08            
  > permutest(mcap,   per, parallel = clust) # use socket cluster
  
  Permutation test for capscale under reduced model 
  
  Permutation: free
  Number of permutations: 49
   
  Model: capscale(formula = dune ~ Condition(Management) + Manure + A1,
  data = dune.env, distance = "bray")
  Permutation test for all constrained eigenvalues
           Df Inertia    F Pr(>F)  
  Model     4    1.07 1.59   0.08 .
  Residual 12    2.02              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > permutest(mdb,    per, parallel = clust) # use socket cluster
  
  Permutation test for dbrda under reduced model 
  
  Permutation: free
  Number of permutations: 49
   
  Model: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data
  = dune.env, distance = "bray")
  Permutation test for all constrained eigenvalues
           Df Inertia    F Pr(>F)  
  Model     4    1.03 1.73   0.08 .
  Residual 12    1.80              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > permutest(mancap, per, parallel = clust) # use socket cluster
  
  Permutation test for capscale under reduced model 
  
  Permutation: free
  Number of permutations: 49
   
  Model: capscale(formula = dune ~ Condition(Management) + Manure + A1,
  data = dune.env, distance = "manhattan")
  Permutation test for all constrained eigenvalues
           Df Inertia    F Pr(>F)
  Model     4     213 1.41   0.12
  Residual 12     452            
  > permutest(mandb,  per, parallel = clust) # use socket cluster
  
  Permutation test for dbrda under reduced model 
  
  Permutation: free
  Number of permutations: 49
   
  Model: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data
  = dune.env, distance = "manhattan")
  Permutation test for all constrained eigenvalues
           Df Inertia    F Pr(>F)  
  Model     4     203 1.57   0.08 .
  Residual 12     387              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > permutest(m1rda,  per, parallel = clust) # use socket cluster
  
  Permutation test for rda under reduced model 
  
  Permutation: free
  Number of permutations: 49
   
  Model: rda(formula = H ~ A1, data = dune.env)
  Permutation test for all constrained eigenvalues
           Df Inertia    F Pr(>F)
  Model     1  0.0029 0.75   0.44
  Residual 18  0.0703            
  > 
  > 
  > drop1(mcca,  test = "permutation", permutations = per, parallel = clust)
                        Df  AIC    F Pr(>F)  
  <none>                   87.9              
  Condition(Management)  2 87.9              
  Manure                 3 86.5 1.03   0.36  
  A1                     1 89.0 2.00   0.06 .
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > drop1(mrda,  test = "permutation", permutations = per, parallel = clust)
                        Df  AIC    F Pr(>F)
  <none>                   87.8            
  Condition(Management)  2 89.2            
  Manure                 3 87.4 1.30   0.12
  A1                     1 87.5 1.09   0.40
  > drop1(mrda1, test = "permutation", permutations = per, parallel = clust)
                        Df  AIC    F Pr(>F)
  <none>                   69.2            
  Condition(Management)  2 69.8            
  Manure                 3 68.2 1.12   0.22
  A1                     1 69.6 1.48   0.14
  > drop1(mcap,  test = "permutation", permutations = per, parallel = clust)
                        Df  AIC    F Pr(>F)  
  <none>                   29.1              
  Condition(Management)  2 29.4              
  Manure                 3 28.4 1.24   0.22  
  A1                     1 30.4 2.19   0.08 .
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > drop1(mdb,   test = "permutation", permutations = per, parallel = clust)
                        Df  AIC    F Pr(>F)  
  <none>                   26.7              
  Condition(Management)  2 27.2              
  Manure                 3 26.4 1.32   0.18  
  A1                     1 28.4 2.46   0.08 .
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > drop1(m1rda, test = "permutation", permutations = per, parallel = clust)
         Df   AIC    F Pr(>F)
  <none>    -50.1            
  A1      1 -51.3 0.75   0.44
  > 
  > anova(mcca,   permutations = per, parallel = clust)
  Permutation test for cca under reduced model
  Permutation: free
  Number of permutations: 49
  
  Model: cca(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env)
           Df ChiSquare    F Pr(>F)
  Model     4      0.45 1.27   0.12
  Residual 12      1.06            
  > anova(mrda,   permutations = per, parallel = clust)
  Permutation test for rda under reduced model
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env)
           Df Variance    F Pr(>F)  
  Model     4     16.8 1.32   0.08 .
  Residual 12     38.1              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(mrda1,  permutations = per, parallel = clust)
  Permutation test for rda under reduced model
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, scale = TRUE)
           Df Variance    F Pr(>F)
  Model     4     6.14 1.22   0.16
  Residual 12    15.08            
  > anova(mcap,   permutations = per, parallel = clust)
  Permutation test for capscale under reduced model
  Permutation: free
  Number of permutations: 49
  
  Model: capscale(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "bray")
           Df SumOfSqs    F Pr(>F)  
  Model     4     1.07 1.59   0.08 .
  Residual 12     2.02              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(mdb,    permutations = per, parallel = clust)
  Permutation test for dbrda under reduced model
  Permutation: free
  Number of permutations: 49
  
  Model: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "bray")
           Df SumOfSqs    F Pr(>F)  
  Model     4     1.03 1.73   0.08 .
  Residual 12     1.80              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(mancap, permutations = per, parallel = clust)
  Permutation test for capscale under reduced model
  Permutation: free
  Number of permutations: 49
  
  Model: capscale(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "manhattan")
           Df Variance    F Pr(>F)
  Model     4      213 1.41   0.12
  Residual 12      452            
  > anova(mandb,  permutations = per, parallel = clust)
  Permutation test for dbrda under reduced model
  Permutation: free
  Number of permutations: 49
  
  Model: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "manhattan")
           Df Variance    F Pr(>F)  
  Model     4      203 1.57   0.08 .
  Residual 12      387              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(m0cca,  permutations = per, parallel = clust)
  No constrained component
  
  Model: cca(formula = dune ~ Condition(Management) + Management, data = dune.env)
           Df ChiSquare  F Pr(>F)
  Model     0      0.00  0       
  Residual 19      1.51          
  > 
  > anova(mcca,   permutations = per, by = "term", parallel = clust)
  Permutation test for cca under reduced model
  Terms added sequentially (first to last)
  Permutation: free
  Number of permutations: 49
  
  Model: cca(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env)
           Df ChiSquare    F Pr(>F)  
  Manure    3     0.273 1.03   0.36  
  A1        1     0.177 2.00   0.06 .
  Residual 12     1.062              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(mrda,   permutations = per, by = "term", parallel = clust)
  Permutation test for rda under reduced model
  Terms added sequentially (first to last)
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env)
           Df Variance    F Pr(>F)
  Manure    3     13.3 1.40    0.1
  A1        1      3.5 1.09    0.4
  Residual 12     38.1            
  > anova(mrda1,  permutations = per, by = "term", parallel = clust)
  Permutation test for rda under reduced model
  Terms added sequentially (first to last)
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, scale = TRUE)
           Df Variance    F Pr(>F)
  Manure    3     4.28 1.14   0.20
  A1        1     1.86 1.48   0.14
  Residual 12    15.08            
  > anova(mcap,   permutations = per, by = "term", parallel = clust)
  Permutation test for capscale under reduced model
  Terms added sequentially (first to last)
  Permutation: free
  Number of permutations: 49
  
  Model: capscale(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "bray")
           Df SumOfSqs    F Pr(>F)  
  Manure    3    0.703 1.39   0.12  
  A1        1    0.370 2.19   0.08 .
  Residual 12    2.021              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(mdb,    permutations = per, by = "term", parallel = clust)
  Permutation test for dbrda under reduced model
  Terms added sequentially (first to last)
  Permutation: free
  Number of permutations: 49
  
  Model: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "bray")
           Df SumOfSqs    F Pr(>F)  
  Manure    3    0.667 1.49   0.12  
  A1        1    0.367 2.46   0.08 .
  Residual 12    1.796              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(mancap, permutations = per, by = "term", parallel = clust)
  Permutation test for capscale under reduced model
  Terms added sequentially (first to last)
  Permutation: free
  Number of permutations: 49
  
  Model: capscale(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "manhattan")
           Df Variance    F Pr(>F)
  Manure    3      173 1.53   0.14
  A1        1       40 1.07   0.34
  Residual 12      452            
  > anova(mandb,  permutations = per, by = "term", parallel = clust)
  Permutation test for dbrda under reduced model
  Terms added sequentially (first to last)
  Permutation: free
  Number of permutations: 49
  
  Model: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "manhattan")
           Df Variance    F Pr(>F)
  Manure    3      163 1.68   0.14
  A1        1       39 1.22   0.26
  Residual 12      387            
  > anova(m1rda,  permutations = per, by = "term", parallel = clust)
  Permutation test for rda under reduced model
  Terms added sequentially (first to last)
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = H ~ A1, data = dune.env)
           Df Variance    F Pr(>F)
  A1        1   0.0029 0.75   0.44
  Residual 18   0.0703            
  > 
  > anova(mcca,   permutations = per, by = "margin", parallel = clust)
  Permutation test for cca under reduced model
  Marginal effects of terms
  Permutation: free
  Number of permutations: 49
  
  Model: cca(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env)
           Df ChiSquare    F Pr(>F)  
  Manure    3     0.274 1.03   0.36  
  A1        1     0.177 2.00   0.06 .
  Residual 12     1.062              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(mrda,   permutations = per, by = "margin", parallel = clust)
  Permutation test for rda under reduced model
  Marginal effects of terms
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env)
           Df Variance    F Pr(>F)
  Manure    3     12.4 1.30   0.12
  A1        1      3.5 1.09   0.40
  Residual 12     38.1            
  > anova(mrda1,  permutations = per, by = "margin", parallel = clust)
  Permutation test for rda under reduced model
  Marginal effects of terms
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, scale = TRUE)
           Df Variance    F Pr(>F)
  Manure    3     4.21 1.12   0.22
  A1        1     1.86 1.48   0.14
  Residual 12    15.08            
  > anova(mcap,   permutations = per, by = "margin", parallel = clust)
  Permutation test for capscale under reduced model
  Marginal effects of terms
  Permutation: free
  Number of permutations: 49
  
  Model: capscale(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "bray")
           Df SumOfSqs    F Pr(>F)  
  Manure    3    0.627 1.24   0.22  
  A1        1    0.370 2.19   0.08 .
  Residual 12    2.021              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(mdb,    permutations = per, by = "margin", parallel = clust)
  Permutation test for dbrda under reduced model
  Marginal effects of terms
  Permutation: free
  Number of permutations: 49
  
  Model: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "bray")
           Df SumOfSqs    F Pr(>F)  
  Manure    3    0.594 1.32   0.18  
  A1        1    0.367 2.46   0.08 .
  Residual 12    1.796              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(mancap, permutations = per, by = "margin", parallel = clust)
  Permutation test for capscale under reduced model
  Marginal effects of terms
  Permutation: free
  Number of permutations: 49
  
  Model: capscale(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "manhattan")
           Df Variance    F Pr(>F)
  Manure    3      165 1.46   0.12
  A1        1       40 1.07   0.34
  Residual 12      452            
  > anova(mandb,  permutations = per, by = "margin", parallel = clust)
  Permutation test for dbrda under reduced model
  Marginal effects of terms
  Permutation: free
  Number of permutations: 49
  
  Model: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "manhattan")
           Df Variance    F Pr(>F)
  Manure    3      155 1.60   0.12
  A1        1       39 1.22   0.26
  Residual 12      387            
  > anova(m1rda,  permutations = per, by = "margin", parallel = clust)
  Permutation test for rda under reduced model
  Marginal effects of terms
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = H ~ A1, data = dune.env)
           Df Variance    F Pr(>F)
  A1        1   0.0029 0.75   0.44
  Residual 18   0.0703            
  > 
  > anova(mcca,   permutations = per, by = "axis", parallel = clust)
  Permutation test for cca under reduced model
  Forward tests for axes
  Permutation: free
  Number of permutations: 49
  
  Model: cca(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env)
           Df ChiSquare    F Pr(>F)
  CCA1      1     0.223 2.52   0.16
  CCA2      1     0.123 1.39   0.56
  CCA3      1     0.064 0.72   0.96
  CCA4      1     0.041 0.46   0.96
  Residual 12     1.062            
  > anova(mrda,   permutations = per, by = "axis", parallel = clust)
  Permutation test for rda under reduced model
  Forward tests for axes
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env)
           Df Variance    F Pr(>F)
  RDA1      1      8.5 2.69   0.10
  RDA2      1      4.3 1.36   0.62
  RDA3      1      2.2 0.69   0.98
  RDA4      1      1.7 0.54   0.94
  Residual 12     38.1            
  > anova(mrda1,  permutations = per, by = "axis", parallel = clust)
  Permutation test for rda under reduced model
  Forward tests for axes
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, scale = TRUE)
           Df Variance    F Pr(>F)
  RDA1      1     2.61 2.08   0.22
  RDA2      1     1.70 1.35   0.62
  RDA3      1     1.10 0.88   0.94
  RDA4      1     0.73 0.58   0.98
  Residual 12    15.08            
  > anova(mcap,   permutations = per, by = "axis", parallel = clust)
  Permutation test for capscale under reduced model
  Forward tests for axes
  Permutation: free
  Number of permutations: 49
  
  Model: capscale(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "bray")
           Df SumOfSqs    F Pr(>F)
  CAP1      1    0.674 4.00   0.12
  CAP2      1    0.243 1.44   0.66
  CAP3      1    0.105 0.62   0.98
  CAP4      1    0.051 0.30   0.96
  Residual 12    2.021            
  > anova(mdb,    permutations = per, by = "axis", parallel = clust)
  Permutation test for dbrda under reduced model
  Forward tests for axes
  Permutation: free
  Number of permutations: 49
  
  Model: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "bray")
           Df SumOfSqs    F Pr(>F)  
  dbRDA1    1    0.667 4.45   0.08 .
  dbRDA2    1    0.238 1.59   0.58  
  dbRDA3    1    0.091 0.61   0.98  
  dbRDA4    1    0.038 0.26   0.94  
  Residual 12    1.796              
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(mancap, permutations = per, by = "axis", parallel = clust)
  Permutation test for capscale under reduced model
  Forward tests for axes
  Permutation: free
  Number of permutations: 49
  
  Model: capscale(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "manhattan")
           Df Variance    F Pr(>F)
  CAP1      1      126 3.33   0.18
  CAP2      1       49 1.31   0.74
  CAP3      1       24 0.64   0.98
  CAP4      1       14 0.37   0.98
  Residual 12      452            
  > anova(mandb,  permutations = per, by = "axis", parallel = clust)
  Permutation test for dbrda under reduced model
  Forward tests for axes
  Permutation: free
  Number of permutations: 49
  
  Model: dbrda(formula = dune ~ Condition(Management) + Manure + A1, data = dune.env, distance = "manhattan")
           Df Variance    F Pr(>F)
  dbRDA1    1      123 3.81   0.18
  dbRDA2    1       47 1.47   0.68
  dbRDA3    1       22 0.68   0.98
  dbRDA4    1       10 0.31   0.94
  Residual 12      387            
  > anova(m1rda,  permutations = per, by = "axis", parallel = clust)
  Permutation test for rda under reduced model
  Forward tests for axes
  Permutation: free
  Number of permutations: 49
  
  Model: rda(formula = H ~ A1, data = dune.env)
           Df Variance    F Pr(>F)
  RDA1      1   0.0029 0.75   0.44
  Residual 18   0.0703            
  > 
  > # stop the cluster as we are finished
  > stopCluster(clust)
  > 
  > ## the following do not all work with partial models
  > 
  > mcca <- cca(dune ~ Management + Manure + A1, dune.env)
  > mrda <- rda(dune ~ Management + Manure + A1, dune.env)
  > mrda1 <- rda(dune ~ Management + Manure + A1, dune.env, scale = TRUE)
  > mcap <- capscale(dune ~ Management + Manure + A1, dune.env, dist = "bray")
  > mdb <- dbrda(dune ~ Management + Manure + A1, dune.env, dist = "bray")
  > mancap <- capscale(dune ~ Management + Manure + A1, dune.env, dist = "man")
  > mandb <- dbrda(dune ~ Management + Manure + A1, dune.env, dist = "man")
  > 
  > head(calibrate(mcca))
    ManagementHF ManagementNM ManagementSF   Manure.L Manure.Q Manure.C     A1
  1     0.883602    -0.178091      0.36500  0.7922315  0.78355  0.57312 1.3024
  2    -0.257595    -0.069182      0.46841  0.2174342 -0.27084  0.18996 4.2482
  3    -0.055206    -0.068419      1.04034  0.6060948  0.21723  0.09595 4.2281
  4    -0.304369     0.132054      1.21814  0.5919769  0.71695  0.40928 4.8630
  5     0.961520     0.091569     -0.12497 -0.0029732 -0.49357 -0.11564 4.9642
  6     1.449919     0.075602     -0.42298 -0.0535267 -0.68574 -0.40418 4.7055
  > head(calibrate(mrda))
    ManagementHF ManagementNM ManagementSF Manure.L  Manure.Q Manure.C     A1
  1      0.29401     0.408403     0.440828  0.34294  0.960228  0.25907 3.1367
  2     -0.32193    -0.210940     0.525258  0.25761 -0.426433  0.32086 4.7427
  3     -0.06329    -0.382552     1.295568  0.88816  0.051051  0.20844 3.0244
  4     -0.23072    -0.025851     1.263604  0.66627  0.592289  0.48117 5.1389
  5      1.09411     0.333615    -0.086119  0.10122 -0.218722 -0.47284 5.6906
  6      1.54974     0.128610    -0.647474 -0.24172 -0.688913 -0.24163 4.9992
  > head(calibrate(mrda1))
    ManagementHF ManagementNM ManagementSF  Manure.L Manure.Q  Manure.C     A1
  1    0.4195172     0.195602     0.489930  0.408945  0.63673  0.144131 3.2457
  2   -0.2555697    -0.159948     0.512425  0.339689 -0.36751  0.098438 4.1415
  3    0.0088535    -0.149923     1.023768  0.659460  0.19479  0.184543 3.8499
  4   -0.4283707    -0.045680     1.486302  0.828962  0.77205  0.620009 4.2044
  5    0.8791230     0.132390    -0.061982  0.027179 -0.43322 -0.200905 4.8834
  6    1.5945412     0.099612    -0.601114 -0.217085 -0.77311 -0.325635 4.9080
  > head(calibrate(mcap))
    ManagementHF ManagementNM ManagementSF Manure.L  Manure.Q Manure.C     A1
  1      0.35351    0.1299840      0.73772  0.83346  1.150928  0.34051 1.5819
  2     -0.27328   -0.1807926      0.57688  0.36108 -0.389540  0.11337 4.5618
  3     -0.11521   -0.1378795      1.07627  0.50500  0.078248  0.33544 5.1742
  4     -0.23830    0.0078955      1.18601  0.55891  0.374392  0.27273 4.5439
  5      1.06102    0.4254412      0.13710  0.28460  0.040009 -0.59962 4.9298
  6      1.21797    0.1198752     -0.54117 -0.26797 -0.686710 -0.18564 4.7785
  > head(calibrate(mdb))
    ManagementHF ManagementNM ManagementSF Manure.L  Manure.Q Manure.C      A1
  1      1.05945      0.29233      0.45310  0.87163  1.686742  0.39091 0.84665
  2     -0.34870     -0.23103      0.57147  0.27070 -0.480259  0.28872 4.72537
  3     -0.47320     -0.16902      1.26895  0.52349 -0.119173  0.25712 5.74253
  4     -0.58626     -0.12331      1.27795  0.50225  0.035999  0.30065 4.71082
  5      1.33269      0.79710      0.31597  0.70260  0.684932 -1.30598 5.00807
  6      1.02170      0.04279     -0.45446 -0.19833 -0.946468 -0.41926 4.83736
  > head(calibrate(mancap))
    ManagementHF ManagementNM ManagementSF Manure.L Manure.Q Manure.C     A1
  1    0.1281240      0.49145      0.55983  0.38470  1.01262  0.05207 2.9860
  2   -0.2879151     -0.26123      0.60310  0.35832 -0.34121  0.38002 4.7783
  3    0.0069596     -0.30212      1.12067  0.67840 -0.01814  0.29692 5.0313
  4   -0.1350836     -0.18933      1.31950  0.83427  0.60909  0.59970 3.2827
  5    1.0725483      0.45851      0.19538  0.40446  0.19234 -0.66824 4.1253
  6    1.2857657      0.17740     -0.75589 -0.46798 -0.90859 -0.30014 5.4699
  > head(calibrate(mandb))
    ManagementHF ManagementNM ManagementSF Manure.L Manure.Q Manure.C     A1
  1      0.66644      0.97505      0.47379  0.66422  2.09891 -0.22874 1.9653
  2     -0.38822     -0.34825      0.53059  0.12940 -0.50764  0.77856 5.6362
  3     -0.32924     -0.58837      1.19831  0.53616 -0.68211  0.41320 5.7036
  4     -0.33720     -0.38668      1.32790  0.69699  0.18678  0.76423 3.6311
  5      1.79594      1.19611      0.29836  1.11710  1.76562 -1.62223 2.1351
  6      0.94598     -0.19327     -0.59457 -0.39197 -1.80062 -0.68601 5.2833
  > 
  > head(calibrate(mcca, newdata=dune[11:15,]))
     ManagementHF ManagementNM ManagementSF Manure.L Manure.Q Manure.C      A1
  11     0.233858      0.13861     -0.32589 -0.67553 -0.10659  0.96310  2.3507
  12    -0.260642     -0.13316      1.17152 -0.18386 -0.69386  0.46843  5.9871
  13    -0.081594     -0.30854      1.18097  0.46491 -0.63881 -0.47286  4.3479
  14    -0.502316      1.06326      0.16060 -0.79843  0.41515 -0.15379 12.3207
  15     0.559981      0.90354     -0.15982 -0.50872  0.61926 -0.36272 10.2026
  > head(calibrate(mrda, newdata=dune[11:15,]))
     ManagementHF ManagementNM ManagementSF Manure.L  Manure.Q   Manure.C      A1
  11     0.201986      0.28140    -0.260060 -0.57309  0.052355  0.6582554  1.8489
  12    -0.321917     -0.25129     1.208336 -0.11711 -0.804022  0.3936137  4.4676
  13    -0.032546     -0.39458     1.249458  0.62224 -0.686520 -0.5422918  3.4391
  14    -0.351860      0.97669    -0.021120 -0.83760  0.391761  0.0098888 12.3969
  15     0.294308      1.01918    -0.072777 -0.57590  0.635282 -0.4504748  9.7828
  > head(calibrate(mrda1, newdata=dune[11:15,]))
     ManagementHF ManagementNM ManagementSF Manure.L  Manure.Q Manure.C      A1
  11     0.155890     0.255231    -0.302207 -0.73488 -0.013315  0.90939  2.6425
  12    -0.218095    -0.072054     1.150670 -0.14978 -0.564254  0.42810  5.9670
  13    -0.049615    -0.458412     1.292784  0.66760 -0.789885 -0.72793  4.0747
  14    -0.234464     1.037849     0.029142 -0.75498  0.435175 -0.26652 11.9376
  15     0.298221     1.006569    -0.102984 -0.60489  0.611461 -0.36576 10.3615
  > ## head(calibrate(m1rda, newdata=dune[11:15,]))## fails
  > 
  > head(predict(mcca, newdata = dune.env))
    Achimill Agrostol  Airaprae Alopgeni  Anthodor Bellpere Bromhord   Chenalbu
  1  0.24866  1.73029  0.136732  1.56567  0.176689  0.69298  0.51661 -0.0066751
  2  3.38022 -1.33575  0.103100  0.65804  1.869170  2.61940  3.71719 -0.0403493
  3  0.34629  4.86894 -0.077815  3.49921 -0.100555  1.55684  1.16941  0.0037988
  4  0.40505  5.40077 -0.058917  3.93512 -0.076134  1.75018  1.31398  0.0028763
  5  1.40721  1.39415 -0.409583  1.63738  1.727211  0.95730  1.09875 -0.0725665
  6  1.90089 -0.08191  0.153453  1.79584  2.717164  1.04159  1.19230 -0.1108163
      Cirsarve Comapalu Eleopalu Elymrepe  Empenigr  Hyporadi  Juncarti  Juncbufo
  1  0.3441739 -0.23208 -0.45345   2.1049  0.057806  0.185956 -0.099929  0.061638
  2 -0.0040270 -0.17500 -0.50790   1.1357  0.043588  0.520382 -1.422491 -1.092553
  3  0.7797384  0.13208  0.25806   4.6558 -0.032898 -0.105828  0.056870 -0.035078
  4  0.8760877  0.10000  0.19539   5.2394 -0.024908 -0.080127  0.043059 -0.026559
  5  0.0159981  0.69521  0.92329   2.6923 -0.173160 -0.707302  0.863780  0.925259
  6 -0.0059938 -0.26047 -0.99453   3.0401  0.064876  0.040954  0.517926  1.308129
    Lolipere  Planlanc Poaprat Poatriv Ranuflam   Rumeacet Sagiproc Salirepe
  1   3.3037  0.084120  2.3947  2.2427 -0.13537  0.0087837 0.960535  0.29588
  2   6.5539  2.660088  3.7155  5.1158 -0.18507  0.9898833 0.020732  0.22310
  3   6.9004 -0.047873  4.9787  5.0651  0.07704 -0.0049989 1.892379 -0.16839
  4   7.7960 -0.036247  5.6267  5.6922  0.05833 -0.0037848 2.147087 -0.12749
  5   3.0005  3.113739  2.2475  5.1987  0.18798  4.5983853 0.523997 -0.88631
  6   4.0551  3.851490  3.0574  5.6731 -0.39474  5.1723104 0.972355  0.33206
    Scorautu   Trifprat Trifrepe   Vicilath Bracruta  Callcusp
  1  0.82391  0.0197135  0.31089  0.0069474  0.74251 -0.088855
  2  5.26245  0.9904728  4.99741  0.5754882  1.78447 -0.172948
  3  1.48233 -0.0112191  1.28649 -0.0039538  1.52865  0.050568
  4  1.69376 -0.0084944  1.40263 -0.0029936  1.72884  0.038287
  5  2.64699  2.4979708  4.08460 -0.2462139  3.06843 -0.011518
  6  3.51252  2.8764755  3.60655 -0.2438153  3.61943 -0.409696
  > predict(mrda, newdata = dune.env[1:4,])
    Achimill Agrostol  Airaprae Alopgeni Anthodor Bellpere Bromhord   Chenalbu
  1  0.42151   3.5776  0.169954  2.96527  0.22365   1.3183  0.98345 -0.0071714
  2  3.31141  -1.2047  0.068507  0.67566  1.81429   2.5802  3.64850 -0.0373735
  3  0.28468   4.2330 -0.093768  3.01916 -0.12339   1.3416  1.00913  0.0039566
  4  0.29380   4.1893 -0.076186  3.01557 -0.10026   1.3401  1.00742  0.0032148
      Cirsarve Comapalu Eleopalu Elymrepe  Empenigr Hyporadi  Juncarti  Juncbufo
  1  0.6537462 -0.25642 -0.48190   3.9671  0.071560  0.23272 -0.093331  0.071945
  2 -0.0052081 -0.10336 -0.33218   1.0902  0.028845  0.43864 -1.382448 -1.108931
  3  0.6737952  0.14147  0.26587   4.0182 -0.039481 -0.12840  0.051493 -0.039694
  4  0.6724586  0.11495  0.21602   4.0147 -0.032078 -0.10432  0.041838 -0.032251
    Lolipere  Planlanc Poaprat Poatriv  Ranuflam   Rumeacet Sagiproc Salirepe
  1   6.1341  0.110732  4.4479  4.2624 -0.132118  0.0061432  1.75867  0.36823
  2   6.3299  2.630842  3.5634  5.1093 -0.122221  1.0714418 -0.03188  0.14843
  3   5.9260 -0.061094  4.2701  4.3725  0.072893 -0.0033894  1.61591 -0.20316
  4   5.9399 -0.049639  4.2820  4.3651  0.059225 -0.0027539  1.62542 -0.16507
    Scorautu   Trifprat Trifrepe   Vicilath Bracruta  Callcusp
  1   1.5171  0.0205888  0.77684  0.0121579   1.4156 -0.082638
  2   5.1431  1.0427819  4.94453  0.5221421   1.7573 -0.136759
  3   1.2319 -0.0113594  1.12312 -0.0067078   1.2879  0.045593
  4   1.2509 -0.0092295  1.10004 -0.0054501   1.2965  0.037045
  > predict(mrda1, newdata = dune.env[1:4,])
    Achimill Agrostol  Airaprae Alopgeni Anthodor Bellpere Bromhord   Chenalbu
  1  0.42151   3.5776  0.169954  2.96527  0.22365   1.3183  0.98345 -0.0071714
  2  3.31141  -1.2047  0.068507  0.67566  1.81429   2.5802  3.64850 -0.0373735
  3  0.28468   4.2330 -0.093768  3.01916 -0.12339   1.3416  1.00913  0.0039566
  4  0.29380   4.1893 -0.076186  3.01557 -0.10026   1.3401  1.00742  0.0032148
      Cirsarve Comapalu Eleopalu Elymrepe  Empenigr Hyporadi  Juncarti  Juncbufo
  1  0.6537462 -0.25642 -0.48190   3.9671  0.071560  0.23272 -0.093331  0.071945
  2 -0.0052081 -0.10336 -0.33218   1.0902  0.028845  0.43864 -1.382448 -1.108931
  3  0.6737952  0.14147  0.26587   4.0182 -0.039481 -0.12840  0.051493 -0.039694
  4  0.6724586  0.11495  0.21602   4.0147 -0.032078 -0.10432  0.041838 -0.032251
    Lolipere  Planlanc Poaprat Poatriv  Ranuflam   Rumeacet Sagiproc Salirepe
  1   6.1341  0.110732  4.4479  4.2624 -0.132118  0.0061432  1.75867  0.36823
  2   6.3299  2.630842  3.5634  5.1093 -0.122221  1.0714418 -0.03188  0.14843
  3   5.9260 -0.061094  4.2701  4.3725  0.072893 -0.0033894  1.61591 -0.20316
  4   5.9399 -0.049639  4.2820  4.3651  0.059225 -0.0027539  1.62542 -0.16507
    Scorautu   Trifprat Trifrepe   Vicilath Bracruta  Callcusp
  1   1.5171  0.0205888  0.77684  0.0121579   1.4156 -0.082638
  2   5.1431  1.0427819  4.94453  0.5221421   1.7573 -0.136759
  3   1.2319 -0.0113594  1.12312 -0.0067078   1.2879  0.045593
  4   1.2509 -0.0092295  1.10004 -0.0054501   1.2965  0.037045
  > predict(mcap, newdata = dune.env[1:4,])
            1         2         3
  2 0.4410552                    
  3 0.1132396 0.4889419          
  4 0.1056903 0.4850746 0.0075493
  > predict(mdb, newdata = dune.env[1:4,])
            1         2         3
  2 0.4101123                    
  3 0.1129160 0.4608659          
  4 0.1053882 0.4567899 0.0075277
  > predict(mancap, newdata = dune.env[1:4,])
           1        2        3
  2 8.064421                  
  3 1.182080 8.684763         
  4 1.103275 8.639762 0.078805
  > predict(mandb, newdata = dune.env[1:4,])
           1        2        3
  2 7.600620                  
  3 1.170623 8.248343         
  4 1.092581 8.201556 0.078042
  > predict(m1rda, newdata = dune.env[1:4,])
      col1
  1 2.2142
  2 2.1968
  3 2.1769
  4 2.1794
  > 
  > ## the sign is arbitrary
  > abs(predict(mcca, newdata = dune[1:4,], type="wa"))
       CCA1    CCA2    CCA3    CCA4    CCA5    CCA6    CCA7
  1 1.62466 0.11383 1.78622 0.47896 2.12030 1.39557 3.08506
  2 1.06133 0.20433 1.30825 0.37139 0.76061 1.33289 1.37522
  3 0.71033 0.77748 0.81637 0.93095 0.66982 0.70982 0.35968
  4 0.64819 0.72329 1.44737 1.14892 1.84672 0.30213 0.86769
  > abs(predict(mrda, newdata = dune[1:4,], type="wa"))
       RDA1     RDA2    RDA3    RDA4     RDA5      RDA6    RDA7
  1 0.18535 0.022419 0.40394 0.28201 0.401393 0.0089804 0.17894
  2 0.34065 0.015217 0.15589 0.29898 0.481298 0.3110483 0.19056
  3 0.20203 0.385177 0.21607 0.16160 0.166526 0.0095877 0.15736
  4 0.11484 0.349445 0.34771 0.24737 0.051871 0.3004530 0.11508
  > abs(predict(mrda1, newdata = dune[1:4,], type="wa"))
        RDA1     RDA2    RDA3    RDA4    RDA5     RDA6     RDA7
  1 0.095172 0.104425 0.22637 0.17358 0.30374 0.152736 0.308891
  2 0.365200 0.034168 0.28660 0.18871 0.10331 0.478363 0.288641
  3 0.141907 0.261778 0.22356 0.14939 0.13501 0.111882 0.075503
  4 0.147735 0.348054 0.43875 0.29730 0.40430 0.024991 0.312684
  > 
  > ## the sign is arbitrary
  > abs(predict(mcca, newdata = dune[,1:4], type="sp"))
              CCA1   CCA2    CCA3    CCA4    CCA5    CCA6     CCA7
  Achimill 0.84687 1.0701 0.23634 0.82289 1.50817 1.01313 0.550205
  Agrostol 0.77155 1.3011 0.42471 0.53466 0.71397 0.13494 0.051337
  Airaprae 2.15432 3.1226 0.52500 2.50252 1.15845 1.26403 0.033265
  Alopgeni 0.14431 1.6487 0.42805 1.37756 0.61985 0.93554 0.806710
  > abs(predict(mrda, newdata = dune[,1:4], type="sp"))
               RDA1     RDA2     RDA3     RDA4     RDA5     RDA6       RDA7
  Achimill 0.156357 0.109758 0.051875 0.155370 0.192307 0.021201 0.05592900
  Agrostol 0.245787 0.453963 0.162518 0.018188 0.172589 0.119162 0.01098465
  Airaprae 0.052576 0.094503 0.014547 0.129765 0.049461 0.117122 0.08994751
  Alopgeni 0.024101 0.516842 0.132875 0.087468 0.396101 0.104365 0.00093612
  > abs(predict(mrda1, newdata = dune[,1:4], type="sp"))
               RDA1    RDA2     RDA3       RDA4     RDA5     RDA6     RDA7
  Achimill 0.257242 0.15508 0.023807 0.12405544 0.167384 0.214501 0.028569
  Agrostol 0.196652 0.30574 0.103167 0.00039545 0.045675 0.006216 0.010224
  Airaprae 0.117004 0.25667 0.028025 0.25799706 0.066905 0.086901 0.012198
  Alopgeni 0.031859 0.35291 0.051066 0.12889917 0.190337 0.197400 0.181314
  > 
  > abs(predict(mcca, newdata = dune.env[1:4,], type="lc"))
       CCA1    CCA2    CCA3    CCA4   CCA5    CCA6     CCA7
  1 0.98522 0.18116 1.06369 1.50574 1.3173 0.28751 0.141532
  2 1.13730 1.06013 0.82297 0.86803 1.2579 1.77285 1.123271
  3 0.80654 0.70480 1.31221 0.80414 1.4683 0.13208 0.010662
  4 0.81845 0.66990 1.29564 0.85092 1.4582 0.14245 0.000516
  > abs(predict(mrda, newdata = dune.env[1:4,], type="lc"))
       RDA1    RDA2     RDA3    RDA4     RDA5     RDA6    RDA7
  1 0.18523 0.20623 0.316247 0.30245 0.049422 0.025451 0.16224
  2 0.36803 0.22424 0.027466 0.34105 0.454235 0.099307 0.29753
  3 0.15757 0.25460 0.326062 0.19053 0.121045 0.141679 0.14397
  4 0.15942 0.25137 0.325408 0.19799 0.116270 0.133930 0.14518
  > abs(predict(mrda1, newdata = dune.env[1:4,], type="lc"))
       RDA1    RDA2    RDA3    RDA4    RDA5     RDA6     RDA7
  1 0.14664 0.19636 0.27651 0.30865 0.25564 0.021393 0.012121
  2 0.41723 0.24524 0.14249 0.22618 0.15529 0.482284 0.212404
  3 0.11814 0.26110 0.30710 0.15053 0.29502 0.020007 0.034328
  4 0.12004 0.25679 0.30507 0.16108 0.29239 0.017247 0.032847
  > abs(predict(mcap, newdata = dune.env[1:4,], type="lc"))
       CAP1    CAP2    CAP3    CAP4     CAP5     CAP6     CAP7
  1 0.27462 0.15007 0.21773 0.28034 0.099690 0.245828 0.058665
  2 0.32370 0.22297 0.10532 0.25592 0.502586 0.084408 0.341630
  3 0.21968 0.23163 0.27891 0.14326 0.097533 0.278465 0.020906
  4 0.22334 0.22620 0.27483 0.15240 0.097677 0.276289 0.023424
  > abs(predict(mdb, newdata = dune.env[1:4,], type="lc"))
     dbRDA1  dbRDA2  dbRDA3  dbRDA4  dbRDA5  dbRDA6   dbRDA7
  1 0.27666 0.14786 0.21628 0.27463 0.10935 0.23099 0.108744
  2 0.32039 0.21931 0.11598 0.22087 0.13951 0.50786 0.342277
  3 0.22194 0.22991 0.27926 0.13863 0.14881 0.24437 0.080877
  4 0.22559 0.22444 0.27506 0.14769 0.14618 0.24348 0.082735
  > abs(predict(mancap, newdata = dune.env[1:4,], type="lc"))
       CAP1    CAP2    CAP3     CAP4     CAP5    CAP6     CAP7
  1 0.15906 0.20999 0.26950 0.273591 0.085989 0.26571 0.053587
  2 0.38906 0.25364 0.20949 0.094601 0.472958 0.21394 0.263674
  3 0.13353 0.26897 0.28834 0.159016 0.012678 0.29389 0.050910
  4 0.13523 0.26503 0.28708 0.166654 0.017565 0.29201 0.043944
  > abs(predict(m1rda, newdata = dune.env[1:4,], type="lc"))
        RDA1
  1 0.215813
  2 0.142121
  3 0.057901
  4 0.068429
  > abs(predict(mandb, newdata = dune.env[1:4,]))
           1        2        3
  2 7.600620                  
  3 1.170623 8.248343         
  4 1.092581 8.201556 0.078042
  > ## reset
  > options(op)
  > 
  > proc.time()
     user  system elapsed 
     2.84    0.42    4.96 
Running the tests in 'tests/decostand-tests.R' failed.
Complete output:
  >         
  > ############################### CLR ####################################
  > # Calculates clr-transformation. Should be equal.
  > 
  > # Test data
  > # data(varespec)
  > testdata <- matrix(round(runif(1000, 0, 100)), nrow=20)
  > testdata <- testdata - 50
  > testdata[testdata < 0] <- 0
  > rownames(testdata) <- paste0("row", seq_len(nrow(testdata)))
  > colnames(testdata) <- paste0("col", seq_len(ncol(testdata)))
  > testdata.with.pseudo <- testdata + 1
  > 
  > # Calculates relative abundance table
  > relative <- vegan::decostand(testdata, "total")
  > relative.with.pseudo <- vegan::decostand(testdata+1, "total")
  > 
  > # CLR data
  > x.clr <- vegan::decostand(testdata+1, method = "clr")
  > x.rclr <- vegan::decostand(testdata, method = "rclr")
  > x.clr.pseudo <- vegan::decostand(testdata, method = "clr", pseudocount=1)
  > 
  > max(abs(x.clr - x.clr.pseudo))<1e-6
  [1] TRUE
  > max(abs(vegan::decostand(testdata+1, method = "clr", pseudocount=0)-x.clr.pseudo))<1e-6
  [1] TRUE
  > 
  > # Tests clr
  > alt.clr <- t(apply(as.matrix(relative.with.pseudo), 1, FUN=function(x){
  + log(x) - mean(log(x))}))
  > max(abs(x.clr-alt.clr)) < 1e-6      
  [1] TRUE
  > all((x.rclr==0) == (testdata==0))
  [1] TRUE
  > 
  > # Expect that error does not occur
  > vegan::decostand(testdata, method = "rclr")
              col1        col2       col3       col4        col5       col6
  row1   0.9262759  0.00000000  0.0000000  0.0000000  0.00000000  0.5208108
  row2   0.1027720  0.00000000  0.0000000  0.8384788 -0.39366487  0.0000000
  row3   0.0000000  0.00000000  0.0000000  0.0000000 -1.50735837  0.0000000
  row4   0.0000000 -0.34515617  0.0000000  0.6356731  0.38078084  0.0000000
  row5   1.1024780 -0.78025325  0.0000000  0.3648790  0.85735553 -1.6275511
  row6   0.0000000  0.00000000  0.0000000 -0.4717878  0.00000000  0.0000000
  row7   0.0000000  0.00000000  0.0000000  0.8959513  0.04865344  0.0000000
  row8   0.0000000 -0.32127724  0.0000000  0.0000000  0.00000000  0.0000000
  row9   0.0000000  0.20443256  0.0000000  0.4603659  0.00000000  0.0000000
  row10  0.0000000 -0.08191307  0.7065443  0.0000000  0.00000000  0.0000000
  row11  0.0000000  0.00000000  0.0000000  0.0000000 -0.88383289 -0.5161081
  row12  0.0000000  0.00000000  0.0000000 -1.5114941  0.61673760  0.0000000
  row13 -0.2987673 -1.76510432  0.7738695  0.4684879  0.00000000 -1.0719571
  row14  0.0000000  0.89641526  0.3478493 -0.2711899  0.00000000  0.4219573
  row15  0.0000000  0.72317231 -0.1035063  0.0000000  0.00000000  0.0000000
  row16  0.0000000  0.27795676  0.0000000  0.0000000  0.00000000  0.7357899
  row17  0.7623723  0.09589340  0.0000000  0.0000000  0.00000000  0.6479620
  row18  0.0000000  0.00000000  0.0000000  0.0000000  0.00000000  0.0000000
  row19  0.0000000  0.13294279 -0.0677279 -0.3190423  0.00000000  0.0000000
  row20  0.0000000  0.00000000  0.0000000 -0.6811703 -0.13462663  0.7495758
               col7       col8       col9       col10       col11      col12
  row1   0.00000000  0.0000000  0.0000000  0.00000000  0.00000000 -0.1723364
  row2  -1.08681205  0.0000000  0.4330137  0.00000000  0.00000000  0.2253743
  row3   0.00000000 -0.1856025  0.7439334  0.00000000 -0.40874608 -0.3287034
  row4  -0.00868393  0.3140895  0.0000000  0.55771155  0.00000000  0.6103553
  row5  -0.32826813  0.0000000 -1.6275511  0.00000000 -0.52893883  0.3183590
  row6   0.62682449  0.3755101 -1.3880785 -0.08879555  0.15236651  0.0000000
  row7  -1.74310602  0.0000000  0.0000000  0.00000000  0.00000000  0.6240176
  row8   0.00000000  0.0000000  0.0000000  0.65955201  0.63849860 -0.8137537
  row9   0.00000000 -1.0277111  0.0000000  0.00000000 -1.18186180 -0.7763967
  row10  0.00000000  0.0000000  0.7509961  0.00000000  0.00000000 -1.2858859
  row11  0.00000000  0.0000000  0.0000000 -0.03653503  0.00000000  0.0000000
  row12  0.00000000  0.0000000 -0.1251997  0.00000000  0.00000000  0.0000000
  row13  0.00000000 -0.2246593  0.9649248  0.92047302  0.00000000  0.3943799
  row14  0.00000000  0.0000000  0.0000000  0.00000000  0.49095016 -1.8116349
  row15  0.00000000  0.0000000  0.0000000  0.18417581 -0.01253449  0.0000000
  row16  0.21126539 -0.8534453  0.1761741  0.58163918  0.00000000  0.0000000
  row17  0.09589340  0.0000000  0.0000000  0.00000000  1.02265543  0.0000000
  row18  0.00000000  1.2463032 -1.5469048  0.00000000  0.00000000 -0.8537576
  row19  0.00000000  0.0000000 -0.3190423 -1.01218951 -0.01366068 -0.6555146
  row20  0.00000000  0.0000000  0.0000000  0.00000000  0.00000000  0.4472949
               col13      col14      col15      col16       col17      col18
  row1   0.000000000  0.0000000  0.0000000  0.0000000  0.00000000  0.1759703
  row2  -0.260133479  0.0000000  0.4012650 -0.4677728  0.00000000  0.6808499
  row3   0.000000000 -1.7950404 -0.1210640  0.0000000  0.00000000  0.0000000
  row4   0.000000000  0.0000000  0.3479910  0.0000000  0.53031257  0.0000000
  row5   0.962716050  0.5696735 -1.3398690  1.0350367  0.00000000  1.1858596
  row6  -0.184105730 -0.4072493  0.0000000  0.0000000  0.25414920 -0.4072493
  row7   0.000000000  0.0000000  0.9869231  0.0000000  0.04865344  0.5255775
  row8   0.000000000  0.0000000  0.0000000  0.0000000  0.00000000 -0.8137537
  row9   0.000000000  0.6639649  0.0000000  0.2044326  0.35858324  0.1618729
  row10  0.000000000  0.0000000  0.0000000  0.7509961  0.00000000  0.5332726
  row11 -0.036535032  0.0000000  0.2511470  0.0000000  0.00000000 -1.2892980
  row12  0.000000000  0.3130552  0.0000000  0.0000000 -1.17502187  0.7502690
  row13  0.000000000  0.0000000  0.0000000  0.7738695 -1.47742225  0.1808058
  row14 -0.202197025 -0.4253406  0.0000000  0.3478493  0.00000000  0.8509529
  row15  0.000000000  0.0000000  0.6131714  0.3783318  0.00000000  0.0000000
  row16  0.000000000 -0.1602982  0.4274885  0.0000000  0.00000000  0.0000000
  row17  0.000000000 -0.6513210  0.0000000  0.0000000  0.00000000  0.0000000
  row18 -0.006459783  0.0000000  0.0000000  0.2989219  0.00000000  0.0000000
  row19  0.000000000  0.2607762  0.0000000  0.0000000  0.50763624  0.0000000
  row20  0.000000000 -0.2458523  0.0000000 -2.3859184  0.00000000  0.1790309
             col19       col20      col21      col22       col23       col24
  row1  -1.0478051 -0.09229365  0.0000000  0.0000000 -0.01818568  0.28719597
  row2   0.2631147  0.00000000  0.8590981  0.0000000  0.00000000  0.00000000
  row3   0.7439334  0.66169533  0.0000000 -2.2005055  0.00000000  0.19738973
  row4   0.0000000  0.00000000  0.2426305  0.0000000 -1.26144690 -0.00868393
  row5   0.1070499 -0.24125675  0.0000000  0.0000000  0.00000000 -1.33986904
  row6   0.0000000  0.58136211  0.3166696  0.0000000 -0.87725291  0.40368094
  row7   0.0000000  0.00000000  0.0000000  1.0501020  0.00000000  0.00000000
  row8   0.0000000  0.31471153  0.0000000 -0.3784357 -0.81375373  0.00000000
  row9   0.8975797  0.66396489  0.5817268 -0.7763967  0.73995080  0.16187295
  row10  0.0000000  0.00000000  0.0000000  0.0000000  0.00000000  0.61123411
  row11  0.3529297  0.00000000 -0.0853252  0.6566121  0.00000000  0.00000000
  row12  0.0000000  0.00000000  0.0000000  0.2463638  0.00000000  0.66325762
  row13 -2.1705694 -0.03050327  0.9429459  0.6020193  0.74720130  0.00000000
  row14  0.2678066 -0.83080568  0.0000000  0.0000000  0.00000000  0.00000000
  row15  0.0000000  0.00000000  0.0000000  0.4895575  0.00000000  0.65863379
  row16  0.5075312  0.69411716 -1.0765889  0.1761741  0.45488747  0.00000000
  row17  0.0000000  0.00000000  0.8403339  0.0000000  0.98009582  0.00000000
  row18  1.2463032  0.75568027  0.0000000  0.0000000 -1.03607920  0.00000000
  row19  0.0000000  0.75547241  0.0000000  0.0000000  0.00000000  0.29999688
  row20  0.2167713  0.00000000  0.0000000  0.0000000  0.50445333  0.70512403
              col25       col26       col27       col28       col29      col30
  row1   0.92627593  1.14941948  1.21395800 -1.27094864 -2.65724301  0.0000000
  row2  -0.63482693  0.46378536  0.00000000  0.00000000  0.00000000 -0.3936649
  row3   0.00000000  0.95649487 -0.06043938  0.00000000  0.00000000  0.7172652
  row4   0.00000000  0.00000000 -0.85598179 -2.36005919  0.00000000  0.0000000
  row5  -2.03301622  0.73957250 -0.08710607 -1.11672549  0.00000000  0.0000000
  row6   0.00000000 -0.04434379  0.00000000  0.50904145 -0.04434379  0.3755101
  row7   0.00000000  0.00000000  0.82184333 -0.35681166 -2.84171831  1.0703047
  row8   0.00000000  0.00000000  0.00000000  0.00000000  0.15564683  0.7003740
  row9  -1.87500898  0.00000000  0.00000000  0.93840174  0.00000000 -0.2655711
  row10 -0.03312291 -0.51269599  0.00000000  0.00000000 -0.59273869  0.0000000
  row11  0.44530305  0.00000000  0.00000000  0.05443675 -0.77847238  0.0000000
  row12 -1.32917255  0.00000000  0.00000000  0.66325762  0.17490485  0.0000000
  row13  0.00000000  0.98643099 -1.07195714  0.00000000  0.13201566 -0.7842751
  row14  0.00000000  0.00000000  0.00000000  0.00000000  0.00000000  0.1807952
  row15 -0.20358972 -1.76173434 -0.84544361  0.14780816 -0.66312205  0.4895575
  row16  0.69411716  0.00000000  0.00000000  0.00000000  0.00000000 -0.5169731
  row17  0.93564405  0.98009582 -1.74993329  0.48365893 -2.84854558  0.0000000
  row18  0.00000000  1.11568300 -0.85375764  0.00000000 -2.64551711  0.0000000
  row19  0.13294279  0.00000000  0.00000000  0.91310135  0.00000000  0.0000000
  row20  0.00000000 -1.28730614 -0.68117033  0.25313890  0.00000000  0.0000000
              col31       col32       col33      col34      col35       col36
  row1   1.12694663 -2.65724301 -1.96409583  0.6749615  0.0000000  0.00000000
  row2   0.00000000  0.79591920  0.77394029  0.1453316 -3.0327222  0.75146743
  row3   0.00000000  0.84401689  0.00000000  0.1020795  0.0000000  0.00000000
  row4   0.00000000 -0.10876739 -0.85598179  0.0000000  0.7534561 -0.10876739
  row5   0.21827558  0.00000000  0.00000000  0.8573555 -2.7261634 -0.16121405
  row6   0.00000000  0.00000000  0.00000000  0.0000000  0.4310799 -0.08879555
  row7   0.00000000  0.00000000  0.79586785  0.0000000 -2.8417183  0.00000000
  row8   0.34369906 -0.03359517  0.04644754  0.0000000  0.0000000  0.00000000
  row9   0.00000000  0.55273926  0.63729665  0.0000000  0.2452546 -0.67103617
  row10 -0.30505662  0.00000000  0.00000000  0.2181915  0.7290171  0.41886222
  row11  0.00000000  0.25114704  0.41545009  0.0000000  0.0000000  0.00000000
  row12  0.72921558  0.48998589  0.56794744  0.3755755  0.5926400  0.05712181
  row13  0.22732584 -0.15566641  0.00000000  0.0000000  0.0000000  0.00000000
  row14  0.64510084  0.80332484  0.00000000  0.0000000  0.0000000 -2.91024723
  row15  0.03002513  0.00000000  0.00000000  0.0000000 -0.3148154  0.61317141
  row16  0.00000000 -1.76973608  0.00000000  0.0000000  0.3993176  0.06284538
  row17  0.04182618  0.00000000  0.00000000  0.4472913 -0.4506503 -1.74993329
  row18  1.24630319  0.00000000  0.00000000 -0.6996070  0.0000000  0.12707161
  row19  0.00000000  0.87054174  0.00000000  0.5682609 -1.5718053  0.40919617
  row20  0.77108200  0.83295740  0.00000000  0.0000000  0.0000000  0.70512403
             col37       col38       col39      col40       col41      col42
  row1   0.1153457  0.77674420  0.00000000  0.0000000  1.03163645  0.0000000
  row2   0.0000000  0.18615362  0.00000000  0.0000000  0.00000000  0.0000000
  row3  -0.8142112  0.93498867  0.15086971 -0.1210640  0.00000000  0.0000000
  row4   0.0000000 -0.16283461  0.81799464  0.0000000  0.81799464  0.0000000
  row5   0.0000000  0.49271242  0.73957250 -0.3282681  1.10247799  0.0000000
  row6   0.0000000  0.00000000 -0.13531557  0.0000000  0.00000000  0.4577482
  row7   0.0000000  0.00000000  1.05010198  0.1027207  0.29377590  0.7958678
  row8   0.0000000  0.00000000  0.00000000  0.5019231  0.00000000 -1.0144244
  row9   0.0000000  0.00000000  0.00000000  0.2844753 -0.57572599  0.0000000
  row10 -1.6913510  0.00000000  0.83437766  0.3880906  0.00000000 -0.4385880
  row11  0.6325146  0.00000000 -0.68316220  0.0000000 -0.13661849  0.0000000
  row12  0.0000000  0.00000000 -0.12519974  0.2112725 -0.07640958  0.0000000
  row13 -2.1705694  0.00000000  0.71980233  0.1808058  0.00000000  1.0074844
  row14  0.0000000  0.03419175  0.00000000  0.0000000  0.00000000  0.0000000
  row15  0.0000000  0.00000000  0.07084712 -0.3148154  0.21926713  0.4628892
  row16  0.0000000  0.00000000  0.13980642  0.0000000 -0.06498799 -0.1602982
  row17  0.0000000  0.24249687  0.19597686  0.0000000  0.00000000  0.0000000
  row18 -0.6996070  0.78847009  0.00000000  0.0000000  0.90983095 -0.2476218
  row19  0.6794865 -1.34866175  0.33773720  0.0000000  0.00000000 -1.3486617
  row20  0.5844960  0.00000000  0.00000000  0.3866703 -0.51411625  0.0000000
             col43      col44      col45      col46      col47       col48
  row1   0.0000000  0.0000000  0.0000000  0.0000000  0.1153457  0.83926456
  row2  -1.9341099  0.0000000  0.0000000  0.5781957  0.0000000  0.70494742
  row3   0.3644438  0.0000000  0.9564949  0.0000000  0.0000000  0.54033448
  row4   0.0000000 -0.3451562  0.0000000  0.4125295  0.0000000  0.00000000
  row5   0.3183590  0.7078238  1.1656569  0.0000000  0.0000000  0.00000000
  row6   0.0000000  0.0000000  0.0000000  0.0000000  0.0000000  0.00000000
  row7  -0.2026610  0.5255775 -1.4554240  0.2493241 -0.4438230  0.00000000
  row8   0.0000000 -0.6466996  0.5260206  0.0000000  0.0000000  0.54955112
  row9  -2.2804741  0.0000000  0.0000000  0.4275761  0.0000000  0.00000000
  row10  0.0000000  0.0000000  0.0000000  0.5599408 -1.9790331  0.41886222
  row11  0.5565287  0.5024615 -0.4420001  0.3846784  0.0000000  0.00000000
  row12  0.1371645  0.0000000  0.0000000 -0.1764930 -2.4277848 -0.07640958
  row13  0.8739530  0.0000000  0.0000000  0.0000000  0.0000000  0.00000000
  row14  0.0000000  0.0000000  0.0000000  0.0000000  0.0000000  0.00000000
  row15  0.0000000  0.0000000  0.6361609 -0.9508041 -0.2035897  0.40731936
  row16  0.0000000  0.0000000  0.0000000  0.0000000  0.0000000  0.13980642
  row17  0.0000000  0.0000000  0.0000000  0.0000000  0.0000000  0.32950825
  row18 -0.8537576  0.8509904  0.1270716 -0.2476218 -0.1606105  0.00000000
  row19  0.0000000  0.0000000  0.0000000  0.0000000  0.0000000  0.21995417
  row20 -0.8818410  0.0000000  0.0000000  0.4762825  0.0000000  0.00000000
             col49       col50
  row1   0.0000000  0.00000000
  row2   0.0000000  0.00000000
  row3  -0.6964282  0.32522310
  row4   0.0000000  0.00000000
  row5   0.4093308  1.01150621
  row6  -0.3466247  0.00000000
  row7   0.0000000  0.00000000
  row8   0.0000000  0.39926891
  row9   0.6639649  0.58172679
  row10  0.0000000  0.00000000
  row11  0.0000000  0.38467843
  row12  0.4344160  0.00000000
  row13  0.3551592 -0.03050327
  row14  0.3855896  0.77863223
  row15 -0.7501334  0.00000000
  row16 -1.0765889  0.00000000
  row17 -0.6513210  0.00000000
  row18  0.0000000  1.13867252
  row19  0.0000000  0.56826086
  row20  0.0000000  0.00000000
  attr(,"parameters")
  attr(,"parameters")$means
      row1     row2     row3     row4     row5     row6     row7     row8 
  2.657243 3.032722 2.893653 3.053206 2.726163 3.179838 2.841718 3.211649 
      row9    row10    row11    row12    row13    row14    row15    row16 
  2.973621 3.077645 3.081057 3.120932 2.863717 2.910247 3.148029 3.156030 
     row17    row18    row19    row20 
  2.848546 2.645517 2.958100 3.079066 
  
  attr(,"parameters")$margin
  [1] 1
  
  attr(,"decostand")
  [1] "rclr"
  > vegan::decostand(testdata, method = "clr", pseudocount=1)
              col1       col2      col3       col4       col5       col6
  row1   2.3830881 -1.2278298 -1.227830 -1.2278298 -1.2278298  1.9910460
  row2   1.6834622 -1.4945917 -1.494592  2.3972286  1.2134585 -1.4945917
  row3  -1.4864051 -1.4864051 -1.486405 -1.4864051  0.1230328 -1.4864051
  row4  -1.4341146  1.3384741 -1.434115  2.2794575  2.0316213 -1.4341146
  row5   1.9242554  0.1535493 -1.925892  1.2096020  1.6850257 -0.5395979
  row6  -1.4840151 -1.4840151 -1.484015  1.2885737 -1.4840151 -1.4840151
  row7  -1.3604043 -1.3604043 -1.360404  2.4007958  1.5840347 -1.3604043
  row8  -1.2380289  1.7064101 -1.238029 -1.2380289 -1.2380289 -1.2380289
  row9  -1.7059521  1.5129238 -1.705952  1.7597838 -1.7059521 -1.7059521
  row10 -1.3197211  1.7248013  2.486941 -1.3197211 -1.3197211 -1.3197211
  row11 -1.3785440 -1.3785440 -1.378544 -1.3785440  0.9240411  1.2605134
  row12 -1.5919997 -1.5919997 -1.592000  0.1997598  2.1692004 -1.5919997
  row13  0.8681057 -0.3846572  1.892610  1.5963442 -1.7709516  0.1749585
  row14 -1.1409022  2.6877392  2.154935  1.5671480 -1.1409022  2.2263936
  row15 -1.6635566  2.2282637  1.427486 -1.6635566 -1.6635566 -1.6635566
  row16 -1.4758986  1.9898373 -1.475899 -1.4758986 -1.4758986  2.4361244
  row17  2.3993276  1.7574738 -1.238259 -1.2382585 -1.2382585  2.2881020
  row18 -1.3221862 -1.3221862 -1.322186 -1.3221862 -1.3221862 -1.3221862
  row19 -1.3910834  1.7444109  1.553356  1.3169668 -1.3910834 -1.3910834
  row20 -1.3207818 -1.3207818 -1.320782  1.1641248  1.6749505  2.5293658
               col7       col8        col9      col10      col11      col12
  row1  -1.22782984 -1.2278298 -1.22782984 -1.2278298 -1.2278298  1.3371195
  row2   0.58484988 -1.4945917  2.00191590 -1.4945917 -1.4945917  1.8012452
  row3  -1.48640509  1.2861836  2.17715655 -1.4864051  1.0785443  1.1526522
  row4   1.65692788  1.9670828 -1.43411457  2.2034716 -1.4341146  2.2547649
  row5   0.55901443 -1.9258922 -0.53959786 -1.9258922  0.3766929  1.1651502
  row6   2.34462635  2.0995039  0.46189510  1.6514792  1.8832808 -1.4840151
  row7   0.02589005 -1.3604043 -1.36040431 -1.3604043 -1.3604043  2.1361033
  row8  -1.23802885 -1.2380289 -1.23802885  2.6537914  2.6331722  1.2468778
  row9  -1.70595207  0.3734895 -1.70595207 -1.7059521  0.2399581  0.5966330
  row10 -1.31972111 -1.3197211  2.53042650 -1.3197211 -1.3197211  0.6261890
  row11 -1.37854397 -1.3785440 -1.37854397  1.7124985 -1.3785440 -1.3785440
  row12 -1.59199971 -1.5919997  1.45252273 -1.5919997 -1.5919997 -1.5919997
  row13 -1.77095160  0.9370986  2.07919600  2.0357109 -1.7709516  1.5248853
  row14 -1.14090219 -1.1409022 -1.14090219 -1.1409022  2.2930850  0.2453922
  row15 -1.66355657 -1.6635566 -1.66355657  1.7037393  1.5144973 -1.6635566
  row16  1.92529879  0.9219967  1.89139724  2.2853015 -1.4758986 -1.4758986
  row17  1.75747376 -1.2382585 -1.23825852 -1.2382585  2.6535618 -1.2382585
  row18 -1.32218620  2.5898368  0.06410816 -1.3221862 -1.3221862  0.6237239
  row19 -1.39108335 -1.3910834  1.31696685  0.6883582  1.6046489  1.0068119
  row20 -1.32078181 -1.3207818 -1.32078181 -1.3207818 -1.3207818  2.2345663
            col13      col14      col15      col16      col17      col18
  row1  -1.227830 -1.2278298 -1.2278298 -1.2278298 -1.2278298  1.6625419
  row2   1.338622 -1.4945917  1.9711442  1.1444657 -1.4945917  2.2430780
  row3  -1.486405 -0.1001107  1.3468083 -1.4864051 -1.4864051 -1.4864051
  row4  -1.434115 -1.4341146  1.9998726 -1.4341146  2.1768033 -1.4341146
  row5   1.787680  1.4063123 -0.3164543  1.8582974 -1.9258922  2.0059334
  row6   1.560507  1.3491983 -1.4840151 -1.4840151  1.9817209  1.3491983
  row7  -1.360404 -1.3604043  2.4897433 -1.3604043  1.5840347  2.0407931
  row8  -1.238029 -1.2380289 -1.2380289 -1.2380289 -1.2380289  1.2468778
  row9  -1.705952  1.9576096 -1.7059521  1.5129238  1.6613438  1.4721018
  row10 -1.319721 -1.3197211 -1.3197211  2.5304265 -1.3197211  2.3178651
  row11  1.712498 -1.3785440  1.9887519 -1.3785440 -1.3785440  0.5673662
  row12 -1.592000  1.8737362 -1.5919997 -1.5919997  0.4874418  2.2998206
  row13 -1.770952 -1.7709516 -1.7709516  1.8926100 -0.1615137  1.3200909
  row14  1.631687  1.4240472 -1.1409022  2.1549347 -1.1409022  2.6432874
  row15 -1.663557 -1.6635566  2.1206331  1.8917915 -1.6635566 -1.6635566
  row16 -1.475899  1.5686238  2.1350193 -1.4758986 -1.4758986 -1.4758986
  row17 -1.238259  1.0643266 -1.2382585 -1.2382585 -1.2382585 -1.2382585
  row18  1.385864 -1.3221862 -1.3221862  1.6735461 -1.3221862 -1.3221862
  row19 -1.391083  1.8670132 -1.3910834 -1.3910834  2.1054242 -1.3910834
  row20 -1.320782  1.5695899 -1.3207818 -0.2221695 -1.3207818  1.9750551
             col19      col20     col21      col22      col23      col24
  row1   0.5639296  1.4112275 -1.227830 -1.2278298  1.4802204  1.7679024
  row2   1.8376128 -1.4945917  2.417431 -1.4945917 -1.4945917 -1.4945917
  row3   2.1771566  2.0971138 -1.486405 -0.3877928 -1.4864051  1.6490891
  row4  -1.4341146 -1.4341146  1.898090 -1.4341146  0.5117956  1.6569279
  row5   0.9644795  0.6390571 -1.925892 -1.9258922 -1.9258922 -0.3164543
  row6  -1.4840151  2.3001746  2.042345 -1.4840151  0.9138802  2.1269029
  row7  -1.3604043 -1.3604043 -1.360404  2.5516187 -1.3604043 -1.3604043
  row8  -1.2380289  2.3173192 -1.238029  1.6523429  1.2468778 -1.2380289
  row9   2.1858682  1.9576096  1.877567  0.5966330  2.0317176  1.4721018
  row10 -1.3197211 -1.3197211 -1.319721 -1.3197211 -1.3197211  2.3938510
  row11  2.0871919 -1.3785440  1.665978  2.3826561 -1.3785440 -1.3785440
  row12 -1.5919997 -1.5919997 -1.592000  1.8091977 -1.5919997  2.2146628
  row13 -0.6723393  1.1194202  2.057690  1.7255560  1.8666346 -1.7709516
  row14  2.0779736  1.0563224 -1.140902 -1.1409022 -1.1409022 -1.1409022
  row15 -1.6635566 -1.6635566 -1.663557  2.0000051 -1.6635566  2.1650848
  row16  2.2129809  2.3953024  0.721326  1.8913972  2.1616876 -1.4758986
  row17 -1.2382585 -1.2382585  2.475314 -1.2382585  2.6118891 -1.2382585
  row18  2.5898368  2.1118010 -1.322186 -1.3221862  0.4695733 -1.3221862
  row19 -1.3910834  2.3465863 -1.391083 -1.3910834 -1.3910834  1.9047535
  row20  2.0114227 -1.3207818 -1.320782 -1.3207818  2.2901361  2.4858807
             col25       col26      col27      col28      col29     col30
  row1   2.3830881  2.60081156  2.6639905  0.3816081 -0.5346827 -1.227830
  row2   0.9903150  2.03176886 -1.4945917 -1.4945917 -1.4945917  1.213459
  row3  -1.4864051  2.38479592  1.4039667 -1.4864051 -1.4864051  2.151181
  row4  -1.4341146 -1.43411457  0.8684705 -0.3355023 -1.4341146 -1.434115
  row5  -0.8272799  1.57061534  0.7821580 -0.1341327 -1.9258922 -1.925892
  row6  -1.4840151  1.69403878 -1.4840151  2.2295570  1.6940388  2.099504
  row7  -1.3604043 -1.36040431  2.3284751  1.2045450 -0.6672571  2.571421
  row8  -1.2380289 -1.23802885 -1.2380289 -1.2380289  2.1631685  2.693797
  row9  -0.3196577 -1.70595207 -1.7059521  2.2258736 -1.7059521  1.066637
  row10  1.7713213  1.31933622 -1.3197211 -1.3197211  1.2452283 -1.319721
  row11  2.1768041 -1.37854397 -1.3785440  1.7995099  1.0193513 -1.378544
  row12  0.3539104 -1.59199971 -1.5919997  2.2146628  1.7402048 -1.592000
  row13 -1.7709516  2.10024941  0.1749585 -1.7709516  1.2735708  0.426273
  row14 -1.1409022 -1.14090219 -1.1409022 -1.1409022 -1.1409022  1.994592
  row15  1.3321757 -0.05411866  0.7343387  1.6686479  0.9013928  2.000005
  row16  2.3953024 -1.47589859 -1.4758986 -1.4758986 -1.4758986  1.232152
  row17  2.5684040  2.61188908  0.1480358  2.1290373 -0.5451113 -1.238259
  row18 -1.3221862  2.46200343  0.6237239 -1.3221862 -0.6290390 -1.322186
  row19  1.7444109 -1.39108335 -1.3910834  2.5007369 -1.3910834 -1.391083
  row20 -1.3207818  0.62512834  1.1641248  2.0465140 -1.3207818 -1.320782
            col31      col32      col33      col34      col35      col36
  row1   2.578833 -0.5346827 -0.1292175  2.1394660 -1.2278298 -1.2278298
  row2  -1.494592  2.3555559  2.3340497  1.7242842 -0.8014445  2.3120708
  row3  -1.486405  2.2747950 -1.4864051  1.5581173 -1.4864051 -1.4864051
  row4  -1.434115  1.5616177  0.8684705 -1.4341146  2.3945268  1.5616177
  row5   1.069840 -1.9258922 -1.9258922  1.6850257 -1.2327450  0.7131651
  row6  -1.484015 -1.4840151 -1.4840151 -1.4840151  2.1535711  1.6514792
  row7  -1.360404 -1.3604043  2.3031573 -1.3604043 -0.6672571 -1.3604043
  row8   2.345490  1.9808470  2.0578080 -1.2380289 -1.2380289 -1.2380289
  row9  -1.705952  1.8493960  1.9316341 -1.7059521  1.5521445  0.6919432
  row10  1.513492 -1.3197211 -1.3197211  2.0124834  2.5089203  2.2066394
  row11 -1.378544  1.9887519  2.1478166 -1.3785440 -1.3785440 -1.3785440
  row12  2.279201  2.0455864  2.1215724  1.9343608  2.1456699  1.6268761
  row13  1.364543  1.0016371 -1.7709516 -1.7709516 -1.7709516 -1.7709516
  row14  2.442617  2.5967674 -1.1409022 -1.1409022 -1.1409022 -0.4477550
  row15  1.555319 -1.6635566 -1.6635566 -1.6635566  1.2268152  2.1206331
  row16 -1.475899  0.1335393 -1.4758986 -1.4758986  2.1076203  1.7821979
  row17  1.706180 -1.2382585 -1.2382585  2.0939460  1.2466481  0.1480358
  row18  2.589837 -1.3221862 -1.3221862  0.7572553 -1.3221862  1.5110271
  row19 -1.391083  2.4590642 -1.3910834  2.1642647  0.2183546  2.0101140
  row20  2.550419  2.6110438 -1.3207818 -1.3207818 -1.3207818  2.4858807
             col37      col38     col39      col40      col41      col42
  row1   1.6053835  2.2379061 -1.227830 -1.2278298  2.4857422 -1.2278298
  row2  -1.4945917  1.7635049 -1.494592 -1.4945917 -1.4945917 -1.4945917
  row3   0.7108195  2.3637425  1.604637  1.3468083 -1.4864051 -1.4864051
  row4  -1.4341146  1.5103244  2.457706 -1.4341146  2.4577057 -1.4341146
  row5  -1.9258922  1.3322043  1.570615  0.5590144  1.9242554 -1.9258922
  row6  -1.4840151 -1.4840151  1.607027 -1.4840151 -1.4840151  2.1795466
  row7  -1.3604043 -1.3604043  2.551619  1.6353280  1.8176495  2.3031573
  row8  -1.2380289 -1.2380289 -1.238029  2.4996408 -1.2380289  1.0645562
  row9  -1.7059521 -1.7059521 -1.705952  1.5898848  0.7789546 -1.7059521
  row10  0.2897168 -1.3197211  2.612105  2.1767865 -1.3197211  1.3883291
  row11  2.3591256 -1.3785440  1.106363 -1.3785440  1.6171883 -1.3785440
  row12 -1.5919997 -1.5919997  1.452523  1.7752961  1.4990427 -1.5919997
  row13 -0.6723393 -1.7709516  1.839966  1.3200909 -1.7709516  2.1208687
  row14 -1.1409022  1.8548301 -1.140902 -1.1409022 -1.1409022 -1.1409022
  row15 -1.6635566 -1.6635566  1.594540  1.2268152  1.7376408  1.9740296
  row16 -1.4758986 -1.4758986  1.856306 -1.4758986  1.6595956  1.5686238
  row17 -1.2382585  1.8972357  1.852784 -1.2382585 -1.2382585 -1.2382585
  row18  0.7572553  2.1435497 -1.322186 -1.3221862  2.2613327  1.1627204
  row19  2.2724783  0.4006761  1.941121 -1.3910834 -1.3910834  0.4006761
  row20  2.3680976 -1.3207818 -1.320782  2.1757258  1.3182755 -1.3207818
             col43     col44      col45      col46       col47     col48
  row1  -1.2278298 -1.227830 -1.2278298 -1.2278298  1.60538351  2.298531
  row2  -0.1082973 -1.494592 -1.4945917  2.1429945 -1.49459166  2.266608
  row3   1.8094318 -1.486405  2.3847959 -1.4864051 -1.48640509  1.979331
  row4  -1.4341146  1.338474 -1.4341146  2.0623930 -1.43411457 -1.434115
  row5   1.1651502  1.539844  1.9861308 -1.9258922 -1.92589222 -1.925892
  row6  -1.4840151 -1.484015 -1.4840151 -1.4840151 -1.48401505 -1.484015
  row7   1.3476459  2.040793  0.2490336  1.7750899  1.12450234 -1.360404
  row8  -1.2380289  1.401028  2.5231713 -1.2380289 -1.23802885  2.546161
  row9  -0.6073398 -1.705952 -1.7059521  1.7280351 -1.70595207 -1.705952
  row10 -1.3197211 -1.319721 -1.3197211  2.3438405  0.06657326  2.206639
  row11  2.2850177  2.232374  1.3295062  2.1179636 -1.37854397 -1.378544
  row12  1.7038372 -1.592000 -1.5919997  1.4037326 -0.49338742  1.499043
  row13  1.9902485 -1.770952 -1.7709516 -1.7709516 -1.77095160 -1.770952
  row14 -1.1409022 -1.140902 -1.1409022 -1.1409022 -1.14090219 -1.140902
  row15 -1.6635566 -1.663557  2.1431059  0.6390285  1.33217570  1.919962
  row16 -1.4758986 -1.475899 -1.4758986 -1.4758986 -1.47589859  1.856306
  row17 -1.2382585 -1.238259 -1.2382585 -1.2382585 -1.23825852  1.980617
  row18  0.6237239  2.204174  1.5110271  1.1627204  1.24276316 -1.322186
  row19 -1.3910834 -1.391083 -1.3910834 -1.3910834 -1.39108335  1.827792
  row20  0.9818033 -1.320782 -1.3207818  2.2627371 -1.32078181 -1.320782
             col49     col50
  row1  -1.2278298 -1.227830
  row2  -1.4945917 -1.494592
  row3   0.8161800  1.771691
  row4  -1.4341146 -1.434115
  row5   1.2521616  1.835308
  row6   1.4063567 -1.484015
  row7  -1.3604043 -1.360404
  row8  -1.2380289  2.399557
  row9   1.9576096  1.877567
  row10 -1.3197211 -1.319721
  row11 -1.3785440  2.117964
  row12  1.9915192 -1.592000
  row13  1.4871449  1.119420
  row14  2.1913023  2.572670
  row15  0.8213501 -1.663557
  row16  0.7213260 -1.475899
  row17  1.0643266 -1.238259
  row18 -1.3221862  2.484476
  row19 -1.3910834  2.164265
  row20 -1.3207818 -1.320782
  attr(,"parameters")
  attr(,"parameters")$means
      row1     row2     row3     row4     row5     row6     row7     row8 
  1.227830 1.494592 1.486405 1.434115 1.925892 1.484015 1.360404 1.238029 
      row9    row10    row11    row12    row13    row14    row15    row16 
  1.705952 1.319721 1.378544 1.592000 1.770952 1.140902 1.663557 1.475899 
     row17    row18    row19    row20 
  1.238259 1.322186 1.391083 1.320782 
  
  attr(,"parameters")$pseudocount
  [1] 1
  
  attr(,"parameters")$margin
  [1] 1
  
  attr(,"decostand")
  [1] "clr"
  > # Expect error
  > class(try(vegan::decostand(testdata, method = "clr")))=="try-error"
  Error : 'clr' cannot be used with non-positive data: use pseudocount > 0
  [1] TRUE
  > class(try(vegan::decostand(testdata, method = "clr", pseudocount=0)))=="try-error"
  Error : 'clr' cannot be used with non-positive data: use pseudocount > 0
  [1] TRUE
  > 
  > # Tests that clr robust gives values that are approximately same if only 
  > # one value per sample are changed to zero
  > # Adds pseudocount
  > test <- testdata+1 
  > test2 <- test; test2[,1] <- 0
  > 
  > # clr robust transformations
  > test <- vegan::decostand(test, method = "rclr")
  > test2 <- vegan::decostand(test2, method = "rclr")
  > 
  > # Removes first cols
  > test <- test[, -1]
  > test2 <- test2[, -1]
  > 
  > # Expect high correlation
  > cor(unlist(test), unlist(test2)) > 0.99
         col2  col3  col4  col5  col6  col7  col8  col9 col10 col11 col12 col13
  col2   TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col3  FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col4  FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col5  FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col6  FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col7  FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE
  col8  FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE
  col9  FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE
  col10 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE
  col11 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE
  col12 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE
  col13 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE
  col14 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col15 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col16 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col17 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col18 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col19 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col20 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col21 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col22 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col23 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col24 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col25 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col26 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col27 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col28 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col29 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col30 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col31 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col32 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col33 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col34 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col35 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col36 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col37 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col38 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col39 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col40 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col41 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col42 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col43 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col44 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col45 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col46 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col47 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col48 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col49 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col50 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
        col14 col15 col16 col17 col18 col19 col20 col21 col22 col23 col24 col25
  col2  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col3  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col4  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col5  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col6  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col7  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col8  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col9  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col10 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col11 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col12 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col13 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col14  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col15 FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col16 FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col17 FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col18 FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col19 FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE
  col20 FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE
  col21 FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE
  col22 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE
  col23 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE
  col24 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE
  col25 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE
  col26 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col27 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col28 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col29 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col30 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col31 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col32 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col33 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col34 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col35 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col36 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col37 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col38 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col39 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col40 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col41 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col42 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col43 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col44 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col45 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col46 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col47 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col48 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col49 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col50 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
        col26 col27 col28 col29 col30 col31 col32 col33 col34 col35 col36 col37
  col2  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col3  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col4  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col5  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col6  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col7  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col8  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col9  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col10 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col11 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col12 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col13 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col14 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col15 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col16 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col17 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col18 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col19 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col20 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col21 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col22 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col23 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col24 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col25 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col26  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col27 FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col28 FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col29 FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col30 FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col31 FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE
  col32 FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE
  col33 FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE
  col34 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE
  col35 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE
  col36 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE
  col37 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE
  col38 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col39 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col40 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col41 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col42 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col43 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col44 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col45 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col46 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col47 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col48 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col49 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col50 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
        col38 col39 col40 col41 col42 col43 col44 col45 col46 col47 col48 col49
  col2  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col3  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col4  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col5  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col6  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col7  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col8  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col9  FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col10 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col11 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col12 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col13 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col14 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col15 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col16 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col17 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col18 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col19 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col20 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col21 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col22 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col23 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col24 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col25 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col26 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col27 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col28 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col29 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col30 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col31 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col32 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col33 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col34 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col35 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col36 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col37 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col38  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col39 FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col40 FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col41 FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col42 FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
  col43 FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE FALSE
  col44 FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE FALSE
  col45 FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE FALSE
  col46 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE FALSE
  col47 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE FALSE
  col48 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE FALSE
  col49 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE  TRUE
  col50 FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE FALSE
        col50
  col2  FALSE
  col3  FALSE
  col4  FALSE
  col5  FALSE
  col6  FALSE
  col7  FALSE
  col8  FALSE
  col9  FALSE
  col10 FALSE
  col11 FALSE
  col12 FALSE
  col13 FALSE
  col14 FALSE
  col15 FALSE
  col16 FALSE
  col17 FALSE
  col18 FALSE
  col19 FALSE
  col20 FALSE
  col21 FALSE
  col22 FALSE
  col23 FALSE
  col24 FALSE
  col25 FALSE
  col26 FALSE
  col27 FALSE
  col28 FALSE
  col29 FALSE
  col30 FALSE
  col31 FALSE
  col32 FALSE
  col33 FALSE
  col34 FALSE
  col35 FALSE
  col36 FALSE
  col37 FALSE
  col38 FALSE
  col39 FALSE
  col40 FALSE
  col41 FALSE
  col42 FALSE
  col43 FALSE
  col44 FALSE
  col45 FALSE
  col46 FALSE
  col47 FALSE
  col48 FALSE
  col49 FALSE
  col50  TRUE
  > 
  > ############################# NAMES ####################################
  > 
  > # Tests that dimensins have correct names
  > all(rownames(vegan::decostand(testdata+1, method = "clr")) == rownames(testdata))
  [1] TRUE
  > all(colnames(vegan::decostand(testdata, method = "clr", pseudocount=1)) == colnames(testdata))
  [1] TRUE
  > all(rownames(vegan::decostand(testdata, method = "rclr")) == rownames(testdata))
  [1] TRUE
  > all(colnames(vegan::decostand(testdata, method = "rclr")) == colnames(testdata))
  [1] TRUE
  > 
  > ########################################################################
  > 
  > # Count vs. Relative data
  > 
  > # CLR is identical with count and relative data
  > a1 <- vegan::decostand(testdata.with.pseudo, method = "clr")
  > a2 <- vegan::decostand(relative.with.pseudo, method = "clr")
  > max(abs(a1-a2)) < 1e-6 # Tolerance
  [1] TRUE
  > 
  > # rCLR is identical with count and relative data
  > a1 <- vegan::decostand(testdata.with.pseudo, method = "rclr")
  > a2 <- vegan::decostand(relative.with.pseudo, method = "rclr")
  > max(abs(a1-a2)) < 1e-6 # Tolerance
  [1] TRUE
  > 
  > # ALR is identical with count and relative data
  > a1 <- vegan::decostand(testdata.with.pseudo, method = "alr")
  > a2 <- vegan::decostand(relative.with.pseudo, method = "alr")
  > max(abs(a1-a2)) < 1e-6 # Tolerance
  [1] FALSE
  > 
  > ####### # ALR transformation drops one feature ################
  > ncol(vegan::decostand(testdata.with.pseudo, "alr")) == ncol(testdata.with.pseudo)-1
  [1] FALSE
  > 
  > 
  > 
  > 
  > 
  > 
  > 
  > proc.time()
     user  system elapsed 
     1.23    0.17    1.39 
Running the tests in 'tests/vegan-tests.R' failed.
Complete output:
  > ### 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.09 .
  Residual  5   0.80011                
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(m, by="term", permutations=99) # failed before 2.5-0
  Permutation test for cca under reduced model
  Terms added sequentially (first to last)
  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)  
  Management   3   0.82392 1.7163   0.02 *
  poly(A1, 2)  2   0.35127 1.0976   0.39  
  spno         1   0.08318 0.5198   0.95  
  Residual     5   0.80011                
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(m, by="margin", permutations=99) # works since 2.5-0
  Permutation test for cca under reduced model
  Marginal effects of terms
  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)
  Management   3   0.55418 1.1544   0.25
  poly(A1, 2)  2   0.32940 1.0292   0.30
  spno         1   0.08318 0.5198   0.93
  Residual     5   0.80011              
  > anova(m, by="axis", permutations=99)
  Permutation test for cca under reduced model
  Forward 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 = Use != "Pasture" & spno > 7)
           Df ChiSquare      F Pr(>F)  
  CCA1      1   0.46993 2.9366   0.09 .
  CCA2      1   0.26217 1.6384   0.80  
  CCA3      1   0.19308 1.2066   0.89  
  CCA4      1   0.18345 1.1464   0.84  
  CCA5      1   0.08871 0.5544   0.99  
  CCA6      1   0.06104 0.3815   0.90  
  Residual  5   0.80011                
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > ## adonis
  > adonis2(fla, data = dune.env)
  Permutation test for adonis under reduced model
  Terms added sequentially (first to last)
  Permutation: free
  Number of permutations: 999
  
  adonis2(formula = fla, data = dune.env)
              Df SumOfSqs      R2      F Pr(>F)   
  Management   3   1.4686 0.34161 3.0480  0.003 **
  poly(A1, 2)  2   0.5829 0.13559 1.8146  0.057 . 
  spno         1   0.1596 0.03713 0.9940  0.420   
  Residual    13   2.0879 0.48567                 
  Total       19   4.2990 1.00000                 
  ---
  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
  > anova(p, by="term", permutations=99) # failed before 2.5-0
  Permutation test for capscale under reduced model
  Terms added sequentially (first to last)
  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)   
  Management   3   46.265 2.5566   0.01 **
  poly(A1, 2)  2   10.150 0.8413   0.66   
  spno         1    3.167 0.5250   0.90   
  Residual     5   30.160                 
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(p, by="margin", permutations=99) # works since 2.5-0
  Permutation test for capscale under reduced model
  Marginal effects of terms
  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)  
  Management   3  28.7515 1.5888   0.06 .
  poly(A1, 2)  2   8.0847 0.6701   0.85  
  spno         1   3.1669 0.5250   0.88  
  Residual     5  30.1605                
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(p, by="axis", permutations=99)
  Permutation test for capscale under reduced model
  Forward 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 = Use != "Pasture" & spno > 7)
           Df Variance      F Pr(>F)  
  CAP1      1  25.0252 4.1487   0.03 *
  CAP2      1  15.8759 2.6319   0.37  
  CAP3      1   8.0942 1.3419   0.86  
  CAP4      1   5.0675 0.8401   0.95  
  CAP5      1   3.5671 0.5914   0.96  
  CAP6      1   1.9520 0.3236   0.92  
  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.54840 1.6423   0.11
  Residual  5  0.78568              
  > anova(p, by="term", permutations=99) # failed before 2.5-0
  Permutation test for capscale under reduced model
  Terms added sequentially (first to last)
  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)  
  Management   3  1.17117 2.4844   0.04 *
  poly(A1, 2)  2  0.30602 0.9737   0.52  
  spno         1  0.07121 0.4532   0.86  
  Residual     5  0.78568                
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(p, by="margin", permutations=99) # works since 2.5-0
  Permutation test for capscale under reduced model
  Marginal effects of terms
  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)
  Management   3  0.64888 1.3765   0.25
  poly(A1, 2)  2  0.26160 0.8324   0.67
  spno         1  0.07121 0.4532   0.81
  Residual     5  0.78568              
  > anova(p, by="axis", permutations=99)
  Permutation test for capscale under reduced model
  Forward 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 = Use != "Pasture" & spno > 7)
           Df SumOfSqs      F Pr(>F)  
  CAP1      1  0.77834 4.9533   0.08 .
  CAP2      1  0.45691 2.9078   0.48  
  CAP3      1  0.14701 0.9355   0.99  
  CAP4      1  0.11879 0.7560   0.98  
  CAP5      1  0.04213 0.2681   1.00  
  CAP6      1  0.00522 0.0332   1.00  
  Residual  5  0.78568                
  ---
  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.09 .
  Residual  5   0.80011                
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > ## commented tests below fail in vegan 2.1-40 because number of
  > ## observations changes
  > anova(q, by="term", permutations=99) # failed before 2.5-0
  Permutation test for cca under reduced model
  Terms added sequentially (first to last)
  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)  
  Management   3   0.82392 1.7163   0.04 *
  poly(A1, 2)  2   0.35127 1.0976   0.36  
  spno         1   0.08318 0.5198   0.95  
  Residual     5   0.80011                
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > anova(q, by="margin", permutations=99) # works since 2.5-0
  Permutation test for cca under reduced model
  Marginal effects of terms
  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)
  Management   3   0.55418 1.1544   0.30
  poly(A1, 2)  2   0.32940 1.0292   0.45
  spno         1   0.08318 0.5198   0.96
  Residual     5   0.80011              
  > anova(q, by="axis", permutations=99)
  Permutation test for cca under reduced model
  Forward tests for axes
  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)
  CCA1      1   0.46993 2.9366   0.11
  CCA2      1   0.26217 1.6384   0.79
  CCA3      1   0.19308 1.2066   0.92
  CCA4      1   0.18345 1.1464   0.83
  CCA5      1   0.08871 0.5544   0.96
  CCA6      1   0.06104 0.3815   0.88
  Residual  5   0.80011              
  > ### 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 scaled Chi-square 
  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 
  Species scores projected from 'Y' 
  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 Rank
  Total          3.7652     1.0000     
  Constrained    1.4456     0.3840    3
  Unconstrained  2.5037     0.6650   13
  Imaginary     -0.1841    -0.0489    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 
  Species scores projected from 'Y' 
  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 
  
  > ## adonis must be done with detached 'df' or it will be used instead
  > ## of with(dune.env, ...)
  > detach(df)
  > with(dune.env, foo("adonis2", dune, Management))
  Permutation test for adonis under reduced model
  Terms added sequentially (first to last)
  Permutation: free
  Number of permutations: 999
  
  bar(formula = Y ~ X)
           Df SumOfSqs      R2      F Pr(>F)   
  X         3   1.4686 0.34161 2.7672  0.006 **
  Residual 16   2.8304 0.65839                 
  Total    19   4.2990 1.00000                 
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > ## the test case reported in github issue #285 by @ktmbiome
  > var <- "Moisture"
  > adonis2(dune ~ dune.env[, var])
  Permutation test for adonis under reduced model
  Terms added sequentially (first to last)
  Permutation: free
  Number of permutations: 999
  
  adonis2(formula = dune ~ dune.env[, var])
                  Df SumOfSqs      R2      F Pr(>F)    
  dune.env[, var]  3   1.7282 0.40199 3.5851  0.001 ***
  Residual        16   2.5709 0.59801                  
  Total           19   4.2990 1.00000                  
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > rm(var)
  > ###
  > 
  > ### 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 scaled Chi-square 
  
  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
  Forward tests for axes
  Permutation: free
  Number of permutations: 99
  
  Model: cca(formula = dune ~ A1 + Moisture + Condition(Management), data = dune.env, subset = A1 > 3)
           Df ChiSquare      F Pr(>F)
  CCA1      1   0.27109 2.9561   0.10
  CCA2      1   0.14057 1.5329   0.56
  CCA3      1   0.08761 0.9553   0.82
  CCA4      1   0.05624 0.6132   0.81
  Residual 10   0.91705              
  > 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
  Forward 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.779
  CAP2      1   0.0685 0.3339  0.997
  CAP3      1   0.0455 0.2217  0.964
  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.696
  B         2   0.2506 0.6108  0.821
  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
  Forward 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.785
  CAP2      1   0.0685 0.3388  0.995
  CAP3      1   0.0455 0.2249  0.961
  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.665
  B         2   0.2506 0.6198  0.834
  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
  Forward 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.770
  RDA2      1   0.0685 0.3339  0.993
  RDA3      1   0.0455 0.2217  0.962
  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.656
  B         2   0.2506 0.6108  0.825
  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
  Forward 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.765
  RDA2      1   0.0685 0.3388  0.996
  RDA3      1   0.0455 0.2249  0.969
  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.690
  B         2   0.2506 0.6198  0.823
  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.012 * 
  Moisture    3   0.51898 1.9783  0.005 **
  Management  3   0.39543 1.5074  0.055 . 
  Use         2   0.10910 0.6238  0.927   
  Manure      3   0.25490 0.9717  0.518   
  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.009 **
  Moisture    3  21.6497 2.4150  0.004 **
  Management  3  19.1153 2.1323  0.007 **
  Use         2   4.7007 0.7865  0.724   
  Manure      3   9.6257 1.0737  0.360   
  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.011 *
  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
  > 
  > ### github issue #291 reported that anova(mod, by="margin") gave wrong
  > ### results in vegan 2.5-2 when 'mod' had only one constraining
  > ### variable. In such corner case, all the following models should be
  > ### equal
  > 
  > set.seed(1046)
  > z <- runif(20)
  > p <- shuffleSet(20, 99)
  > mod <- rda(dune ~ z)
  > (a0 <- anova(mod, permutations=p))
  Permutation test for rda under reduced model
  Permutation: free
  Number of permutations: 99
  
  Model: rda(formula = dune ~ z)
           Df Variance      F Pr(>F)  
  Model     1    7.376 1.7298   0.08 .
  Residual 18   76.748                
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > (at <- anova(mod, permutations=p, by="term"))
  Permutation test for rda under reduced model
  Terms added sequentially (first to last)
  Permutation: free
  Number of permutations: 99
  
  Model: rda(formula = dune ~ z)
           Df Variance      F Pr(>F)  
  z         1    7.376 1.7298   0.08 .
  Residual 18   76.748                
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > (am <- anova(mod, permutations=p, by="margin"))
  Permutation test for rda under reduced model
  Marginal effects of terms
  Permutation: free
  Number of permutations: 99
  
  Model: rda(formula = dune ~ z)
           Df Variance      F Pr(>F)  
  z         1    7.376 1.7298   0.08 .
  Residual 18   76.748                
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > (aa <- anova(mod, permutations=p, by="axis"))
  Permutation test for rda under reduced model
  Forward tests for axes
  Permutation: free
  Number of permutations: 99
  
  Model: rda(formula = dune ~ z)
           Df Variance      F Pr(>F)  
  RDA1      1    7.376 1.7298   0.08 .
  Residual 18   76.748                
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > (p1 <- permutest(mod, permutations=p, by="onedf"))
  
  Permutation test for rda under reduced model 
  
  Permutation: free
  Number of permutations: 99
   
  Model: rda(formula = dune ~ z)
  Permutation test for all constrained eigenvalues
           Df Inertia      F Pr(>F)  
  z         1   7.376 1.7298   0.08 .
  Residual 18  76.748                
  ---
  Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1
  > all.equal(permustats(a0)$permutations, permustats(at)$permutations)
  [1] TRUE
  > all.equal(permustats(a0)$permutations, permustats(am)$permutations)
  [1] TRUE
  > all.equal(permustats(a0)$permutations, permustats(aa)$permutations)
  [1] TRUE
  > all.equal(permustats(a0)$permutations, permustats(p1)$permutations)
  [1] TRUE
  > rm(z,p,mod,a0,at,am,aa,p1)
  > 
  > ### 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, trace = 0)
  > 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.9389 
  Correlation in a symmetric Procrustes rotation: 0.2471 
  Significance:  0.46 
  
  Permutation: free
  Number of permutations: 99
  
  > pro$t
   [1] 0.2142734 0.2317691 0.2325867 0.2318738 0.2297942 0.2547687 0.2150992
   [8] 0.2856655 0.2323035 0.2430091 0.2607687 0.2653226 0.2127120 0.2482851
  [15] 0.3044707 0.2797892 0.2644764 0.2560291 0.2916665 0.2330199 0.2434141
  [22] 0.2891063 0.2871878 0.2609612 0.2158827 0.2297220 0.2417230 0.2244848
  [29] 0.2177450 0.2528551 0.2616422 0.2584395 0.2412174 0.2244347 0.2264776
  [36] 0.2244727 0.1973865 0.2837535 0.2634514 0.2823068 0.2699507 0.2750179
  [43] 0.2628074 0.2458801 0.2635264 0.2801017 0.2296173 0.1947667 0.2929171
  [50] 0.2422339 0.1831137 0.2688563 0.2555202 0.2043385 0.2287129 0.2366098
  [57] 0.2141830 0.1858646 0.2616734 0.1974915 0.3197986 0.2245312 0.2712518
  [64] 0.2171044 0.2241602 0.2100868 0.2183290 0.2143512 0.2642714 0.2572791
  [71] 0.2806032 0.2401609 0.2063171 0.2016924 0.2684739 0.2484569 0.2200211
  [78] 0.2487178 0.1925942 0.2957915 0.2991842 0.2359773 0.2440686 0.2504427
  [85] 0.2919524 0.2324999 0.2086198 0.2298386 0.2727169 0.3253668 0.2292110
  [92] 0.2193247 0.3517265 0.2777563 0.3713275 0.2330743 0.1986322 0.2027622
  [99] 0.2281227
  > 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), trace=0)
  > mod
  
  Call:
  metaMDS(comm = subset(varespec, select = colSums(varespec) >      0, subset = rowSums(varespec) > 0), trace = 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
  Best solution was not repeated after 20 tries
  The best solution was from try 17 (random start)
  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 
  (Showing 8 of 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 
  (Showing 8 of 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 
  Species scores projected from 'varespec' 
  
  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 
  (Showing 8 of 20 unconstrained eigenvalues)
  
  > ## the following two should be zero (within 1e-15)
  > p <- shuffleSet(nrow(varespec), 999)
  > all(abs(permustats(anova(mr, permutations=p))$permutations -
  +         permustats(anova(md, permutations=p))$permutations)
  +              < sqrt(.Machine$double.eps))
  [1] TRUE
  > 
  > all(abs(permustats(anova(mr, permutations=p))$permutations -
  +         permustats(anova(mc, permutations=p))$permutations)
  +              < sqrt(.Machine$double.eps))
  [1] TRUE
  > ## eigenvals returns a list now (>= 2.5-0)
  > data(varespec, varechem)
  > mod <- cca(varespec ~ Al + P + Condition(pH), varechem)
  > ev <- summary(eigenvals(mod))
  > stopifnot(inherits(ev, "matrix"))
  > stopifnot(!is.list(ev))
  > ev
  Importance of components:
                          CCA1    CCA2    CA1    CA2    CA3     CA4     CA5
  Eigenvalue            0.2756 0.13713 0.3504 0.2220 0.2010 0.17366 0.13219
  Proportion Explained  0.1423 0.07078 0.1809 0.1146 0.1038 0.08964 0.06823
  Cumulative Proportion 0.1423 0.21304 0.3939 0.5085 0.6123 0.70193 0.77016
                            CA6     CA7     CA8     CA9    CA10    CA11    CA12
  Eigenvalue            0.09979 0.09005 0.07377 0.05072 0.03499 0.02761 0.02337
  Proportion Explained  0.05151 0.04648 0.03808 0.02618 0.01806 0.01425 0.01206
  Cumulative Proportion 0.82167 0.86815 0.90623 0.93241 0.95047 0.96472 0.97678
                            CA13     CA14     CA15     CA16     CA17     CA18
  Eigenvalue            0.014048 0.009628 0.007234 0.005155 0.003573 0.002545
  Proportion Explained  0.007251 0.004970 0.003734 0.002661 0.001845 0.001314
  Cumulative Proportion 0.984031 0.989001 0.992735 0.995396 0.997240 0.998554
                             CA19      CA20
  Eigenvalue            0.0018068 0.0009945
  Proportion Explained  0.0009326 0.0005133
  Cumulative Proportion 0.9994867 1.0000000
  > 
  > proc.time()
     user  system elapsed 
     3.90    0.43    4.34