R Markdown

This is an R Markdown document. Markdown is a simple formatting syntax for authoring HTML, PDF, and MS Word documents. For more details on using R Markdown see http://rmarkdown.rstudio.com.

##The following is written by Savanna van Mesdag, going through the relevant coding and analyses for CCAs and ANOSIMs for the plant and substrate data for the Warton slag bank #and the Hodbarrow RSPB Reserve.

#setwd#

#To run the following code to carry out the analyses, the following packages must be installed#

install.packages("vegan", repos = "https://github.com/vegandevs/vegan")
## Installing package into 'C:/Users/Savanna/AppData/Local/R/win-library/4.4'
## (as 'lib' is unspecified)
## Warning: unable to access index for repository https://github.com/vegandevs/vegan/src/contrib:
##   cannot open URL 'https://github.com/vegandevs/vegan/src/contrib/PACKAGES'
## Warning: package 'vegan' is not available for this version of R
## 
## A version of this package for your version of R might be available elsewhere,
## see the ideas at
## https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
## Warning: unable to access index for repository https://github.com/vegandevs/vegan/bin/windows/contrib/4.4:
##   cannot open URL 'https://github.com/vegandevs/vegan/bin/windows/contrib/4.4/PACKAGES'
install.packages("ggplot2", repos = "https://github.com/tidyverse/ggplot2")
## Installing package into 'C:/Users/Savanna/AppData/Local/R/win-library/4.4'
## (as 'lib' is unspecified)
## Warning: unable to access index for repository https://github.com/tidyverse/ggplot2/src/contrib:
##   cannot open URL 'https://github.com/tidyverse/ggplot2/src/contrib/PACKAGES'
## Warning: package 'ggplot2' is not available for this version of R
## 
## A version of this package for your version of R might be available elsewhere,
## see the ideas at
## https://cran.r-project.org/doc/manuals/r-patched/R-admin.html#Installing-packages
## Warning: unable to access index for repository https://github.com/tidyverse/ggplot2/bin/windows/contrib/4.4:
##   cannot open URL 'https://github.com/tidyverse/ggplot2/bin/windows/contrib/4.4/PACKAGES'

#Once installed, then need to load these r packages…

library(vegan)
## Warning: package 'vegan' was built under R version 4.4.1
## Loading required package: permute
## Loading required package: lattice
## This is vegan 2.6-8
library(ggplot2)

#Loading the data files… Make sure to set your directory beforehand before running this #on your own system.

##Carnforth (Warton) Data

CarnforthPS <- read.csv("CarnforthPlantSpecies.csv", header = TRUE, colClasses = c("numeric"))

CarnforthPC <-read.csv("CARNFORTH_PLANT_CHEMISTRY_MG_KG.csv", header = TRUE, colClasses = c("numeric"))

head(CarnforthPS)
##   Agrostis.spp. Agrostis.canina Alchemilla.mollis Alopercus.pratensis
## 1             0               0                 0                   0
## 2             0               0                 0                   0
## 3             0               0                 0                   0
## 4             0               0                 0                   0
## 5             0               0                 0                   0
## 6             0               0                 0                  27
##   Angelica.sylvestris Anthoxanthum.odoratum Anthyllis.vulneraria
## 1                   0                     0                    0
## 2                   0                     0                    0
## 3                   0                     0                    0
## 4                   0                     0                    0
## 5                   0                     0                    0
## 6                   0                     0                    0
##   Aphanes.arvensis Arrhenatherum.elatius Atrichum.undulatum Avenula.pratensis
## 1                0                     1                  0                 0
## 2                0                     0                  0                 0
## 3                0                     0                  0                 0
## 4                0                     0                  0                 0
## 5                0                     0                  0                 0
## 6                0                     0                  0                11
##   Bellis.perennis Betula.pubescens Blackstonia.perfoliata
## 1               0                0                      0
## 2               0                0                      0
## 3              11                0                      0
## 4               0                0                      0
## 5               0                0                      0
## 6              10                0                      0
##   Brachythecium.albicans Brachythecium.glareosum Brachythecium.mildeanum
## 1                      0                       0                       0
## 2                      0                       0                       0
## 3                      0                       0                       0
## 4                      0                       0                       0
## 5                      0                       0                       0
## 6                      0                       0                       0
##   Brachythecium.rutabulum Briza.media Bromus.hordeaceus Bryum.c.f..caespiticium
## 1                       0           0                 0                       0
## 2                       0           0                 0                       0
## 3                       0           0                 0                       0
## 4                       0           0                 0                       0
## 5                       0           0                 0                       0
## 6                       0           0                 0                       0
##   Bryum.c.f..pallescens Bryum.capillare Bryum.spp. Calliergonella.cupsidata
## 1                    60               0          0                        0
## 2                     0               0          0                        0
## 3                     0               0          0                        0
## 4                     0               0         20                      120
## 5                     0               0          0                        0
## 6                     0               0          0                       10
##   Calypogeia.arguta Campanula.rotundifolia Carex.distans Carex.flacca
## 1                 0                      0             0            0
## 2                 0                      0             0            0
## 3                 0                      0            23            0
## 4                 0                      0             0           24
## 5                 0                      0             0            0
## 6                 0                      0             0            0
##   Carex.panicea Carlina.vulgaris Centaurea.nigra Centaurium.erythraea
## 1             0               11               0                    0
## 2             0                5               0                    0
## 3             0                4               0                    0
## 4             0                0               0                    0
## 5             0                0               0                    0
## 6             0                0               0                    0
##   Centaurium.littorale Centaurium.pulchellum Cerastium.fontanum
## 1                    0                     0                  1
## 2                    0                     0                  0
## 3                    0                     0                  0
## 4                    0                     0                  0
## 5                    0                     0                  0
## 6                    0                     0                  0
##   Chamaenerion.angustifolium Cirriphyllum.piliferum Cirsium.arvense
## 1                          0                      0               0
## 2                          0                      0               0
## 3                          0                      0               0
## 4                          0                      0               0
## 5                          0                      0               0
## 6                          0                      0               0
##   Cirsium.palustre Crepis.capillaris Cynosurus.cristatus Dactylis.glomerata
## 1                0                 0                   0                  0
## 2                0                 0                   0                  0
## 3                0                 0                   0                  0
## 4                0                 0                   0                  0
## 5                0                 0                   0                  0
## 6                0                 0                   0                  0
##   Dactylorhiza.fuchsii Danthonia.decumbens Daucus.carrota Dicranella.spp.
## 1                    0                   0              0               0
## 2                    0                   0              0               0
## 3                    0                   0              0               0
## 4                    0                   0              0               0
## 5                    0                   0              0               0
## 6                    0                   0              0               0
##   Dicranum.scoparium Epilobium.montanum Equisetum.arvense Equisteum.variegatum
## 1                  0                  0                 0                    0
## 2                  0                  0                 0                    0
## 3                  0                  0                 0                    0
## 4                  0                  0                 0                    0
## 5                  0                  0                 0                    0
## 6                  0                  0                 0                    0
##   Erigeron.acer Euphrasia.agg Festuca.ovina Festuca.rubra Festuca.rubra.agg.
## 1             0            16             0             0                  0
## 2             0             0             0             0                  0
## 3             0             0            17             0                  0
## 4             0             0            55             0                  0
## 5             0             0            27             0                  0
## 6             0             0             5             0                  0
##   Filipendula.ulmaria Fissidens.adianthoides Fissidens.dubius Fissidens.exilis
## 1                   0                      0                0                0
## 2                   0                      0                0                0
## 3                   0                      0                0                0
## 4                   0                      0               20                0
## 5                   0                      0                0                0
## 6                   0                      0                0                0
##   Fragaria.vesca Galium.aparine Galium.arvense Galium.saxatile Galium.verum
## 1              0              0              0               0            0
## 2              0              0              0               0            0
## 3              0              0              0               0            0
## 4              0              0              0               0            0
## 5              0              0              0               1            0
## 6              0              0              0               0            0
##   Geum.urbanum Glechoma.hederacea Helicotrichon.spp. Heracleum.sphondylium
## 1            0                  0                  0                     0
## 2            0                  0                  0                     0
## 3            0                  0                  0                     0
## 4            0                  0                  0                     0
## 5            0                  0                  0                     0
## 6            0                  0                  0                     0
##   Hieracium.spp. Holcus.spp. Holcus.lanatus Holcus.mollis
## 1              0          42              0             0
## 2              0           0              0             0
## 3              0          40              8             0
## 4              0          58              3             0
## 5              0          70              0             0
## 6              0          23              0             0
##   Homalothecium.lutescens Hylocomium.splendens Hypericum.perforatum
## 1                       0                    0                    0
## 2                       0                    0                    0
## 3                       0                    0                    0
## 4                       0                    0                    0
## 5                     160                    0                    0
## 6                      10                    0                    0
##   Hypnum.cupressiforme Hypnum.imponens Hypnum.jutlandicum Hypochaeris.radicata
## 1                   60               0                  0                    0
## 2                  150               0                  0                    0
## 3                   60               0                  0                    0
## 4                    0               0                  0                    0
## 5                    0               0                  0                    0
## 6                    0               0                  0                    0
##   Kindbergia.praelonga Lathyrus.pratensis Leontodon.hispidus
## 1                    0                  0                  0
## 2                    0                  0                  0
## 3                    0                  0                  0
## 4                    0                  0                  0
## 5                    0                  0                  0
## 6                    0                  0                  0
##   Leontodon.saxatilis Leucanthemum.vulgare Linum.catharticum Lolium.perenne
## 1                   0                    0                 5              0
## 2                   0                    0                 0              0
## 3                   0                    0                 0              0
## 4                   0                    0                 0              0
## 5                   0                    0                 0              0
## 6                   0                    0                 0              0
##   Lophocolea.semiteres Lotus.corniculatus Luzula.multiflora Lysimachia.maritima
## 1                    0                  0                 0                   0
## 2                    0                  0                 0                   0
## 3                    0                220                 0                   0
## 4                    0                 19                 0                   0
## 5                    0                  0                 0                   0
## 6                    0                  0                 0                   0
##   Medicago.lupulina Myosotis.arvensis Ononis.repens Oxalis.acetosella
## 1                 0                 0             0                 0
## 2                 0                 1             0                 0
## 3                 5                 0             0                 0
## 4                 0                 0             0                 0
## 5                 0                 6             2                 0
## 6                 0                 4            63                 0
##   Pastinaca.sativa Pentaglottis.sempervirens Pillosella.officinarum
## 1                0                         0                     33
## 2                0                         0                    286
## 3                0                         0                      2
## 4                0                         0                      0
## 5                0                         0                     54
## 6                0                         0                      0
##   Plantago.coronopus Plantago.lanceolata Pleurozium.schreberi Poa.annua
## 1                  0                   1                    0         0
## 2                  0                   0                    0         0
## 3                  0                   0                    0         0
## 4                  1                   0                    0         0
## 5                 19                   0                    0         0
## 6                  0                   1                    0         0
##   Poa.spp. Polytrichum.commune Polytrichum.commune.agg. Polytrichum.formosum
## 1        0                   0                        0                    0
## 2        0                   0                        0                    0
## 3        0                   0                        0                    0
## 4        0                   0                        0                    0
## 5        0                   0                        0                    0
## 6        0                   0                        0                    0
##   Potentilla.reptans Prunella.vulgaris Pseudoscleropidum.purum
## 1                  0                 0                       0
## 2                  0                 0                       0
## 3                  0                 0                       0
## 4                  0                 0                       0
## 5                  0                 0                      30
## 6                  0                 0                       0
##   Pteridium.aquilinum Ranunculus.acris Ranunculus.parviflorus Ranunculus.repens
## 1                   0                0                      0                 0
## 2                   0                0                      0                 0
## 3                   0                0                      0                 0
## 4                   0                0                      0                 0
## 5                   0                0                      0                 0
## 6                   0                0                      0                 0
##   Reseda.lutea Rhinanthus.minor Rhizomnium.punctatum Rhytidadelphus.squarrosus
## 1            0                0                    0                        60
## 2            0                0                    0                         0
## 3            0                0                    0                         0
## 4            0                0                    0                         0
## 5            0                0                    0                       140
## 6            0                0                    0                        20
##   Rhytidadelphus.triquetris Rubus.fruticosus Sanguisorba.minor.spp.minor
## 1                         0                0                           0
## 2                         0                0                           0
## 3                         0                0                           0
## 4                         0                0                           0
## 5                         0                0                           0
## 6                         0                0                           0
##   Saniona.uncinata Sedum.anglicum Senecio.jacobaea Senecio.vulgaris
## 1                0              0                0                0
## 2                0              0                0                0
## 3                0              0                0                0
## 4                0              0                0                0
## 5                0              0                0                0
## 6                0              0                0                0
##   Sonchus.arvensis Stachys.sylvatica Stellaria.apetala Taraxacum.agg.
## 1                0                 0                 0              0
## 2                0                 0                 0              1
## 3                0                 0                 0              3
## 4                0                 0                 0              2
## 5                0                 0                 0              1
## 6                0                 0                 0              0
##   Thuidium.tamariscinum Thymus.polytrichus Trichostomum.crispulum
## 1                     0                283                     60
## 2                     0                  7                      0
## 3                     0                159                      0
## 4                     0                  0                      0
## 5                     0                  0                      0
## 6                     0                 20                      0
##   Trifolium.campestre Trifolium.dubium Trifolium.pratense Trifolium.repens
## 1                   0              162                  0                0
## 2                   0              118                  0                0
## 3                   0                0                  0                0
## 4                   0                0                  0                0
## 5                   0                0                  0                0
## 6                   0                0                  0                2
##   Trisetum.flavescens Tussilago.farfara Urtica.diocia Veronica.officinalis
## 1                   0                 0             0                    0
## 2                   0                 0             0                    0
## 3                   0                 0             0                    0
## 4                   0                 0             0                    0
## 5                   0                 0             7                    0
## 6                   0                 0             0                    0
##   Vicia.sativa Viola.riviniana Weissia.controversa Zygodon.stirtonii
## 1            0               0                   0                 0
## 2            0               0                   0                 0
## 3            0               0                   0                 0
## 4            0               0                   0                 0
## 5            0               0                   0                 0
## 6            0               0                   0                 0
head(CarnforthPC)
##   pH_level     SiO2    Al2O3      Fe2O3      CaO      MgO     Na2O       K2O
## 1    9.008 182299.6 47632.53 153873.611 164378.9 6030.359 2967.428 10791.921
## 2   10.175 159862.7 52131.16   7903.508 262291.5 8924.931 2151.385  3486.621
## 3   10.589 170613.7 44139.48  20283.340 204401.6 8140.985 2299.756  5561.990
## 4    9.516 181832.2 35936.10   7833.566 200828.1 8080.681 2596.499  4648.828
## 5   10.133 142567.7 43927.78   4826.036 250141.8 9769.182 1186.971  2407.429
## 6    8.790 200997.0 31755.02 181850.631 121497.4 6030.359 3709.284 13282.364
##       Cr2O3     TiO2      MnO     P2O5      SrO       BaO   LOI   Ag As  B   Be
## 1 342.10121 3596.057 5421.202 999.8709 287.5021 1791.3027 22.86 0.00  0  0  0.0
## 2  27.36810 4495.072 1858.698 399.9484 338.2378 1433.0422 13.90 0.15  3 50 12.8
## 3  20.52607 2637.109 1936.144 599.9225 253.6784  716.5211 19.00 1.30 11 60  8.4
## 4  41.05215 2457.306 1781.252 499.9354 253.6784  985.2165 20.70 0.30  7 40  8.6
## 5  13.68405 3356.320  929.349 599.9225 253.6784  716.5211 22.20 0.30  3 40 11.4
## 6  68.42024 1798.029 2323.372 999.8709 211.3986  806.0862 20.61 0.00  0  0  0.0
##    Bi   Cd Co Cu Ga  Hg La Li  Mo Ni  Pb     S   Sb Sc Th Tl  U   V W   Zn
## 1 0.0 0.00  0  0  0 0.0  0  0 0.0  0   0 10000  0.0  0  0  0  0 100 0 6000
## 2 1.5 0.25  1 14  5 0.5 30 50 0.5  7  11  6000  2.0 11 10  5 10  10 5   36
## 3 2.0 2.70  3 53 10 0.5 30 40 0.5  8 212  4300 16.0  7 10  5  5  12 5  503
## 4 1.5 0.60 36 30  5 0.5 20 40 0.5  6  71  2700  2.0  5 10  5  5  11 5  120
## 5 1.5 0.25  4 17  5 0.5 30 40 0.5  3  28  8100  1.5  8 10  5  5   5 5   46
## 6 0.0 0.00  0  0  0 0.0  0  0 0.0  0   0  5000  0.0  0  0  0  0 100 0 2000
##   Akermanite Albite Aluminium.oxide.hydroxide Anhydrite Aragonite Biotite
## 1          1      0                         0         0         0       1
## 2          0      0                         0         0         0       0
## 3          0      0                         0         0         0       0
## 4          0      0                         0         0         0       0
## 5          1      0                         0         0         0       0
## 6          0      0                         0         0         0       0
##   Birnessite Calcite Clinochlore Cuspidine Diaspore Dickite Gehlenite Goethite
## 1          0       1           0         0        0       0         0        0
## 2          0       1           0         1        0       0         1        0
## 3          0       1           0         1        0       0         1        0
## 4          0       1           0         0        0       0         1        0
## 5          0       1           0         1        0       0         0        0
## 6          0       1           0         0        0       0         0        0
##   Haematite Illite Kaolinite Langite Linnaeite Magnesioferrite Melilite
## 1         0      0         0       0         0               0        0
## 2         0      0         0       0         0               0        0
## 3         0      0         0       0         0               0        0
## 4         0      0         0       0         0               0        0
## 5         0      0         0       0         0               0        0
## 6         0      0         0       0         0               1        0
##   Merwinite Microcline Mullite Muscovite Orthoclase Orthopyroxene Periclase
## 1         0          0       0         0          0             0         0
## 2         0          0       0         0          0             0         1
## 3         0          0       0         0          0             0         0
## 4         0          0       0         0          0             0         0
## 5         0          0       0         1          0             0         1
## 6         1          0       0         0          0             0         0
##   Phengite Pseudowollastonite Quartz Staurolite Valentinite
## 1        0                  1      1          0           0
## 2        0                  0      1          0           0
## 3        0                  0      1          0           0
## 4        0                  0      1          0           0
## 5        0                  0      0          0           0
## 6        0                  0      1          0           0
rowSums(CarnforthPS)
## [1] 795 568 552 322 517 206 319 343

#Now for some ANOSIMs…

#anoCSiO2 <- anosim(CarnforthPS, CarnforthPC$SiO2, distance = “bray”, permutations = 9999)

#When this ANOSIM is run, the error message: “there should be replicates within groups” #comes up. This error message comes up for another substrate variables for the Barrow #data. From now on, only variables that were tested successfully will be included.

anoCMgO <- anosim(CarnforthPS, CarnforthPC$MgO, distance = "bray", permutations = 9999)

anoCMgO
## 
## Call:
## anosim(x = CarnforthPS, grouping = CarnforthPC$MgO, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.1852 
##       Significance: 0.4279 
## 
## Permutation: free
## Number of permutations: 9999
anoCCr2O3 <- anosim(CarnforthPS, CarnforthPC$Cr2O3, distance = "bray", permutations = 9999)

anoCCr2O3
## 
## Call:
## anosim(x = CarnforthPS, grouping = CarnforthPC$Cr2O3, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R:    -0 
##       Significance: 0.5117 
## 
## Permutation: free
## Number of permutations: 9999
anoCP2O5 <- anosim(CarnforthPS, CarnforthPC$P2O5, distance = "bray", permutations = 9999)

anoCP2O5
## 
## Call:
## anosim(x = CarnforthPS, grouping = CarnforthPC$P2O5, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.03846 
##       Significance: 0.4561 
## 
## Permutation: free
## Number of permutations: 9999
anoCSrO <- anosim(CarnforthPS, CarnforthPC$SrO, distance = "bray", permutations = 9999)

anoCSrO
## 
## Call:
## anosim(x = CarnforthPS, grouping = CarnforthPC$SrO, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: -0.07576 
##       Significance: 0.5927 
## 
## Permutation: free
## Number of permutations: 9999
anoCBaO <- anosim(CarnforthPS, CarnforthPC$BaO, distance = "bray", permutations = 9999)

anoCBaO
## 
## Call:
## anosim(x = CarnforthPS, grouping = CarnforthPC$BaO, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: -0.1923 
##       Significance: 0.6707 
## 
## Permutation: free
## Number of permutations: 9999
anoCAg <- anosim(CarnforthPS, CarnforthPC$Ag, distance = "bray", permutations = 9999)

anoCAg
## 
## Call:
## anosim(x = CarnforthPS, grouping = CarnforthPC$Ag, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.01333 
##       Significance: 0.502 
## 
## Permutation: free
## Number of permutations: 9999
anoCAs <- anosim(CarnforthPS, CarnforthPC$As, distance = "bray", permutations = 9999)

anoCAs
## 
## Call:
## anosim(x = CarnforthPS, grouping = CarnforthPC$As, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R:    -0 
##       Significance: 0.4984 
## 
## Permutation: free
## Number of permutations: 9999
anoCB <- anosim(CarnforthPS, CarnforthPC$B, distance = "bray", permutations = 9999)

anoCB
## 
## Call:
## anosim(x = CarnforthPS, grouping = CarnforthPC$B, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: -0.1875 
##       Significance: 0.713 
## 
## Permutation: free
## Number of permutations: 9999
anoCBe <- anosim(CarnforthPS, CarnforthPC$Be, distance = "bray", permutations = 9999)

anoCBe
## 
## Call:
## anosim(x = CarnforthPS, grouping = CarnforthPC$Be, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.1852 
##       Significance: 0.4344 
## 
## Permutation: free
## Number of permutations: 9999
anoCCd <- anosim(CarnforthPS, CarnforthPC$Cd, distance = "bray", permutations = 9999)

anoCCd
## 
## Call:
## anosim(x = CarnforthPS, grouping = CarnforthPC$Cd, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: -0.1042 
##       Significance: 0.6265 
## 
## Permutation: free
## Number of permutations: 9999
anoCCo <- anosim(CarnforthPS, CarnforthPC$Co, distance = "bray", permutations = 9999)

anoCCo
## 
## Call:
## anosim(x = CarnforthPS, grouping = CarnforthPC$Co, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.1538 
##       Significance: 0.348 
## 
## Permutation: free
## Number of permutations: 9999
anoCCu <- anosim(CarnforthPS, CarnforthPC$Cu, distance = "bray", permutations = 9999)

anoCCu
## 
## Call:
## anosim(x = CarnforthPS, grouping = CarnforthPC$Cu, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.1852 
##       Significance: 0.425 
## 
## Permutation: free
## Number of permutations: 9999
anoCMo <- anosim(CarnforthPS, CarnforthPC$Mo, distance = "bray", permutations = 9999)

anoCMo
## 
## Call:
## anosim(x = CarnforthPS, grouping = CarnforthPC$Mo, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: -0.3542 
##       Significance: 0.8575 
## 
## Permutation: free
## Number of permutations: 9999
anoCNi <- anosim(CarnforthPS, CarnforthPC$Ni, distance = "bray", permutations = 9999)

anoCNi
## 
## Call:
## anosim(x = CarnforthPS, grouping = CarnforthPC$Ni, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: -0.2267 
##       Significance: 0.7485 
## 
## Permutation: free
## Number of permutations: 9999
anoCPb <- anosim(CarnforthPS, CarnforthPC$Pb, distance = "bray", permutations = 9999)

anoCPb
## 
## Call:
## anosim(x = CarnforthPS, grouping = CarnforthPC$Pb, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.1852 
##       Significance: 0.4157 
## 
## Permutation: free
## Number of permutations: 9999
anoCSb <- anosim(CarnforthPS, CarnforthPC$Sb, distance = "bray", permutations = 9999)

anoCSb
## 
## Call:
## anosim(x = CarnforthPS, grouping = CarnforthPC$Sb, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: -0.01333 
##       Significance: 0.5254 
## 
## Permutation: free
## Number of permutations: 9999
anoCSc <- anosim(CarnforthPS, CarnforthPC$Sc, distance = "bray", permutations = 9999)

anoCSc
## 
## Call:
## anosim(x = CarnforthPS, grouping = CarnforthPC$Sc, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.1852 
##       Significance: 0.4302 
## 
## Permutation: free
## Number of permutations: 9999
anoCV <- anosim(CarnforthPS, CarnforthPC$V, distance = "bray", permutations = 9999)

anoCV
## 
## Call:
## anosim(x = CarnforthPS, grouping = CarnforthPC$V, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.1852 
##       Significance: 0.4355 
## 
## Permutation: free
## Number of permutations: 9999
#None of the ANOSIM tests led to stastistically significant results. Because of this,
#CCAs might not be entirely appropriate to represent the data visually.
#NMDS analyses will be utilised to visualise the plant data.
CarnforthNMDS <- metaMDS(CarnforthPS)
## Square root transformation
## Wisconsin double standardization
## Run 0 stress 0.1027624 
## Run 1 stress 0.2488059 
## Run 2 stress 0.08821447 
## ... New best solution
## ... Procrustes: rmse 0.2066695  max resid 0.412472 
## Run 3 stress 0.05547403 
## ... New best solution
## ... Procrustes: rmse 0.1751812  max resid 0.3454967 
## Run 4 stress 0.190284 
## Run 5 stress 0.1027624 
## Run 6 stress 0.05547404 
## ... Procrustes: rmse 0.0002151524  max resid 0.0003792484 
## ... Similar to previous best
## Run 7 stress 0.08821452 
## Run 8 stress 0.1027624 
## Run 9 stress 0.05547398 
## ... New best solution
## ... Procrustes: rmse 0.0001165222  max resid 0.0002066861 
## ... Similar to previous best
## Run 10 stress 0.05547399 
## ... Procrustes: rmse 4.74301e-06  max resid 8.551239e-06 
## ... Similar to previous best
## Run 11 stress 0.0882145 
## Run 12 stress 0.1770037 
## Run 13 stress 0.1320888 
## Run 14 stress 0.1027625 
## Run 15 stress 0.05547401 
## ... Procrustes: rmse 2.280356e-05  max resid 3.852681e-05 
## ... Similar to previous best
## Run 16 stress 0.1027625 
## Run 17 stress 0.261886 
## Run 18 stress 0.08821447 
## Run 19 stress 0.08975528 
## Run 20 stress 0.09407489 
## *** Best solution repeated 3 times
plot(CarnforthNMDS)

#As in the other NMDS plots, species are represented by red crosses and communities are #represented by circles.

CarnforthNMDS
## 
## Call:
## metaMDS(comm = CarnforthPS) 
## 
## global Multidimensional Scaling using monoMDS
## 
## Data:     wisconsin(sqrt(CarnforthPS)) 
## Distance: bray 
## 
## Dimensions: 2 
## Stress:     0.05547398 
## Stress type 1, weak ties
## Best solution was repeated 3 times in 20 tries
## The best solution was from try 9 (random start)
## Scaling: centring, PC rotation, halfchange scaling 
## Species: expanded scores based on 'wisconsin(sqrt(CarnforthPS))'
plot(CarnforthNMDS, "sites")   # Produces distance 

plot(CarnforthNMDS, "species")
orditorp(CarnforthNMDS, "species")

#What is interesting about this NMDS is that most of the species are separated out, with #very little clustering or ‘clumping’. This contrasts greatly with the NMDS plots #for Fallin Bing, Addiewell Bing and South Bank Wood (Penicuik). It might still be #useful to look at a CCA for Carnforth as well…

CarnforthCCA <- cca(CarnforthPS, CarnforthPC)
## 
## Some constraints or conditions were aliased because they were redundant. This
## can happen if terms are linearly dependent (collinear): 'K2O', 'Cr2O3', 'TiO2',
## 'MnO', 'P2O5', 'SrO', 'BaO', 'LOI', 'Ag', 'As', 'B', 'Be', 'Bi', 'Cd', 'Co',
## 'Cu', 'Ga', 'Hg', 'La', 'Li', 'Mo', 'Ni', 'Pb', 'S', 'Sb', 'Sc', 'Th', 'Tl',
## 'U', 'V', 'W', 'Zn', 'Akermanite', 'Albite', 'Aluminium.oxide.hydroxide',
## 'Anhydrite', 'Aragonite', 'Biotite', 'Birnessite', 'Calcite', 'Clinochlore',
## 'Cuspidine', 'Diaspore', 'Dickite', 'Gehlenite', 'Goethite', 'Haematite',
## 'Illite', 'Kaolinite', 'Langite', 'Linnaeite', 'Magnesioferrite', 'Melilite',
## 'Merwinite', 'Microcline', 'Mullite', 'Muscovite', 'Orthoclase',
## 'Orthopyroxene', 'Periclase', 'Phengite', 'Pseudowollastonite', 'Quartz',
## 'Staurolite', 'Valentinite'
## 
## The model is overfitted with no unconstrained (residual) component
print(CarnforthCCA)
## Call: cca(X = CarnforthPS, Y = CarnforthPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total           3.868      1.000     
## Constrained     3.868      1.000    7
## Unconstrained   0.000      0.000    0
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## Some constraints or conditions were aliased because they were redundant.
## This can happen if terms are linearly dependent (collinear): 'K2O',
## 'Cr2O3', 'TiO2', 'MnO', 'P2O5', 'SrO', 'BaO', 'LOI', 'Ag', 'As', 'B', 'Be',
## 'Bi', 'Cd', 'Co', 'Cu', 'Ga', 'Hg', 'La', 'Li', 'Mo', 'Ni', 'Pb', 'S',
## 'Sb', 'Sc', 'Th', 'Tl', 'U', 'V', 'W', 'Zn', 'Akermanite', 'Albite',
## 'Aluminium.oxide.hydroxide', 'Anhydrite', 'Aragonite', 'Biotite',
## 'Birnessite', 'Calcite', 'Clinochlore', 'Cuspidine', 'Diaspore', 'Dickite',
## 'Gehlenite', 'Goethite', 'Haematite', 'Illite', 'Kaolinite', 'Langite',
## 'Linnaeite', 'Magnesioferrite', 'Melilite', 'Merwinite', 'Microcline',
## 'Mullite', 'Muscovite', 'Orthoclase', 'Orthopyroxene', 'Periclase',
## 'Phengite', 'Pseudowollastonite', 'Quartz', 'Staurolite', 'Valentinite'
## 
## The model is overfitted with no unconstrained (residual) component.
## 
## 102 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4   CCA5   CCA6   CCA7 
## 0.8089 0.6910 0.6454 0.5739 0.4932 0.4219 0.2338
plot(CarnforthCCA)

CarnforthCCA1 <- cca(CarnforthPS ~ Na2O + Co + SrO + Al2O3 + Calcite,
                     data = CarnforthPC)

print(CarnforthCCA1)
## Call: cca(formula = CarnforthPS ~ Na2O + Co + SrO + Al2O3 + Calcite, data =
## CarnforthPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total          3.8682     1.0000     
## Constrained    3.0308     0.7835    5
## Unconstrained  0.8374     0.2165    2
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 102 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4   CCA5 
## 0.7958 0.6891 0.6261 0.5340 0.3858 
## 
## Eigenvalues for unconstrained axes:
##    CA1    CA2 
## 0.5070 0.3303
plot(CarnforthCCA1)

anova(CarnforthCCA1)
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 999
## 
## Model: cca(formula = CarnforthPS ~ Na2O + Co + SrO + Al2O3 + Calcite, data = CarnforthPC)
##          Df ChiSquare      F Pr(>F)   
## Model     5   3.03084 1.4478  0.005 **
## Residual  2   0.83737                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

##An F statistic of 1.4478 and a low p value of 0.008.

CarnforthCCA2 <- cca(CarnforthPS ~ Na2O + Co +SrO + Al2O3 + Calcite + MgO,
                     data = CarnforthPC)

print(CarnforthCCA2)
## Call: cca(formula = CarnforthPS ~ Na2O + Co + SrO + Al2O3 + Calcite + MgO,
## data = CarnforthPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total         3.86821    1.00000     
## Constrained   3.52185    0.91046    6
## Unconstrained 0.34635    0.08954    1
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 102 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4   CCA5   CCA6 
## 0.7968 0.6898 0.6295 0.5737 0.4903 0.3417 
## 
## Eigenvalues for unconstrained axes:
##    CA1 
## 0.3464
plot(CarnforthCCA2)

anova(CarnforthCCA2)
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 999
## 
## Model: cca(formula = CarnforthPS ~ Na2O + Co + SrO + Al2O3 + Calcite + MgO, data = CarnforthPC)
##          Df ChiSquare      F Pr(>F)    
## Model     6    3.5219 1.6947  0.001 ***
## Residual  1    0.3464                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

##An F statistic of 1.6947 and a low p value of 0.002.

CarnforthCCA3 <- cca(CarnforthPS ~ Na2O + Co + P2O5 + Al2O3, data = CarnforthPC)
print(CarnforthCCA3)
## Call: cca(formula = CarnforthPS ~ Na2O + Co + P2O5 + Al2O3, data =
## CarnforthPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total          3.8682     1.0000     
## Constrained    2.2333     0.5774    4
## Unconstrained  1.6349     0.4226    3
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 102 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4 
## 0.7660 0.6623 0.5402 0.2648 
## 
## Eigenvalues for unconstrained axes:
##    CA1    CA2    CA3 
## 0.6517 0.5161 0.4670
plot(CarnforthCCA3)

anova(CarnforthCCA3)
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 999
## 
## Model: cca(formula = CarnforthPS ~ Na2O + Co + P2O5 + Al2O3, data = CarnforthPC)
##          Df ChiSquare      F Pr(>F)
## Model     4    2.2333 1.0245  0.316
## Residual  3    1.6349

#An F statistic of 1.0245 and a p value of 0.382.

CarnforthCCA4 <- cca(CarnforthPS ~ pH_level + Co +SrO + Al2O3 + Calcite + MgO,
                     data = CarnforthPC)

print(CarnforthCCA4)
## Call: cca(formula = CarnforthPS ~ pH_level + Co + SrO + Al2O3 + Calcite +
## MgO, data = CarnforthPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total          3.8682     1.0000     
## Constrained    3.4512     0.8922    6
## Unconstrained  0.4170     0.1078    1
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 102 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4   CCA5   CCA6 
## 0.8029 0.6899 0.6387 0.5456 0.4825 0.2915 
## 
## Eigenvalues for unconstrained axes:
##   CA1 
## 0.417
plot(CarnforthCCA4)

anova(CarnforthCCA4)
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 999
## 
## Model: cca(formula = CarnforthPS ~ pH_level + Co + SrO + Al2O3 + Calcite + MgO, data = CarnforthPC)
##          Df ChiSquare      F Pr(>F)   
## Model     6    3.4512 1.3792  0.008 **
## Residual  1    0.4170                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#An F statistic of 1.3792 and a p value of 0.01.

CarnforthCCA5 <- cca(CarnforthPS ~ pH_level + Co + As + Al2O3 + Calcite + MgO,
                     data = CarnforthPC)

print(CarnforthCCA5)
## Call: cca(formula = CarnforthPS ~ pH_level + Co + As + Al2O3 + Calcite +
## MgO, data = CarnforthPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total          3.8682     1.0000     
## Constrained    3.4109     0.8818    6
## Unconstrained  0.4573     0.1182    1
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 102 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4   CCA5   CCA6 
## 0.8071 0.6868 0.6199 0.5552 0.4863 0.2556 
## 
## Eigenvalues for unconstrained axes:
##    CA1 
## 0.4573
plot(CarnforthCCA5)

anova(CarnforthCCA5)
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 999
## 
## Model: cca(formula = CarnforthPS ~ pH_level + Co + As + Al2O3 + Calcite + MgO, data = CarnforthPC)
##          Df ChiSquare     F Pr(>F)  
## Model     6    3.4109 1.243  0.097 .
## Residual  1    0.4573               
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#An F statistic of 1.243 and a p value of 0.089.

CarnforthCCA6 <- cca(CarnforthPS ~ Na2O + Co +SrO + Al2O3 + Calcite + V,
                     data = CarnforthPC)

print(CarnforthCCA6)
## Call: cca(formula = CarnforthPS ~ Na2O + Co + SrO + Al2O3 + Calcite + V,
## data = CarnforthPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total          3.8682     1.0000     
## Constrained    3.3915     0.8768    6
## Unconstrained  0.4767     0.1232    1
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 102 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4   CCA5   CCA6 
## 0.7998 0.6892 0.6332 0.5414 0.4791 0.2487 
## 
## Eigenvalues for unconstrained axes:
##    CA1 
## 0.4767
plot(CarnforthCCA6)

anova(CarnforthCCA6)
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 999
## 
## Model: cca(formula = CarnforthPS ~ Na2O + Co + SrO + Al2O3 + Calcite + V, data = CarnforthPC)
##          Df ChiSquare      F Pr(>F)  
## Model     6    3.3915 1.1857  0.085 .
## Residual  1    0.4767                
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#An F statistic of 1.1857 and a p value of 0.104.

CarnforthCCA7 <- cca(CarnforthPS ~ Na2O + Co +SrO + Al2O3 + Ag + MgO,
                     data = CarnforthPC)

print(CarnforthCCA7)
## Call: cca(formula = CarnforthPS ~ Na2O + Co + SrO + Al2O3 + Ag + MgO, data
## = CarnforthPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total         3.86821    1.00000     
## Constrained   3.50666    0.90653    6
## Unconstrained 0.36155    0.09347    1
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 102 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4   CCA5   CCA6 
## 0.8011 0.6893 0.6378 0.5672 0.4924 0.3189 
## 
## Eigenvalues for unconstrained axes:
##    CA1 
## 0.3615
plot(CarnforthCCA7)

anova(CarnforthCCA7)
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 999
## 
## Model: cca(formula = CarnforthPS ~ Na2O + Co + SrO + Al2O3 + Ag + MgO, data = CarnforthPC)
##          Df ChiSquare      F Pr(>F)   
## Model     6    3.5067 1.6165  0.002 **
## Residual  1    0.3615                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#An F statistic of 1.6165 and a p value of 0.003.

CarnforthCCA8 <- cca(CarnforthPS ~ Na2O + Co +SrO + Al2O3 + BaO + MgO,
                     data = CarnforthPC)

print(CarnforthCCA8)
## Call: cca(formula = CarnforthPS ~ Na2O + Co + SrO + Al2O3 + BaO + MgO, data
## = CarnforthPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total          3.8682     1.0000     
## Constrained    3.3792     0.8736    6
## Unconstrained  0.4890     0.1264    1
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 102 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4   CCA5   CCA6 
## 0.8089 0.6901 0.6451 0.5427 0.4532 0.2392 
## 
## Eigenvalues for unconstrained axes:
##   CA1 
## 0.489
plot(CarnforthCCA8)

anova(CarnforthCCA8)
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 999
## 
## Model: cca(formula = CarnforthPS ~ Na2O + Co + SrO + Al2O3 + BaO + MgO, data = CarnforthPC)
##          Df ChiSquare      F Pr(>F)
## Model     6    3.3792 1.1518  0.153
## Residual  1    0.4890

#An F statistic of 1.1518 and a p value of 0.147.

CarnforthCCA9 <- cca(CarnforthPS ~ Na2O + Co +SrO + Al2O3 + Cr2O3 + MgO,
                     data = CarnforthPC)

print(CarnforthCCA9)
## Call: cca(formula = CarnforthPS ~ Na2O + Co + SrO + Al2O3 + Cr2O3 + MgO,
## data = CarnforthPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total          3.8682     1.0000     
## Constrained    3.3565     0.8677    6
## Unconstrained  0.5117     0.1323    1
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 102 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4   CCA5   CCA6 
## 0.8077 0.6905 0.6435 0.5408 0.4375 0.2365 
## 
## Eigenvalues for unconstrained axes:
##    CA1 
## 0.5117
plot(CarnforthCCA9)

anova(CarnforthCCA9)
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 999
## 
## Model: cca(formula = CarnforthPS ~ Na2O + Co + SrO + Al2O3 + Cr2O3 + MgO, data = CarnforthPC)
##          Df ChiSquare      F Pr(>F)
## Model     6    3.3565 1.0933   0.32
## Residual  1    0.5117

#An F statistic of 1.6442 and a p value of 0.002.

CarnforthCCA9 <- cca(CarnforthPS ~ Na2O + Co +SrO + Al2O3 + Cd + MgO,
                     data = CarnforthPC)

print(CarnforthCCA9)
## Call: cca(formula = CarnforthPS ~ Na2O + Co + SrO + Al2O3 + Cd + MgO, data
## = CarnforthPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total         3.86821    1.00000     
## Constrained   3.51219    0.90796    6
## Unconstrained 0.35601    0.09204    1
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 102 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4   CCA5   CCA6 
## 0.8002 0.6893 0.6361 0.5695 0.4930 0.3240 
## 
## Eigenvalues for unconstrained axes:
##   CA1 
## 0.356
plot(CarnforthCCA9)

anova(CarnforthCCA9)
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 999
## 
## Model: cca(formula = CarnforthPS ~ Na2O + Co + SrO + Al2O3 + Cd + MgO, data = CarnforthPC)
##          Df ChiSquare      F Pr(>F)   
## Model     6    3.5122 1.6442  0.004 **
## Residual  1    0.3560                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#An F statistic of 1.634 and a low p value of 0.002.

CarnforthCCA10 <- cca(CarnforthPS ~ Na2O + Co +SrO + Cd + Calcite + MgO,
                     data = CarnforthPC)

print(CarnforthCCA10)
## Call: cca(formula = CarnforthPS ~ Na2O + Co + SrO + Cd + Calcite + MgO,
## data = CarnforthPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total         3.86821    1.00000     
## Constrained   3.51017    0.90744    6
## Unconstrained 0.35804    0.09256    1
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 102 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4   CCA5   CCA6 
## 0.8014 0.6909 0.6376 0.5676 0.4932 0.3195 
## 
## Eigenvalues for unconstrained axes:
##   CA1 
## 0.358
plot(CarnforthCCA10)

anova(CarnforthCCA10)
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 999
## 
## Model: cca(formula = CarnforthPS ~ Na2O + Co + SrO + Cd + Calcite + MgO, data = CarnforthPC)
##          Df ChiSquare     F Pr(>F)   
## Model     6    3.5102 1.634  0.003 **
## Residual  1    0.3580                
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#An F statistic of 1.6287 and a low p value of 0.001.

#After doing several CCAs with different combinations of chemical variables, the one with #the highest F statistic, 1.6947, is CarnforthCCA2. This CCA also has a low p value of #0.002. The plot for this one looks good, but it can be made to be a little neater and #easier to interpret…

options(max.print=1000000)

CarnforthCCA2$CCA$v
##                                  CCA1       CCA2        CCA3        CCA4
## Alopercus.pratensis        0.70197267  1.9144914  0.58018924 -3.19668010
## Arrhenatherum.elatius     -0.92434356 -0.3623170 -0.30215207  0.13427454
## Avenula.pratensis          0.70197267  1.9144914  0.58018924 -3.19668010
## Bellis.perennis            0.25570592  1.0509552  0.19022470 -0.86331856
## Brachythecium.mildeanum    2.78627371 -2.1170901  0.13902509  0.32569124
## Bryum.c.f..pallescens     -0.97459212 -0.7902055 -1.38783174 -0.32053435
## Bryum.spp.                 1.08992217  2.5870088 -1.28669429  1.76431490
## Calliergonella.cupsidata   1.06007990  2.5352767 -1.14308786  1.38269990
## Carex.distans              1.88581916 -1.3862996  0.04600892  0.61157449
## Carex.flacca               1.08992217  2.5870088 -1.28669429  1.76431490
## Carlina.vulgaris          -0.76941458 -0.3533724 -0.05304103  0.32526965
## Centaurium.pulchellum      2.78627371 -2.1170901  0.13902509  0.32569124
## Cerastium.fontanum        -0.92434356 -0.3623170 -0.30215207  0.13427454
## Dicranella.spp.           -1.03489039 -1.3036717 -2.69064735 -0.86630502
## Euphrasia.agg             -0.92434356 -0.3623170 -0.30215207  0.13427454
## Festuca.ovina              1.06512484  0.8841181 -0.43752785  0.47189414
## Fissidens.dubius           1.08992217  2.5870088 -1.28669429  1.76431490
## Fissidens.exilis          -1.03489039 -1.3036717 -2.69064735 -0.86630502
## Galium.saxatile            0.25327885  0.3925877  0.39790464 -1.84098085
## Holcus.spp.                0.35971488  0.7701560 -0.20685038 -0.16208029
## Holcus.lanatus             0.18816704  0.8989459 -0.47039918  1.39602713
## Homalothecium.lutescens    0.27967260  0.4821115  0.40862726 -1.92072787
## Hypnum.cupressiforme      -0.66364332 -0.1652824  1.09999378  0.70620087
## Linum.catharticum         -0.92434356 -0.3623170 -0.30215207  0.13427454
## Lotus.corniculatus        -0.05142062  0.4504439 -0.25351743  1.29817661
## Lysimachia.maritima        2.78627371 -2.1170901  0.13902509  0.32569124
## Medicago.lupulina         -0.14999113  0.2659224 -0.16428852  1.25791922
## Myosotis.arvensis          0.32388542  0.8867765  0.62497725 -2.10166559
## Ononis.repens              0.68816670  1.8676636  0.57458048 -3.15496628
## Pillosella.officinarum    -0.63005543 -0.1744372  1.67056970  0.29508742
## Plantago.coronopus         2.41445838 -1.7261350  0.16509219  0.02921254
## Plantago.lanceolata       -0.11118545  0.7760872  0.13901858 -1.53120278
## Pseudoscleropidum.purum    1.26647679 -0.6112834  0.29435282 -0.97431202
## Rhytidadelphus.squarrosus -0.02710055  0.3250595  0.22355141 -1.42552022
## Taraxacum.agg.             0.17404653  0.8722031 -0.07168349  0.88224152
## Thymus.polytrichus        -0.62903152 -0.1603932 -0.40066206  0.27255158
## Trichostomum.crispulum    -0.99587386 -0.9714288 -1.84764902 -0.51315929
## Trifolium.campestre        2.78627371 -2.1170901  0.13902509  0.32569124
## Trifolium.dubium          -0.85711750 -0.3187554  0.73823585  0.37870712
## Trifolium.repens           0.70197267  1.9144914  0.58018924 -3.19668010
## Urtica.diocia              0.25327885  0.3925877  0.39790464 -1.84098085
##                                  CCA5        CCA6
## Alopercus.pratensis        2.23753647 -2.73079659
## Arrhenatherum.elatius      0.39151162 -1.93124381
## Avenula.pratensis          2.23753647 -2.73079659
## Bellis.perennis            2.36187593 -0.19603802
## Brachythecium.mildeanum    0.05140906 -0.77970802
## Bryum.c.f..pallescens     -0.30152871 -0.74573425
## Bryum.spp.                -1.85436517 -0.70523196
## Calliergonella.cupsidata  -1.53960351 -0.86104462
## Carex.distans              0.79461657  0.10594407
## Carex.flacca              -1.85436517 -0.70523196
## Carlina.vulgaris           0.20674996 -0.49095930
## Centaurium.pulchellum      0.05140906 -0.77970802
## Cerastium.fontanum         0.39151162 -1.93124381
## Dicranella.spp.           -1.13317712  0.67687722
## Euphrasia.agg              0.39151162 -1.93124381
## Festuca.ovina             -0.57422053  0.23471256
## Fissidens.dubius          -1.85436517 -0.70523196
## Fissidens.exilis          -1.13317712  0.67687722
## Galium.saxatile           -0.98632494  2.45820246
## Holcus.spp.               -0.03668418  0.24977834
## Holcus.lanatus             1.29419989  1.34096433
## Homalothecium.lutescens   -0.79668603  2.15296723
## Hypnum.cupressiforme      -0.03540532 -0.01756412
## Linum.catharticum          0.39151162 -1.93124381
## Lotus.corniculatus         2.13074333  1.88461900
## Lysimachia.maritima        0.05140906 -0.77970802
## Medicago.lupulina          2.47491179  2.10828794
## Myosotis.arvensis          0.16562703  0.33850867
## Ononis.repens              2.13834073 -2.57113508
## Pillosella.officinarum    -1.01774072  0.11864224
## Plantago.coronopus        -0.10995452 -0.32004552
## Plantago.lanceolata        1.31452405 -2.33102020
## Pseudoscleropidum.purum   -0.57123134  1.16303827
## Rhytidadelphus.squarrosus -0.31747302  0.78935357
## Taraxacum.agg.             0.21705445  1.03859562
## Thymus.polytrichus         0.95251835 -0.45952861
## Trichostomum.crispulum    -0.59505168 -0.24363609
## Trifolium.campestre        0.05140906 -0.77970802
## Trifolium.dubium          -0.28353711 -1.16053071
## Trifolium.repens           2.23753647 -2.73079659
## Urtica.diocia             -0.98632494  2.45820246
## attr(,"na.action")
##               Agrostis.spp.             Agrostis.canina 
##                           1                           2 
##           Alchemilla.mollis         Angelica.sylvestris 
##                           3                           5 
##       Anthoxanthum.odoratum        Anthyllis.vulneraria 
##                           6                           7 
##            Aphanes.arvensis          Atrichum.undulatum 
##                           8                          10 
##            Betula.pubescens      Blackstonia.perfoliata 
##                          13                          14 
##      Brachythecium.albicans     Brachythecium.glareosum 
##                          15                          16 
##     Brachythecium.rutabulum                 Briza.media 
##                          18                          19 
##           Bromus.hordeaceus     Bryum.c.f..caespiticium 
##                          20                          21 
##             Bryum.capillare           Calypogeia.arguta 
##                          23                          26 
##      Campanula.rotundifolia               Carex.panicea 
##                          27                          30 
##             Centaurea.nigra        Centaurium.erythraea 
##                          32                          33 
##        Centaurium.littorale  Chamaenerion.angustifolium 
##                          34                          37 
##      Cirriphyllum.piliferum             Cirsium.arvense 
##                          38                          39 
##            Cirsium.palustre           Crepis.capillaris 
##                          40                          41 
##         Cynosurus.cristatus          Dactylis.glomerata 
##                          42                          43 
##        Dactylorhiza.fuchsii         Danthonia.decumbens 
##                          44                          45 
##              Daucus.carrota          Dicranum.scoparium 
##                          46                          48 
##          Epilobium.montanum           Equisetum.arvense 
##                          49                          50 
##        Equisteum.variegatum               Erigeron.acer 
##                          51                          52 
##               Festuca.rubra          Festuca.rubra.agg. 
##                          55                          56 
##         Filipendula.ulmaria      Fissidens.adianthoides 
##                          57                          58 
##              Fragaria.vesca              Galium.aparine 
##                          61                          62 
##              Galium.arvense                Galium.verum 
##                          63                          65 
##                Geum.urbanum          Glechoma.hederacea 
##                          66                          67 
##          Helicotrichon.spp.       Heracleum.sphondylium 
##                          68                          69 
##              Hieracium.spp.               Holcus.mollis 
##                          70                          73 
##        Hylocomium.splendens        Hypericum.perforatum 
##                          75                          76 
##             Hypnum.imponens          Hypnum.jutlandicum 
##                          78                          79 
##        Hypochaeris.radicata        Kindbergia.praelonga 
##                          80                          81 
##          Lathyrus.pratensis          Leontodon.hispidus 
##                          82                          83 
##         Leontodon.saxatilis        Leucanthemum.vulgare 
##                          84                          85 
##              Lolium.perenne        Lophocolea.semiteres 
##                          87                          88 
##           Luzula.multiflora           Oxalis.acetosella 
##                          90                          95 
##            Pastinaca.sativa   Pentaglottis.sempervirens 
##                          96                          97 
##        Pleurozium.schreberi                   Poa.annua 
##                         101                         102 
##                    Poa.spp.         Polytrichum.commune 
##                         103                         104 
##    Polytrichum.commune.agg.        Polytrichum.formosum 
##                         105                         106 
##          Potentilla.reptans           Prunella.vulgaris 
##                         107                         108 
##         Pteridium.aquilinum            Ranunculus.acris 
##                         110                         111 
##      Ranunculus.parviflorus           Ranunculus.repens 
##                         112                         113 
##                Reseda.lutea            Rhinanthus.minor 
##                         114                         115 
##        Rhizomnium.punctatum   Rhytidadelphus.triquetris 
##                         116                         118 
##            Rubus.fruticosus Sanguisorba.minor.spp.minor 
##                         119                         120 
##            Saniona.uncinata              Sedum.anglicum 
##                         121                         122 
##            Senecio.jacobaea            Senecio.vulgaris 
##                         123                         124 
##            Sonchus.arvensis           Stachys.sylvatica 
##                         125                         126 
##           Stellaria.apetala       Thuidium.tamariscinum 
##                         127                         129 
##          Trifolium.pratense         Trisetum.flavescens 
##                         134                         136 
##           Tussilago.farfara        Veronica.officinalis 
##                         137                         139 
##                Vicia.sativa             Viola.riviniana 
##                         140                         141 
##         Weissia.controversa           Zygodon.stirtonii 
##                         142                         143 
## attr(,"class")
## [1] "exclude"
#The "v values" show the positions of individual species on the graph, with the CCA1 value
#representing the x axis and the CCA2 value representing the y axis, in the case of the
#graph created in R.

plot(CarnforthCCA2, xlim = c(-5, 5), ylim = c(-5, 5)) 

#Increasing the xlim and ylim to give more room for writing on graph

plot(CarnforthCCA2, choices = c(1,2), display = c("wa", "bp"), xlim = c(-4, 3),
     ylim = c(-3, 2))

#Increasing the xlim and ylim to give more room for writing on graph Note that Community
#1 and Community 2 are grouped/clustered together in this CCA plot.

points(x = 0.70197267, y = 1.9144914, pch = 15, col = "black")

#This point represents Alopercus pratensis

text('A. pratensis', x = 0.70197267, y = 1.9144914, cex = 0.88, pos = 2, col = "black")

#Adding text to this point.

points(x = -0.63005543, y = -0.1744372, pch = 15, col = "black")

#This point represents Pilosella officinarum

text('P. officinarum', x = -0.63005543, y = -0.1744372, cex = 0.88, pos = 2, col = "black")

#Adding text to this point

points(x = 2.78627371 , y = -2.1170901, pch = 15, col = "black")

#This point represents Centaurium pulchellum

text('C. pulchellum', x = 2.78627371, y = -2.1170901, cex = 0.88, pos = 2, col = "black")

#Adding text to this point

points(x = -1.03489039, y = -1.3036717, pch = 15, col = "black")

#This point represents Fissidens exilis

text('F. exilis', x = -1.03489039, y = -1.3036717, cex = 0.88, pos = 2, col = "black")

#Adding text to this point

points(x = 0.27967260, y = 0.4821115, pch = 15, col = "black")

#This point represents Homalothecium lutescens

text('H. lutescens', x = 0.27967260, y = 0.4821115, cex = 0.88, pos = 2, col = "black")

#Adding text to this point

##Hodbarrow Data##

HodbarrowPS <- read.csv("HodbarrowPlantSpecies.csv",  header = TRUE, colClasses = c("numeric"))

HodbarrowPC <-read.csv("HODBARROW_PLANT_CHEMISTRY_MG_KG.csv", header = TRUE, 
                       colClasses = c("numeric"))

head(HodbarrowPS)
##   Agrostis.spp. Agrostis.canina Alchemilla.mollis Alopercus.pratensis
## 1             0               0                 0                   0
## 2             0               0                 0                   0
## 3             0               0                 0                   0
## 4             0               0                 0                   0
## 5             0               0                 0                   0
## 6             0               0                 0                   0
##   Angelica.sylvestris Anthoxanthum.odoratum Anthyllis.vulneraria
## 1                   0                     0                    0
## 2                   0                     0                   70
## 3                   0                     0                  189
## 4                   0                     7                    0
## 5                   0                     0                    0
## 6                   0                     0                    0
##   Aphanes.arvensis Arrhenatherum.elatius Atrichum.undulatum Avenula.pratensis
## 1                0                     0                  0                 0
## 2                0                     0                  0                 0
## 3                0                     0                  0                 0
## 4                0                     0                  0                 0
## 5                0                     0                  0                 0
## 6                0                     0                  0                 0
##   Bellis.perennis Betula.pubescens Blackstonia.perfoliata
## 1               0                0                      0
## 2               0                0                      0
## 3               1                0                      0
## 4               0                0                      0
## 5               0                0                      0
## 6               0                0                      0
##   Brachythecium.albicans Brachythecium.glareosum Brachythecium.mildeanum
## 1                      0                       0                       0
## 2                      0                       0                       0
## 3                      0                       0                       0
## 4                      0                       0                       0
## 5                      0                       0                       0
## 6                      0                       0                       0
##   Brachythecium.rutabulum Briza.media Bromus.hordeaceus Bryum.c.f..caespiticium
## 1                       0           0                 0                       0
## 2                       0           0                 0                       0
## 3                       0           0                 0                       0
## 4                       0           0                 0                       0
## 5                       0           0                 0                       0
## 6                       0           0                 0                       0
##   Bryum.c.f..pallescens Bryum.capillare Bryum.spp. Calliergonella.cupsidata
## 1                     0               0          0                        0
## 2                     0               0          0                        0
## 3                     0               0         60                        0
## 4                     0               0          0                        0
## 5                     0               0          0                        0
## 6                     0               0          0                        0
##   Calypogeia.arguta Campanula.rotundifolia Carex.distans Carex.flacca
## 1                 0                      0             0            0
## 2                 0                      0             0            0
## 3                 0                      0             0            0
## 4                 0                     42             0            0
## 5                 0                      0             0            3
## 6                 0                      0             0            0
##   Carex.panicea Carlina.vulgaris Centaurea.nigra Centaurium.erythraea
## 1             0                0               0                    0
## 2             0                0               0                    0
## 3             1                0               0                    0
## 4             0                3               0                    0
## 5             0                2               1                    0
## 6             0                1               0                    0
##   Centaurium.littorale Centaurium.pulchellum Cerastium.fontanum
## 1                    0                     0                  0
## 2                    4                     0                  0
## 3                    0                     0                  0
## 4                    4                     0                  1
## 5                    5                     0                  0
## 6                    0                     0                  0
##   Chamaenerion.angustifolium Cirriphyllum.piliferum Cirsium.arvense
## 1                          0                      0               0
## 2                          0                      0               0
## 3                          0                      0               0
## 4                          0                      0               0
## 5                          0                      0               0
## 6                          0                      0               0
##   Cirsium.palustre Crepis.capillaris Cynosurus.cristatus Dactylis.glomerata
## 1                0                 0                   0                  0
## 2                0                 0                   0                  0
## 3                0                 0                   0                  0
## 4                0                 0                   0                  0
## 5                0                 0                   0                  0
## 6                0                 0                   0                  0
##   Dactylorhiza.fuchsii Danthonia.decumbens Daucus.carrota Dicranella.spp.
## 1                    0                   0              0               0
## 2                    0                   0              0               0
## 3                    0                   0              0               0
## 4                    0                   0              0               0
## 5                    0                   0              0               0
## 6                    0                   0              0               0
##   Dicranum.scoparium Epilobium.montanum Equisetum.arvense Equisteum.variegatum
## 1                  0                  0                 0                    0
## 2                  0                  0                 0                    0
## 3                  0                  0                 0                    0
## 4                  0                  0                10                   31
## 5                  0                  0                 0                    0
## 6                  0                  0                 0                    0
##   Erigeron.acer Euphrasia.agg Festuca.ovina Festuca.rubra Festuca.rubra.agg.
## 1             0             0             0            10                  0
## 2             0             0             0             0                  0
## 3             0             0             0             4                  0
## 4             0             0             0             2                  0
## 5             0            36             0            44                  0
## 6             0             0             0             0                  0
##   Filipendula.ulmaria Fissidens.adianthoides Fissidens.dubius Fissidens.exilis
## 1                   0                      0                0                0
## 2                   0                      0                0                0
## 3                   0                      0                0                0
## 4                   0                      0                0                0
## 5                   0                      0                0                0
## 6                   0                      0                0                0
##   Fragaria.vesca Galium.aparine Galium.arvense Galium.saxatile Galium.verum
## 1              0              0              0               0            0
## 2              0              0              0               0            0
## 3              0              0              0               0            0
## 4              0              0              0               0            0
## 5              0              0              0               0            0
## 6              0              0              0               0            0
##   Geum.urbanum Glechoma.hederacea Helicotrichon.spp. Heracleum.sphondylium
## 1            0                  0                  0                     0
## 2            0                  0                  0                     0
## 3            0                  0                  0                     0
## 4            0                  0                  0                     0
## 5            0                  0                  0                     0
## 6            0                  0                  0                     0
##   Hieracium.spp. Holcus.spp. Holcus.lanatus Holcus.mollis
## 1              0          47              0             0
## 2              0           0              0             0
## 3              0           0              0             0
## 4              0           0             18             0
## 5              0          23              0             0
## 6              0          78              0             0
##   Homalothecium.lutescens Hylocomium.splendens Hypericum.perforatum
## 1                       0                    0                    0
## 2                       0                    0                    0
## 3                       0                    0                    0
## 4                       0                    0                    0
## 5                       0                    0                    0
## 6                       0                    0                    0
##   Hypnum.cupressiforme Hypnum.imponens Hypnum.jutlandicum Hypochaeris.radicata
## 1                    0               0                  0                    0
## 2                    0               0                  0                    0
## 3                    0               0                  0                    0
## 4                  160               0                  0                    0
## 5                    0               0                  0                    0
## 6                    0               0                  0                    0
##   Kindbergia.praelonga Lathyrus.pratensis Leontodon.hispidus
## 1                    0                  0                  0
## 2                    0                  0                  0
## 3                    0                  0                  0
## 4                    0                  0                  0
## 5                    0                  0                 16
## 6                    0                  0                  2
##   Leontodon.saxatilis Leucanthemum.vulgare Linum.catharticum Lolium.perenne
## 1                   0                    2                 0              0
## 2                   0                    0                 2              0
## 3                   0                    2                 0              0
## 4                   0                    1                 0              0
## 5                   0                    6                 1              0
## 6                   0                    0                 6              0
##   Lophocolea.semiteres Lotus.corniculatus Luzula.multiflora Lysimachia.maritima
## 1                    0                  0                 0                   2
## 2                    0                  0                 0                   0
## 3                    0                  0                 0                   0
## 4                    0                  0                 0                   0
## 5                    0                 57                 0                   0
## 6                    0                  0                 0                   0
##   Medicago.lupulina Myosotis.arvensis Ononis.repens Oxalis.acetosella
## 1                 0                 0             0                 0
## 2                 0                 0             5                 0
## 3                 0                 0             1                 0
## 4                91                 0           111                 0
## 5                 0                 0             2                 0
## 6                 0                 0             0                 0
##   Pastinaca.sativa Pentaglottis.sempervirens Pillosella.officinarum
## 1                0                         0                      2
## 2                0                         0                      0
## 3                0                         0                      0
## 4                0                         0                     91
## 5                0                         0                     39
## 6                0                         0                      0
##   Plantago.coronopus Plantago.lanceolata Pleurozium.schreberi Poa.annua
## 1                  0                   0                    0         0
## 2                  0                   0                    0        69
## 3                  0                   0                    0        46
## 4                  0                   5                    0         0
## 5                 50                  20                    0        55
## 6                  0                   0                    0         0
##   Poa.spp. Polytrichum.commune Polytrichum.commune.agg. Polytrichum.formosum
## 1        0                   0                        0                    0
## 2        0                   0                        0                    0
## 3        0                   0                        0                    0
## 4        0                   0                        0                    0
## 5        0                   0                        0                    0
## 6        0                   0                        0                    0
##   Potentilla.reptans Prunella.vulgaris Pseudoscleropidum.purum
## 1                  0                 0                       0
## 2                  0                 0                       0
## 3                  0                 0                       0
## 4                  0                 0                       0
## 5                  0                 0                       0
## 6                  0                 0                       0
##   Pteridium.aquilinum Ranunculus.acris Ranunculus.parviflorus Ranunculus.repens
## 1                   0                0                      0                 0
## 2                   0                0                      0                 0
## 3                   0                0                      0                 0
## 4                   0                0                      0                 0
## 5                   0                0                      0                 0
## 6                   0                0                      0                 0
##   Reseda.lutea Rhinanthus.minor Rhizomnium.punctatum Rhytidadelphus.squarrosus
## 1            0                0                    0                         0
## 2            0                0                    0                         0
## 3            0                0                    0                         0
## 4            0                0                    0                         0
## 5            0                0                    0                         0
## 6            0                0                    0                         0
##   Rhytidadelphus.triquetris Rubus.fruticosus Sanguisorba.minor.spp.minor
## 1                         0                0                           0
## 2                         0                0                           0
## 3                         0                0                           0
## 4                         0                0                           0
## 5                         0                0                           0
## 6                         0                0                           0
##   Saniona.uncinata Sedum.anglicum Senecio.jacobaea Senecio.vulgaris
## 1                0              0                0                0
## 2                0              0                0                0
## 3                0              0                0                0
## 4                0              0                0                0
## 5                0              0                0                0
## 6                0              0                0                0
##   Sonchus.arvensis Stachys.sylvatica Stellaria.apetala Taraxacum.agg.
## 1                0                 0                 0              0
## 2                0                 0                 0              0
## 3                0                 0                 0              0
## 4                0                 0                 0              0
## 5                0                 0                 0              0
## 6                0                 0                 0              2
##   Thuidium.tamariscinum Thymus.polytrichus Trichostomum.crispulum
## 1                     0                  0                    150
## 2                     0                216                     30
## 3                     0                253                     60
## 4                     0                  0                      0
## 5                     0                  0                     70
## 6                     0                  7                      0
##   Trifolium.campestre Trifolium.dubium Trifolium.pratense Trifolium.repens
## 1                   0                0                  0                0
## 2                   0                0                  0                0
## 3                   0                0                  0                0
## 4                   0                0                  0                0
## 5                   0                0                  0                0
## 6                   0                0                  0                0
##   Trisetum.flavescens Tussilago.farfara Urtica.diocia Veronica.officinalis
## 1                   0                 0             0                    0
## 2                   0                 0             0                    0
## 3                   0                 0             0                    0
## 4                   0                 0             0                    0
## 5                   0                 3             0                    0
## 6                   0                 0             0                    0
##   Vicia.sativa Viola.riviniana Weissia.controversa Zygodon.stirtonii
## 1            0               0                   0                 0
## 2            0               0                   0                 0
## 3            0               0                   0                 0
## 4            0               0                   0                 0
## 5            0               0                   0                 0
## 6            0               0                   0                10
head(HodbarrowPC)
##       pH     SiO2    Al2O3     Fe2O3       CaO       MgO      Na2O       K2O
## 1 10.660 153318.7 46679.88  7833.566 265864.97 14111.040  2077.199  4067.724
## 2  8.381 324399.8 36782.90 26648.112  18867.84  5487.627  6379.969 14278.542
## 3  8.873 324399.8 37947.25 30005.354  27086.78  6754.002  6899.269 14029.497
## 4  8.806 284667.9 52660.41 25039.433  45096.99 13930.129 13353.424 14444.571
## 5 10.346 203334.2 43980.70 14128.395 162234.80  8201.288  8605.540  8052.433
## 6  9.966 134153.8 47579.61  7413.910 260862.13 12603.450  1854.642  2739.488
##       Cr2O3     TiO2       MnO      P2O5       SrO       BaO   LOI   Ag As  B
## 1  13.68405 1258.620 1781.2522  199.9742 338.23782 4746.9523 15.05 0.30  6 70
## 2  68.42024 2697.043  774.4575  999.8709  84.55946  716.5211 11.80 0.20 16 10
## 3  68.42024 2816.912  929.3490  999.8709  84.55946  716.5211  9.88 0.20 19 10
## 4 109.47239 3056.649  929.3490 1699.7805 169.11891 1343.4771 11.55 0.15  7 10
## 5  20.52607 1138.752 1239.1320  699.9096 169.11891 2866.0844 17.55 0.40 10 40
## 6  13.68405 1258.620 1471.4692  199.9742 253.67837 3134.7798 22.00 0.30  6 30
##     Be  Bi   Cd Co Cu Ga  Hg La Li  Mo Ni Pb    S  Sb Sc Th Tl U  V W Zn
## 1 11.4 1.5 0.25  1 17  5 0.5 40 80 0.5  5 74 7400 3.0 10 10  5 5  6 5 73
## 2  1.8 1.5 0.25  5 14  5 0.5 10 20 1.0 13 39  700 5.0  2 10  5 5 18 5 61
## 3  2.0 1.5 0.25  6 18  5 0.5 10 20 1.0 13 51  700 6.0  3 10  5 5 19 5 74
## 4  1.9 1.5 0.25 10 24 10 0.5 20 30 0.5 33 16 1100 1.5  3 10  5 5 31 5 46
## 5  6.8 1.5 0.25  2 22  5 0.5 20 40 0.5  6 56 5300 4.0  6 10  5 5  7 5 58
## 6 11.6 1.5 0.25  1 18  5 0.5 50 60 0.5  4 41 3500 3.0 12 10  5 5  4 5 51
##   Akermanite Albite Aluminium.oxide.hydroxide Anhydrite Aragonite Biotite
## 1          0      0                         0         0         0       0
## 2          0      0                         0         0         0       0
## 3          0      0                         0         0         0       0
## 4          0      1                         0         0         0       0
## 5          0      0                         0         0         0       0
## 6          0      0                         0         0         0       0
##   Birnessite Calcite Clinochlore Cuspidine Diaspore Dickite Gehlenite Goethite
## 1          0       1           0         0        0       0         1        0
## 2          0       0           0         0        0       0         0        0
## 3          0       0           0         0        0       0         0        0
## 4          0       0           0         0        0       0         0        0
## 5          0       1           0         1        0       0         1        0
## 6          0       1           0         0        0       1         0        0
##   Haematite Illite Kaolinite Langite Linnaeite Magnesioferrite Melilite
## 1         0      0         0       0         0               0        0
## 2         0      0         0       0         0               0        0
## 3         0      0         0       0         0               0        0
## 4         0      0         0       0         0               0        0
## 5         0      0         0       0         0               0        0
## 6         0      0         0       0         1               0        0
##   Merwinite Microcline Mullite Muscovite Orthoclase Orthopyroxene Periclase
## 1         0          0       0         0          0             0         0
## 2         0          0       0         0          0             1         0
## 3         0          0       0         0          0             0         0
## 4         0          0       0         0          1             0         0
## 5         0          0       0         0          0             0         0
## 6         0          0       0         0          0             0         0
##   Phengite Pseudowollastonite Quartz Staurolite Valentinite
## 1        0                  0      1          0           0
## 2        0                  0      1          0           0
## 3        0                  0      1          0           1
## 4        0                  0      1          0           0
## 5        0                  0      1          0           0
## 6        0                  0      0          0           0
rowSums(HodbarrowPS)
## [1] 213 396 617 577 433 106 216
#Again, ANOSIMs will be carried out to see if there are any statistically significant
#differences between plants in different concentrations of elements.

anoHSiO2 <- anosim(HodbarrowPS, HodbarrowPC$SiO2, distance = "bray", permutations = 9999)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
anoHSiO2
## 
## Call:
## anosim(x = HodbarrowPS, grouping = HodbarrowPC$SiO2, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R:     1 
##       Significance: 0.047619 
## 
## Permutation: free
## Number of permutations: 5039
#This ANOSIM has a high ANOSIM statistic of 1 and a low p value of 0.047619, showing that
#there are statistically significant differences between plants in different silicon
#concentrations on the Hodbarrow site.

#anoHAl2O3 <- anosim(HodbarrowPS, HodbarrowPC$Al2O3, distance = "bray", permutations = 9999)

#When this ANOSIM is run, the error message: "there should be replicates within groups"
#comes up. This error message comes up for another substrate variables for the Hodbarrow
#data. From now on, only variables that were tested successfully will be included.

anoHCr2O3 <- anosim(HodbarrowPS, HodbarrowPC$Cr2O3, distance = "bray", permutations = 9999)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
anoHCr2O3
## 
## Call:
## anosim(x = HodbarrowPS, grouping = HodbarrowPC$Cr2O3, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.963 
##       Significance: 0.0095238 
## 
## Permutation: free
## Number of permutations: 5039
#This ANOSIM has a high R statistic of 0.963 and a low p value of 0.0095238. This shows that
#there are significant differences between plants growing in different concentrations of
#Cr2O3.

anoHTiO2 <- anosim(HodbarrowPS, HodbarrowPC$TiO2, distance = "bray", permutations = 9999)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
anoHTiO2
## 
## Call:
## anosim(x = HodbarrowPS, grouping = HodbarrowPC$TiO2, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R:   0.7 
##       Significance: 0.19048 
## 
## Permutation: free
## Number of permutations: 5039
anoHMnO <- anosim(HodbarrowPS, HodbarrowPC$MnO, distance = "bray", permutations = 9999)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
anoHMnO
## 
## Call:
## anosim(x = HodbarrowPS, grouping = HodbarrowPC$MnO, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: -0.5263 
##       Significance: 0.91429 
## 
## Permutation: free
## Number of permutations: 5039
anoHP2O5 <- anosim(HodbarrowPS, HodbarrowPC$P2O5, distance = "bray", permutations = 9999)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
anoHP2O5
## 
## Call:
## anosim(x = HodbarrowPS, grouping = HodbarrowPC$P2O5, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.963 
##       Significance: 0.0095238 
## 
## Permutation: free
## Number of permutations: 5039
#This ANOSIM has a high R statistic of 0.963 and a low p value of 0.0095238. There are
#significant differences between plants in different concentrations of P2O5 in
#Hodbarrow.

anoHSrO <- anosim(HodbarrowPS, HodbarrowPC$SrO, distance = "bray", permutations = 9999)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
anoHSrO
## 
## Call:
## anosim(x = HodbarrowPS, grouping = HodbarrowPC$SrO, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.5556 
##       Significance: 0.047619 
## 
## Permutation: free
## Number of permutations: 5039
#This ANOSIM has an R statistic of 0.5556 and a p value of 0.047619. This shows that there
#are significant differences between plants growing in different concentrations of SrO
#in Hodbarrow, although the R statistic indicates that this isn't quite as strong as the
#differences seen in, say, SiO2, or Cr2O3.

anoHBaO <- anosim(HodbarrowPS, HodbarrowPC$BaO, distance = "bray", permutations = 9999)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
anoHBaO
## 
## Call:
## anosim(x = HodbarrowPS, grouping = HodbarrowPC$BaO, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.4737 
##       Significance: 0.15238 
## 
## Permutation: free
## Number of permutations: 5039
anoHAg <- anosim(HodbarrowPS, HodbarrowPC$Ag, distance = "bray", permutations = 9999)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
anoHAg
## 
## Call:
## anosim(x = HodbarrowPS, grouping = HodbarrowPC$Ag, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.8947 
##       Significance: 0.028571 
## 
## Permutation: free
## Number of permutations: 5039
#This ANOSIM has a high R statistic of 0.8947 and a low p value of 0.028571. This 
#demonstrates that plants are significantly different in differing concentrations of Ag
#at Hodbarrow.

anoHAs <- anosim(HodbarrowPS, HodbarrowPC$As, distance = "bray", permutations = 9999)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
anoHAs
## 
## Call:
## anosim(x = HodbarrowPS, grouping = HodbarrowPC$As, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R:   0.7 
##       Significance: 0.19048 
## 
## Permutation: free
## Number of permutations: 5039
anoHB <- anosim(HodbarrowPS, HodbarrowPC$B, distance = "bray", permutations = 9999)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
anoHB
## 
## Call:
## anosim(x = HodbarrowPS, grouping = HodbarrowPC$B, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: -0.1481 
##       Significance: 0.57143 
## 
## Permutation: free
## Number of permutations: 5039
anoHCo <- anosim(HodbarrowPS, HodbarrowPC$Co, distance = "bray", permutations = 9999)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
anoHCo
## 
## Call:
## anosim(x = HodbarrowPS, grouping = HodbarrowPC$Co, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.8421 
##       Significance: 0.038095 
## 
## Permutation: free
## Number of permutations: 5039
#This ANOSIM has a high R statistic of 0.8421 and a low p value of 0.038095. This
#demonstrates that plants are significantly different in differing concentrations of Co at
#Hodbarrow.

anoHCu <- anosim(HodbarrowPS, HodbarrowPC$Cu, distance = "bray", permutations = 9999)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
anoHCu
## 
## Call:
## anosim(x = HodbarrowPS, grouping = HodbarrowPC$Cu, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R:  -0.4 
##       Significance: 0.71429 
## 
## Permutation: free
## Number of permutations: 5039
anoHNi <- anosim(HodbarrowPS, HodbarrowPC$Ni, distance = "bray", permutations = 9999)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
anoHNi
## 
## Call:
## anosim(x = HodbarrowPS, grouping = HodbarrowPC$Ni, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R:     1 
##       Significance: 0.047619 
## 
## Permutation: free
## Number of permutations: 5039
#This ANOSIM has a high R statistic of 1 and a low p value of 0.047619. This demonstrates
#significant differences between plants growing in different concentrations of Ni at
#Hodbarrow.

anoHS <- anosim(HodbarrowPS, HodbarrowPC$S, distance = "bray", permutations = 9999)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
anoHS
## 
## Call:
## anosim(x = HodbarrowPS, grouping = HodbarrowPC$S, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R:     1 
##       Significance: 0.047619 
## 
## Permutation: free
## Number of permutations: 5039
#With a high R statistic of 1 and a low p value of 0.047619, this ANOSIM shows that there
#are significant differences between plants growing in different concentraitons of S at
#Hodbarrow.

anoHSb <- anosim(HodbarrowPS, HodbarrowPC$Sb, distance = "bray", permutations = 9999)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
anoHSb
## 
## Call:
## anosim(x = HodbarrowPS, grouping = HodbarrowPC$Sb, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R: 0.8421 
##       Significance: 0.038095 
## 
## Permutation: free
## Number of permutations: 5039
#This ANOSIM has a high R statistic of 0.8421 and a low p value of 0.038095, showing that
#plants significantly differ in different concentrations of Sb at Hodbarrow.

anoHSc <- anosim(HodbarrowPS, HodbarrowPC$Sc, distance = "bray", permutations = 9999)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
anoHSc
## 
## Call:
## anosim(x = HodbarrowPS, grouping = HodbarrowPC$Sc, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R:  -0.9 
##       Significance: 0.95238 
## 
## Permutation: free
## Number of permutations: 5039
anoHTi <- anosim(HodbarrowPS, HodbarrowPC$Ti, distance = "bray", permutations = 9999)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
anoHTi
## 
## Call:
## anosim(x = HodbarrowPS, grouping = HodbarrowPC$Ti, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R:   0.7 
##       Significance: 0.19048 
## 
## Permutation: free
## Number of permutations: 5039
anoHV <- anosim(HodbarrowPS, HodbarrowPC$V, distance = "bray", permutations = 9999)
## 'nperm' >= set of all permutations: complete enumeration.
## Set of permutations < 'minperm'. Generating entire set.
anoHV
## 
## Call:
## anosim(x = HodbarrowPS, grouping = HodbarrowPC$V, permutations = 9999,      distance = "bray") 
## Dissimilarity: bray 
## 
## ANOSIM statistic R:   0.9 
##       Significance: 0.095238 
## 
## Permutation: free
## Number of permutations: 5039
#After carrying ANOSIMs for all of the geochemical variables, several of them demonstrated
#significant differences in terms of their relation to plant growth. CCA plots will better
#represent the data than NMDS plots, so some will be generated now to find the most
#appropriate CCA for the data.
HodbarrowCCA <- cca(HodbarrowPS, HodbarrowPC)
## 
## Some constraints or conditions were aliased because they were redundant. This
## can happen if terms are linearly dependent (collinear): 'Na2O', 'K2O', 'Cr2O3',
## 'TiO2', 'MnO', 'P2O5', 'SrO', 'BaO', 'LOI', 'Ag', 'As', 'B', 'Be', 'Bi', 'Cd',
## 'Co', 'Cu', 'Ga', 'Hg', 'La', 'Li', 'Mo', 'Ni', 'Pb', 'S', 'Sb', 'Sc', 'Th',
## 'Tl', 'U', 'V', 'W', 'Zn', 'Akermanite', 'Albite', 'Aluminium.oxide.hydroxide',
## 'Anhydrite', 'Aragonite', 'Biotite', 'Birnessite', 'Calcite', 'Clinochlore',
## 'Cuspidine', 'Diaspore', 'Dickite', 'Gehlenite', 'Goethite', 'Haematite',
## 'Illite', 'Kaolinite', 'Langite', 'Linnaeite', 'Magnesioferrite', 'Melilite',
## 'Merwinite', 'Microcline', 'Mullite', 'Muscovite', 'Orthoclase',
## 'Orthopyroxene', 'Periclase', 'Phengite', 'Pseudowollastonite', 'Quartz',
## 'Staurolite', 'Valentinite'
## 
## The model is overfitted with no unconstrained (residual) component
print(HodbarrowCCA)
## Call: cca(X = HodbarrowPS, Y = HodbarrowPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total           2.811      1.000     
## Constrained     2.811      1.000    6
## Unconstrained   0.000      0.000    0
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## Some constraints or conditions were aliased because they were redundant.
## This can happen if terms are linearly dependent (collinear): 'Na2O', 'K2O',
## 'Cr2O3', 'TiO2', 'MnO', 'P2O5', 'SrO', 'BaO', 'LOI', 'Ag', 'As', 'B', 'Be',
## 'Bi', 'Cd', 'Co', 'Cu', 'Ga', 'Hg', 'La', 'Li', 'Mo', 'Ni', 'Pb', 'S',
## 'Sb', 'Sc', 'Th', 'Tl', 'U', 'V', 'W', 'Zn', 'Akermanite', 'Albite',
## 'Aluminium.oxide.hydroxide', 'Anhydrite', 'Aragonite', 'Biotite',
## 'Birnessite', 'Calcite', 'Clinochlore', 'Cuspidine', 'Diaspore', 'Dickite',
## 'Gehlenite', 'Goethite', 'Haematite', 'Illite', 'Kaolinite', 'Langite',
## 'Linnaeite', 'Magnesioferrite', 'Melilite', 'Merwinite', 'Microcline',
## 'Mullite', 'Muscovite', 'Orthoclase', 'Orthopyroxene', 'Periclase',
## 'Phengite', 'Pseudowollastonite', 'Quartz', 'Staurolite', 'Valentinite'
## 
## The model is overfitted with no unconstrained (residual) component.
## 
## 106 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4   CCA5   CCA6 
## 0.9051 0.7597 0.5296 0.3423 0.1971 0.0769
plot(HodbarrowCCA)

HodbarrowCCA1 <- cca(HodbarrowPS ~ CaO + Al2O3 + SiO2,
                     data = HodbarrowPC)

print(HodbarrowCCA1)
## Call: cca(formula = HodbarrowPS ~ CaO + Al2O3 + SiO2, data = HodbarrowPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total          2.8108     1.0000     
## Constrained    2.1059     0.7492    3
## Unconstrained  0.7048     0.2508    3
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 106 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3 
## 0.9009 0.7536 0.4514 
## 
## Eigenvalues for unconstrained axes:
##    CA1    CA2    CA3 
## 0.4050 0.2115 0.0883
plot(HodbarrowCCA1)

anova(HodbarrowCCA1)
## Set of permutations < 'minperm'. Generating entire set.
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 5039
## 
## Model: cca(formula = HodbarrowPS ~ CaO + Al2O3 + SiO2, data = HodbarrowPC)
##          Df ChiSquare      F Pr(>F)    
## Model     3   2.10594 2.9878  0.001 ***
## Residual  3   0.70484                  
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#High F statistic of 2.9878 and low p value of 0.001.

#With such a high F statistic, it may be tempting to say that this is the most suitable #CCA, but a few more can be constructed, including with some of the variables that #were shown to be significant in the ANOSIMs.

HodbarrowCCA2 <- cca(HodbarrowPS ~ SiO2 + Cr2O3 + P2O5,
                     data = HodbarrowPC)

print(HodbarrowCCA2)
## Call: cca(formula = HodbarrowPS ~ SiO2 + Cr2O3 + P2O5, data = HodbarrowPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total          2.8108     1.0000     
## Constrained    2.0587     0.7324    3
## Unconstrained  0.7521     0.2676    3
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 106 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3 
## 0.8796 0.7534 0.4257 
## 
## Eigenvalues for unconstrained axes:
##    CA1    CA2    CA3 
## 0.3760 0.2961 0.0800
plot(HodbarrowCCA2)

anova(HodbarrowCCA2)
## Set of permutations < 'minperm'. Generating entire set.
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 5039
## 
## Model: cca(formula = HodbarrowPS ~ SiO2 + Cr2O3 + P2O5, data = HodbarrowPC)
##          Df ChiSquare      F Pr(>F)   
## Model     3   2.05870 2.7373  0.007 **
## Residual  3   0.75208                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#High F statistic of 2.7373 and low p value of 0.003.

HodbarrowCCA3 <- cca(HodbarrowPS ~ SrO + Co + Ni,
                     data = HodbarrowPC)

print(HodbarrowCCA3)
## Call: cca(formula = HodbarrowPS ~ SrO + Co + Ni, data = HodbarrowPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total           2.811      1.000     
## Constrained     1.748      0.622    3
## Unconstrained   1.063      0.378    3
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 106 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3 
## 0.8780 0.6717 0.1984 
## 
## Eigenvalues for unconstrained axes:
##    CA1    CA2    CA3 
## 0.5164 0.3677 0.1785
plot(HodbarrowCCA3)

anova(HodbarrowCCA3)
## Set of permutations < 'minperm'. Generating entire set.
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 5039
## 
## Model: cca(formula = HodbarrowPS ~ SrO + Co + Ni, data = HodbarrowPC)
##          Df ChiSquare      F Pr(>F)  
## Model     3    1.7482 1.6452  0.082 .
## Residual  3    1.0626                
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#F statistic of 1.6452 and p value of 0.05.

HodbarrowCCA3 <- cca(HodbarrowPS ~ SrO + Co + Ni,
                     data = HodbarrowPC)

print(HodbarrowCCA3)
## Call: cca(formula = HodbarrowPS ~ SrO + Co + Ni, data = HodbarrowPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total           2.811      1.000     
## Constrained     1.748      0.622    3
## Unconstrained   1.063      0.378    3
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 106 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3 
## 0.8780 0.6717 0.1984 
## 
## Eigenvalues for unconstrained axes:
##    CA1    CA2    CA3 
## 0.5164 0.3677 0.1785
plot(HodbarrowCCA3)

anova(HodbarrowCCA3)
## Set of permutations < 'minperm'. Generating entire set.
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 5039
## 
## Model: cca(formula = HodbarrowPS ~ SrO + Co + Ni, data = HodbarrowPC)
##          Df ChiSquare      F Pr(>F)  
## Model     3    1.7482 1.6452  0.059 .
## Residual  3    1.0626                
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#F statistic of 1.6452 and p value of 0.053.

HodbarrowCCA4 <- cca(HodbarrowPS ~ S + Sb + Ni,
                     data = HodbarrowPC)

print(HodbarrowCCA4)
## Call: cca(formula = HodbarrowPS ~ S + Sb + Ni, data = HodbarrowPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total          2.8108     1.0000     
## Constrained    1.8699     0.6653    3
## Unconstrained  0.9409     0.3347    3
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 106 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3 
## 0.8873 0.6816 0.3010 
## 
## Eigenvalues for unconstrained axes:
##    CA1    CA2    CA3 
## 0.5717 0.2049 0.1643
plot(HodbarrowCCA4)

anova(HodbarrowCCA4)
## Set of permutations < 'minperm'. Generating entire set.
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 5039
## 
## Model: cca(formula = HodbarrowPS ~ S + Sb + Ni, data = HodbarrowPC)
##          Df ChiSquare      F Pr(>F)  
## Model     3   1.86990 1.9874  0.025 *
## Residual  3   0.94087                
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#High F statistic of 1.9874 and p value of 0.015.

HodbarrowCCA5 <- cca(HodbarrowPS ~ Ag + Al2O3 + As,
                     data = HodbarrowPC)

print(HodbarrowCCA5)
## Call: cca(formula = HodbarrowPS ~ Ag + Al2O3 + As, data = HodbarrowPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total          2.8108     1.0000     
## Constrained    1.8945     0.6740    3
## Unconstrained  0.9163     0.3260    3
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 106 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3 
## 0.8562 0.7281 0.3102 
## 
## Eigenvalues for unconstrained axes:
##    CA1    CA2    CA3 
## 0.4214 0.2884 0.2065
plot(HodbarrowCCA5)

anova(HodbarrowCCA5)
## Set of permutations < 'minperm'. Generating entire set.
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 5039
## 
## Model: cca(formula = HodbarrowPS ~ Ag + Al2O3 + As, data = HodbarrowPC)
##          Df ChiSquare      F Pr(>F)   
## Model     3   1.89445 2.0674  0.008 **
## Residual  3   0.91632                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#High F statistic of 2.0674 and low p value of 0.001.

HodbarrowCCA6 <- cca(HodbarrowPS ~ Ag + Al2O3 + As + SiO2,
                     data = HodbarrowPC)

print(HodbarrowCCA6)
## Call: cca(formula = HodbarrowPS ~ Ag + Al2O3 + As + SiO2, data =
## HodbarrowPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total          2.8108     1.0000     
## Constrained    2.2526     0.8014    4
## Unconstrained  0.5582     0.1986    2
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 106 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4 
## 0.9044 0.7482 0.5126 0.0874 
## 
## Eigenvalues for unconstrained axes:
##    CA1    CA2 
## 0.3508 0.2074
plot(HodbarrowCCA6)

anova(HodbarrowCCA6)
## Set of permutations < 'minperm'. Generating entire set.
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 5039
## 
## Model: cca(formula = HodbarrowPS ~ Ag + Al2O3 + As + SiO2, data = HodbarrowPC)
##          Df ChiSquare      F Pr(>F)  
## Model     4   2.25255 2.0176  0.026 *
## Residual  2   0.55822                
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#High F statistic of 2.0176 and low p value of 0.018.

HodbarrowCCA7 <- cca(HodbarrowPS ~ Ag + SrO + As + Cr2O3,
                     data = HodbarrowPC)

print(HodbarrowCCA7)
## Call: cca(formula = HodbarrowPS ~ Ag + SrO + As + Cr2O3, data =
## HodbarrowPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total          2.8108     1.0000     
## Constrained    2.3134     0.8230    4
## Unconstrained  0.4974     0.1770    2
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 106 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4 
## 0.8793 0.7505 0.4893 0.1942 
## 
## Eigenvalues for unconstrained axes:
##    CA1    CA2 
## 0.3884 0.1090
plot(HodbarrowCCA7)

anova(HodbarrowCCA7)
## Set of permutations < 'minperm'. Generating entire set.
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 5039
## 
## Model: cca(formula = HodbarrowPS ~ Ag + SrO + As + Cr2O3, data = HodbarrowPC)
##          Df ChiSquare      F Pr(>F)  
## Model     4   2.31341 2.3256  0.013 *
## Residual  2   0.49737                
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#High F statistic of 2.3256 and low p value of 0.003.

HodbarrowCCA8 <- cca(HodbarrowPS ~ SiO2 + SrO + As + Cr2O3,
                     data = HodbarrowPC)

print(HodbarrowCCA8)
## Call: cca(formula = HodbarrowPS ~ SiO2 + SrO + As + Cr2O3, data =
## HodbarrowPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total          2.8108     1.0000     
## Constrained    2.1942     0.7807    4
## Unconstrained  0.6165     0.2193    2
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 106 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4 
## 0.8831 0.7572 0.3596 0.1944 
## 
## Eigenvalues for unconstrained axes:
##    CA1    CA2 
## 0.4734 0.1431
plot(HodbarrowCCA8)

anova(HodbarrowCCA8)
## Set of permutations < 'minperm'. Generating entire set.
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 5039
## 
## Model: cca(formula = HodbarrowPS ~ SiO2 + SrO + As + Cr2O3, data = HodbarrowPC)
##          Df ChiSquare      F Pr(>F)  
## Model     4   2.19424 1.7795  0.051 .
## Residual  2   0.61653                
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#F statistic of 1.7795 and p value of 0.024.

HodbarrowCCA9 <- cca(HodbarrowPS ~ Ag + SrO + As + P2O5,
                     data = HodbarrowPC)

print(HodbarrowCCA9)
## Call: cca(formula = HodbarrowPS ~ Ag + SrO + As + P2O5, data = HodbarrowPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total          2.8108     1.0000     
## Constrained    2.3322     0.8297    4
## Unconstrained  0.4786     0.1703    2
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 106 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4 
## 0.8963 0.7483 0.4980 0.1896 
## 
## Eigenvalues for unconstrained axes:
##    CA1    CA2 
## 0.3691 0.1094
plot(HodbarrowCCA9)

anova(HodbarrowCCA9)
## Set of permutations < 'minperm'. Generating entire set.
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 5039
## 
## Model: cca(formula = HodbarrowPS ~ Ag + SrO + As + P2O5, data = HodbarrowPC)
##          Df ChiSquare      F Pr(>F)   
## Model     4   2.33219 2.4366  0.004 **
## Residual  2   0.47858                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#High F statistic of 2.4366 and low p value of 0.005.

HodbarrowCCA10 <- cca(HodbarrowPS ~ Ag + SrO + As + Cr2O3 + SiO2,
                     data = HodbarrowPC)

print(HodbarrowCCA10)
## Call: cca(formula = HodbarrowPS ~ Ag + SrO + As + Cr2O3 + SiO2, data =
## HodbarrowPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total         2.81078    1.00000     
## Constrained   2.58639    0.92017    5
## Unconstrained 0.22438    0.07983    1
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 106 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4   CCA5 
## 0.8831 0.7596 0.5080 0.2421 0.1937 
## 
## Eigenvalues for unconstrained axes:
##     CA1 
## 0.22438
plot(HodbarrowCCA10)

anova(HodbarrowCCA10)
## Set of permutations < 'minperm'. Generating entire set.
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 5039
## 
## Model: cca(formula = HodbarrowPS ~ Ag + SrO + As + Cr2O3 + SiO2, data = HodbarrowPC)
##          Df ChiSquare      F Pr(>F)  
## Model     5   2.58639 2.3054  0.026 *
## Residual  1   0.22438                
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#F statistic of 2.3054 and p value of 0.008.

HodbarrowCCA11 <- cca(HodbarrowPS ~ Cd + Mo + BaO + V + Na2O,
                      data = HodbarrowPC)

print(HodbarrowCCA11)
## Call: cca(formula = HodbarrowPS ~ Cd + Mo + BaO + V + Na2O, data =
## HodbarrowPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total         2.81078    1.00000     
## Constrained   2.72396    0.96911    5
## Unconstrained 0.08682    0.03089    1
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 106 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4   CCA5 
## 0.9037 0.7596 0.5262 0.3394 0.1950 
## 
## Eigenvalues for unconstrained axes:
##     CA1 
## 0.08682
plot(HodbarrowCCA11)

anova(HodbarrowCCA11)
## Set of permutations < 'minperm'. Generating entire set.
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 5039
## 
## Model: cca(formula = HodbarrowPS ~ Cd + Mo + BaO + V + Na2O, data = HodbarrowPC)
##          Df ChiSquare     F Pr(>F)  
## Model     5   2.72396 6.275  0.027 *
## Residual  1   0.08682               
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#Particularly high F statistic of 6.275 and p value of 0.001.

HodbarrowCCA12 <- cca(HodbarrowPS ~ Cr2O3 + Be + BaO + Zn + TiO2,
                      data = HodbarrowPC)

print(HodbarrowCCA12)
## Call: cca(formula = HodbarrowPS ~ Cr2O3 + Be + BaO + Zn + TiO2, data =
## HodbarrowPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total          2.8108     1.0000     
## Constrained    2.5217     0.8971    5
## Unconstrained  0.2891     0.1029    1
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 106 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4   CCA5 
## 0.9047 0.7359 0.5184 0.2112 0.1515 
## 
## Eigenvalues for unconstrained axes:
##     CA1 
## 0.28911
plot(HodbarrowCCA12)

anova(HodbarrowCCA12)
## Set of permutations < 'minperm'. Generating entire set.
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 5039
## 
## Model: cca(formula = HodbarrowPS ~ Cr2O3 + Be + BaO + Zn + TiO2, data = HodbarrowPC)
##          Df ChiSquare      F Pr(>F)  
## Model     5   2.52167 1.7444   0.07 .
## Residual  1   0.28911                
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#F statistic of 1.7444 and p value of 0.053.

HodbarrowCCA13 <- cca(HodbarrowPS ~ Cr2O3 + Be + BaO + SiO2 + TiO2,
                      data = HodbarrowPC)

print(HodbarrowCCA13)
## Call: cca(formula = HodbarrowPS ~ Cr2O3 + Be + BaO + SiO2 + TiO2, data =
## HodbarrowPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total         2.81078    1.00000     
## Constrained   2.72222    0.96850    5
## Unconstrained 0.08855    0.03150    1
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 106 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4   CCA5 
## 0.9031 0.7595 0.5294 0.3337 0.1966 
## 
## Eigenvalues for unconstrained axes:
##     CA1 
## 0.08855
plot(HodbarrowCCA13)

anova(HodbarrowCCA13)
## Set of permutations < 'minperm'. Generating entire set.
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 5039
## 
## Model: cca(formula = HodbarrowPS ~ Cr2O3 + Be + BaO + SiO2 + TiO2, data = HodbarrowPC)
##          Df ChiSquare      F Pr(>F)   
## Model     5   2.72222 6.1483  0.004 **
## Residual  1   0.08855                 
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#High F statistic of 6.1483 and p value of 0.001.

HodbarrowCCA14 <- cca(HodbarrowPS ~ Cr2O3 + SiO2 + BaO + Zn + TiO2,
                      data = HodbarrowPC)

print(HodbarrowCCA14)
## Call: cca(formula = HodbarrowPS ~ Cr2O3 + SiO2 + BaO + Zn + TiO2, data =
## HodbarrowPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total         2.81078    1.00000     
## Constrained   2.63479    0.93739    5
## Unconstrained 0.17598    0.06261    1
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 106 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4   CCA5 
## 0.9045 0.7532 0.4861 0.2961 0.1949 
## 
## Eigenvalues for unconstrained axes:
##     CA1 
## 0.17598
plot(HodbarrowCCA14)

anova(HodbarrowCCA14)
## Set of permutations < 'minperm'. Generating entire set.
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 5039
## 
## Model: cca(formula = HodbarrowPS ~ Cr2O3 + SiO2 + BaO + Zn + TiO2, data = HodbarrowPC)
##          Df ChiSquare      F Pr(>F)  
## Model     5   2.63479 2.9944  0.016 *
## Residual  1   0.17598                
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#High F statistic of 2.9944 and p value of 0.006.

HodbarrowCCA15 <- cca(HodbarrowPS ~ Cr2O3 + SiO2 + BaO + TiO2 + pH,
                      data = HodbarrowPC)

print(HodbarrowCCA15)
## Call: cca(formula = HodbarrowPS ~ Cr2O3 + SiO2 + BaO + TiO2 + pH, data =
## HodbarrowPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total          2.8108     1.0000     
## Constrained    2.5082     0.8924    5
## Unconstrained  0.3026     0.1076    1
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 106 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4   CCA5 
## 0.9035 0.7506 0.3828 0.2748 0.1965 
## 
## Eigenvalues for unconstrained axes:
##     CA1 
## 0.30257
plot(HodbarrowCCA15)

anova(HodbarrowCCA15)
## Set of permutations < 'minperm'. Generating entire set.
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 5039
## 
## Model: cca(formula = HodbarrowPS ~ Cr2O3 + SiO2 + BaO + TiO2 + pH, data = HodbarrowPC)
##          Df ChiSquare      F Pr(>F)  
## Model     5   2.50821 1.6579  0.095 .
## Residual  1   0.30257                
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#F statistic of 1.6579 and p value of 0.052.

HodbarrowCCA16 <- cca(HodbarrowPS ~ Cr2O3 + SiO2 + Be + TiO2 + pH,
                      data = HodbarrowPC)

print(HodbarrowCCA16)
## Call: cca(formula = HodbarrowPS ~ Cr2O3 + SiO2 + Be + TiO2 + pH, data =
## HodbarrowPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total          2.8108     1.0000     
## Constrained    2.5183     0.8959    5
## Unconstrained  0.2925     0.1041    1
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 106 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4   CCA5 
## 0.9050 0.7591 0.4787 0.2668 0.1087 
## 
## Eigenvalues for unconstrained axes:
##     CA1 
## 0.29251
plot(HodbarrowCCA16)

anova(HodbarrowCCA16)
## Set of permutations < 'minperm'. Generating entire set.
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 5039
## 
## Model: cca(formula = HodbarrowPS ~ Cr2O3 + SiO2 + Be + TiO2 + pH, data = HodbarrowPC)
##          Df ChiSquare      F Pr(>F)  
## Model     5   2.51827 1.7218  0.088 .
## Residual  1   0.29251                
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#This CCA has a somewhat high F statistic of 1.7218 and a p value of 0.056.

HodbarrowCCA17 <- cca(HodbarrowPS ~ Na2O + SiO2 + Be + BaO + TiO2,
                      data = HodbarrowPC)

print(HodbarrowCCA17)
## Call: cca(formula = HodbarrowPS ~ Na2O + SiO2 + Be + BaO + TiO2, data =
## HodbarrowPC)
## 
## -- Model Summary --
## 
##               Inertia Proportion Rank
## Total         2.81078    1.00000     
## Constrained   2.70680    0.96301    5
## Unconstrained 0.10397    0.03699    1
## 
## Inertia is scaled Chi-square
## 
## -- Note --
## 
## 106 species (variables) deleted due to missingness.
## 
## -- Eigenvalues --
## 
## Eigenvalues for constrained axes:
##   CCA1   CCA2   CCA3   CCA4   CCA5 
## 0.8977 0.7589 0.5140 0.3406 0.1955 
## 
## Eigenvalues for unconstrained axes:
##     CA1 
## 0.10397
plot(HodbarrowCCA17)

anova(HodbarrowCCA17)
## Set of permutations < 'minperm'. Generating entire set.
## Permutation test for cca under reduced model
## Permutation: free
## Number of permutations: 5039
## 
## Model: cca(formula = HodbarrowPS ~ Na2O + SiO2 + Be + BaO + TiO2, data = HodbarrowPC)
##          Df ChiSquare      F Pr(>F)  
## Model     5   2.70680 5.2067  0.014 *
## Residual  1   0.10397                
## ---
## Signif. codes:  0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1

#This CCA has a high F statistic of 5.2067 and a low p value of 0.003.

#After doing a few more CCAs, the one with the highest F statistic (6.1483) is #HodbarrowCCA13. The p value of this one is also low, at 0.001. #The plot for this CCA looks OK, but it can be modified to make it easier #to interpret what is going on with some of the different plant species and communities.

options(max.print=1000000)

HodbarrowCCA13$CCA$v
##                              CCA1         CCA2         CCA3       CCA4
## Anthoxanthum.odoratum  -1.8808682  0.515930843 -0.144904225 -0.1398460
## Anthyllis.vulneraria    0.8513919  1.041042224  0.226654799 -0.5136023
## Bellis.perennis         0.9116973  1.047100739  0.187480527 -0.7875399
## Bryum.spp.              0.9116973  1.047100739  0.187480527 -0.7875399
## Campanula.rotundifolia -1.8808682  0.515930843 -0.144904225 -0.1398460
## Carex.flacca            0.1419301 -1.586688931  1.350916103  0.1033922
## Carex.panicea           0.9116973  1.047100739  0.187480527 -0.7875399
## Carlina.vulgaris       -0.3164334 -1.387531027  0.971548823 -1.3666677
## Centaurea.nigra         0.1630491 -1.163737359  0.694471519  1.7013144
## Centaurium.littorale   -0.2745504 -0.134095913  0.468430358  0.4684153
## Cerastium.fontanum     -1.8808682  0.515930843 -0.144904225 -0.1398460
## Dactylis.glomerata      0.1102516 -2.221116290  2.335582980 -2.2934911
## Equisetum.arvense      -1.8808682  0.515930843 -0.144904225 -0.1398460
## Equisteum.variegatum   -1.8808682  0.515930843 -0.144904225 -0.1398460
## Euphrasia.agg           0.1386204 -1.652972387  1.453791747 -0.1470284
## Festuca.rubra           0.1705365 -1.375764205  0.923216137  0.3245228
## Holcus.spp.             0.3971040 -1.412117935 -2.719427123 -1.1910307
## Holcus.lanatus         -1.8808682  0.515930843 -0.144904225 -0.1398460
## Hypnum.cupressiforme   -1.8808682  0.515930843 -0.144904225 -0.1398460
## Leontodon.hispidus      0.1346201 -1.927026434  1.675332121 -1.3244222
## Leucanthemum.vulgare    0.1775724 -0.555027518 -0.004501243  1.3982298
## Linum.catharticum       0.3192237 -1.513567295 -0.844415940 -2.6519716
## Lotus.corniculatus      0.1493355 -1.438381237  1.120734236  0.6637026
## Lysimachia.maritima     0.5162381 -0.866505432 -2.223199809  3.4437837
## Medicago.lupulina      -1.8808682  0.515930843 -0.144904225 -0.1398460
## Ononis.repens          -1.7150902  0.513540930 -0.107948056 -0.0989720
## Pillosella.officinarum -1.2406638 -0.001280767  0.071603827  0.4584307
## Plantago.coronopus      0.1630491 -1.163737359  0.694471519  1.7013144
## Plantago.lanceolata    -0.0545567 -1.576064174  1.498089179 -0.6145219
## Poa.annua               0.5789231  0.322731125  0.410337564  0.4290675
## Prunella.vulgaris       0.1102516 -2.221116290  2.335582980 -2.2934911
## Taraxacum.agg.          0.3241573 -1.880643518 -2.336923359 -3.8947193
## Thymus.polytrichus      0.8033777  0.996376956  0.181773550 -0.3850685
## Trichostomum.crispulum  0.5297032 -0.380228576 -0.850468946  1.9199615
## Trifolium.pratense      0.1102516 -2.221116290  2.335582980 -2.2934911
## Tussilago.farfara       0.1630491 -1.163737359  0.694471519  1.7013144
## Zygodon.stirtonii       0.4311102 -1.710407131 -4.673176528 -4.6953334
##                               CCA5
## Anthoxanthum.odoratum  -0.23832396
## Anthyllis.vulneraria   -0.15012954
## Bellis.perennis        -0.37461452
## Bryum.spp.             -0.37461452
## Campanula.rotundifolia -0.23832396
## Carex.flacca            0.76411901
## Carex.panicea          -0.37461452
## Carlina.vulgaris       -1.13534521
## Centaurea.nigra         3.56015015
## Centaurium.littorale    1.08867477
## Cerastium.fontanum     -0.23832396
## Dactylis.glomerata     -3.42992771
## Equisetum.arvense      -0.23832396
## Equisteum.variegatum   -0.23832396
## Euphrasia.agg           0.32593502
## Festuca.rubra          -0.01541101
## Holcus.spp.             0.42885209
## Holcus.lanatus         -0.23832396
## Hypnum.cupressiforme   -0.23832396
## Leontodon.hispidus     -1.39073989
## Leucanthemum.vulgare    1.07181145
## Linum.catharticum       0.06404070
## Lotus.corniculatus      1.74454551
## Lysimachia.maritima    -4.29171098
## Medicago.lupulina      -0.23832396
## Ononis.repens          -0.14645693
## Pillosella.officinarum  0.82253753
## Plantago.coronopus      3.56015015
## Plantago.lanceolata    -0.54549112
## Poa.annua               1.23552120
## Prunella.vulgaris      -3.42992771
## Taraxacum.agg.          0.75314264
## Thymus.polytrichus      0.04963641
## Trichostomum.crispulum -1.30110842
## Trifolium.pratense     -3.42992771
## Tussilago.farfara       3.56015015
## Zygodon.stirtonii       2.84467781
## attr(,"na.action")
##               Agrostis.spp.             Agrostis.canina 
##                           1                           2 
##           Alchemilla.mollis         Alopercus.pratensis 
##                           3                           4 
##         Angelica.sylvestris            Aphanes.arvensis 
##                           5                           8 
##       Arrhenatherum.elatius          Atrichum.undulatum 
##                           9                          10 
##           Avenula.pratensis            Betula.pubescens 
##                          11                          13 
##      Blackstonia.perfoliata      Brachythecium.albicans 
##                          14                          15 
##     Brachythecium.glareosum     Brachythecium.mildeanum 
##                          16                          17 
##     Brachythecium.rutabulum                 Briza.media 
##                          18                          19 
##           Bromus.hordeaceus     Bryum.c.f..caespiticium 
##                          20                          21 
##       Bryum.c.f..pallescens             Bryum.capillare 
##                          22                          23 
##    Calliergonella.cupsidata           Calypogeia.arguta 
##                          25                          26 
##               Carex.distans        Centaurium.erythraea 
##                          28                          33 
##       Centaurium.pulchellum  Chamaenerion.angustifolium 
##                          35                          37 
##      Cirriphyllum.piliferum             Cirsium.arvense 
##                          38                          39 
##            Cirsium.palustre           Crepis.capillaris 
##                          40                          41 
##         Cynosurus.cristatus        Dactylorhiza.fuchsii 
##                          42                          44 
##         Danthonia.decumbens              Daucus.carrota 
##                          45                          46 
##             Dicranella.spp.          Dicranum.scoparium 
##                          47                          48 
##          Epilobium.montanum               Erigeron.acer 
##                          49                          52 
##               Festuca.ovina          Festuca.rubra.agg. 
##                          54                          56 
##         Filipendula.ulmaria      Fissidens.adianthoides 
##                          57                          58 
##            Fissidens.dubius            Fissidens.exilis 
##                          59                          60 
##              Fragaria.vesca              Galium.aparine 
##                          61                          62 
##              Galium.arvense             Galium.saxatile 
##                          63                          64 
##                Galium.verum                Geum.urbanum 
##                          65                          66 
##          Glechoma.hederacea          Helicotrichon.spp. 
##                          67                          68 
##       Heracleum.sphondylium              Hieracium.spp. 
##                          69                          70 
##               Holcus.mollis     Homalothecium.lutescens 
##                          73                          74 
##        Hylocomium.splendens        Hypericum.perforatum 
##                          75                          76 
##             Hypnum.imponens          Hypnum.jutlandicum 
##                          78                          79 
##        Hypochaeris.radicata        Kindbergia.praelonga 
##                          80                          81 
##          Lathyrus.pratensis         Leontodon.saxatilis 
##                          82                          84 
##              Lolium.perenne        Lophocolea.semiteres 
##                          87                          88 
##           Luzula.multiflora           Myosotis.arvensis 
##                          90                          93 
##           Oxalis.acetosella            Pastinaca.sativa 
##                          95                          96 
##   Pentaglottis.sempervirens        Pleurozium.schreberi 
##                          97                         101 
##                    Poa.spp.         Polytrichum.commune 
##                         103                         104 
##    Polytrichum.commune.agg.        Polytrichum.formosum 
##                         105                         106 
##          Potentilla.reptans     Pseudoscleropidum.purum 
##                         107                         109 
##         Pteridium.aquilinum            Ranunculus.acris 
##                         110                         111 
##      Ranunculus.parviflorus           Ranunculus.repens 
##                         112                         113 
##                Reseda.lutea            Rhinanthus.minor 
##                         114                         115 
##        Rhizomnium.punctatum   Rhytidadelphus.squarrosus 
##                         116                         117 
##   Rhytidadelphus.triquetris            Rubus.fruticosus 
##                         118                         119 
## Sanguisorba.minor.spp.minor            Saniona.uncinata 
##                         120                         121 
##              Sedum.anglicum            Senecio.jacobaea 
##                         122                         123 
##            Senecio.vulgaris            Sonchus.arvensis 
##                         124                         125 
##           Stachys.sylvatica           Stellaria.apetala 
##                         126                         127 
##       Thuidium.tamariscinum         Trifolium.campestre 
##                         129                         132 
##            Trifolium.dubium            Trifolium.repens 
##                         133                         135 
##         Trisetum.flavescens               Urtica.diocia 
##                         136                         138 
##        Veronica.officinalis                Vicia.sativa 
##                         139                         140 
##             Viola.riviniana         Weissia.controversa 
##                         141                         142 
## attr(,"class")
## [1] "exclude"
#The "v values" show the positions of individual species on the graph, with the CCA1 value
#representing the x axis and the CCA2 value representing the y axis, in the case of the
#graph created in R.

plot(HodbarrowCCA13, xlim = c(-5, 5), ylim = c(-5, 5)) 

#Increasing the xlim and ylim to give more room for writing on graph

plot(HodbarrowCCA13, choices = c(1,2), display = c("wa", "bp"), xlim = c(-4, 3),
     ylim = c(-3, 2))

#Increasing the xlim and ylim to give more room for writing on graph Note that Community
#2 and Community 3 are grouped/clustered together in this CCA plot and that Communities
#1, 5, 6 and 7 are grouped together.

points(x = -1.8808682 , y = 0.515930843, pch = 15, col = "black")

#This point represents Equisetum variegatum

text('E. variegatum', x = -1.8808682, y = 0.515930843, cex = 0.88, pos = 2, col = "black")

#Adding text to this point.

points(x = 0.5789231 , y = 0.322731125, pch = 15, col = "black")

#This point represents Poa annua

text('P. annua', x = 0.5789231 , y = 0.322731125, cex = 0.88, pos = 2, col = "black")

#Adding text to this point

points(x = 0.1102516, y = -2.221116290, pch = 15, col = "black")

#This point represents Trifolium pratense

text('T. pratense', x = 0.1102516, y = -2.221116290, cex = 0.88, pos = 2, col = "black")

#Adding text to this point

points(x = 0.3192237, y = -1.513567295, pch = 15, col = "black")

#This point represents Linum catharticum

text('L. catharticum', x = 0.3192237, y = -1.513567295, cex = 0.88, pos = 2, col = "black")

#Adding text to this point

points(x = 0.8513919, y = 1.041042224, pch = 15, col = "black")

#This point represents Anthyllis vulneraria

text('A. vulneraria', x = 0.8513919, y = 1.041042224, cex = 0.88, pos = 2, col = "black")

#Adding text to this point