Chapter 5 Composition
This analysis using vegnasis package explores vegetation composition.
5.1 Data Processing
# remotes::install_github("phytoclast/vegnasis", dependencies = FALSE)
library(vegnasis)
library(ggplot2)
veg.raw <- vegnasis::nasis.veg
# With a connection to NASIS via soilDB...
# veg.raw <- soilDB::get_vegplot_species_from_NASIS_db()
#Clean data
veg <- clean.veg(veg.raw)
#Select only Wexford County Michigan records, and exclude imprecise non bionomial (genus or family) records by requiring a blank space in the name.
veg <- veg |> subset(grepl('MI165',plot) & grepl('[[:blank:]]',taxon))
#These tasks fill in missing plant 'types' and establishes the crown heights based on user inputs of stratum, live canopy heights, and taxon norms when user data is missing.
veg <- veg |> fill.type.df() |> fill.hts.df()
knitr::kable(
head(veg, 10), booktabs = TRUE,
caption = 'A table of the first 10 rows of the veg data.'
)
plot | label | date | symbol | taxon | type | nativity | cover | stratum.min | stratum.max | crown.min | crown.max | dbh.min | dbh.max | BA | ht.min | ht.max | taxon.max | stand.max | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
253 | 2022MI165020.P | NA | 2022-08-12 | VAAN | Vaccinium angustifolium | shrub/vine | native | 7.0 | 0.0 | 0.5 | NA | 0.3 | NA | NA | NA | 0.1 | 0.3 | 0.5 | 30 |
254 | 2022MI165020.P | NA | 2022-08-12 | QURU | Quercus rubra | tree | native | 5.0 | 15.0 | 30.0 | 5 | 20.0 | NA | NA | NA | 5.0 | 20.0 | 35.0 | 30 |
255 | 2022MI165020.P | NA | 2022-08-12 | QUAL | Quercus alba | tree | native | 0.2 | 0.5 | 5.0 | NA | 0.8 | NA | NA | NA | 0.4 | 0.8 | 35.0 | 30 |
256 | 2022MI165020.P | NA | 2022-08-12 | QUAL | Quercus alba | tree | native | 1.0 | 0.0 | 0.5 | NA | NA | NA | NA | NA | 0.2 | 0.5 | 35.0 | 30 |
257 | 2022MI165020.P | NA | 2022-08-12 | PTAQ | Pteridium aquilinum | forb | native | 75.0 | 0.0 | 0.5 | NA | 1.0 | NA | NA | NA | 0.5 | 1.0 | 2.0 | 30 |
258 | 2022MI165020.P | NA | 2022-08-12 | PRSE2 | Prunus serotina | tree | native | 1.0 | 5.0 | 15.0 | NA | 6.0 | NA | NA | NA | 3.0 | 6.0 | 35.0 | 30 |
259 | 2022MI165020.P | NA | 2022-08-12 | PRSE2 | Prunus serotina | tree | native | 0.2 | 0.0 | 0.5 | NA | NA | NA | NA | NA | 0.2 | 0.5 | 35.0 | 30 |
260 | 2022MI165020.P | NA | 2022-08-12 | PLSC70 | Pleurozium schreberi | moss | native | 90.0 | 0.0 | 0.5 | NA | 0.0 | NA | NA | NA | 0.0 | 0.0 | 0.0 | 30 |
261 | 2022MI165020.P | NA | 2022-08-12 | PIBA2 | Pinus banksiana | tree | native | 56.0 | 15.0 | 30.0 | 8 | 17.0 | 16 | 22 | 23 | 8.0 | 17.0 | 25.0 | 30 |
262 | 2022MI165020.P | NA | 2022-08-12 | PIBA2 | Pinus banksiana | tree | native | 9.0 | 5.0 | 15.0 | NA | NA | NA | NA | NA | 7.5 | 15.0 | 25.0 | 30 |
5.2 Harmonizing Taxa
When combining data from multiple sources, the possibility exists that the ecologist used a different scientific name for a taxon. Before conducting cluster analysis, it is wise to harmonize the taxonomy.
harmonize.taxa()
- This function synonymizes taxa with BONAP or for Mexican only plants, Kew’s Plants of the World Online circa 2022, and returns a binomial. Assuming that the ecologist has the correct concept for the plant while in the field, and is using a legitimate name for that concept, the name can be synonymized. This ensures that various vegetation summarizing functions work off a shared taxonomic backbone, and not misconstrue synonyms as plant diversity.
5.3 Associations
#This function ranks each taxon by cover and retains the top 2-5 taxa, with fewer taxa retained with greater unequal dominance. Taxa are separated by '/' when different stratum, and '-' when in the same stratum.
veg.associations <- veg |> get.assoc()
knitr::kable(
veg.associations, booktabs = TRUE,
caption = 'A table with the top 2-5 taxa organized by stratum of each plot.'
)
plot | association |
---|---|
2022MI165001.P | Populus grandidentata/Pteridium aquilinum |
2022MI165002.P | Acer rubrum/Fagus grandifolia |
2022MI165003.P | Acer rubrum/Fagus grandifolia |
2022MI165004.P | Quercus rubra/Fagus grandifolia/Pteridium aquilinum |
2022MI165005.P | Populus tremuloides/Carex bromoides-Athyrium angustum |
2022MI165006.P | Acer saccharum/Fagus grandifolia/Erythronium americanum |
2022MI165007.P | Quercus rubra-Tsuga canadensis/Acer rubrum/Ostrya virginiana |
2022MI165008.P | Fagus grandifolia-Acer saccharum/Erythronium americanum |
2022MI165009.P | Acer saccharum/Allium tricoccum |
2022MI165010.P | Pinus resinosa/Deschampsia flexuosa-Vaccinium angustifolium/Dicranum polysetum-Pleurozium schreberi |
2022MI165011.P | Quercus velutina/Carex pensylvanica |
2022MI165012.P | Quercus alba/Pinus strobus/Carex pensylvanica-Pteridium aquilinum-Gaultheria procumbens |
2022MI165013.P | Quercus alba/Pteridium aquilinum |
2022MI165014.P | Pinus resinosa/Vaccinium angustifolium-Pteridium aquilinum |
2022MI165015.P | Pinus strobus/Solidago gigantea-Maianthemum stellatum |
2022MI165016.P | Pinus resinosa/Quercus alba/Vaccinium angustifolium-Pteridium aquilinum |
2022MI165017.P | Pinus resinosa-Pinus strobus/Carex pensylvanica-Pteridium aquilinum |
2022MI165018.P | Acer rubrum-Quercus alba/Hamamelis virginiana-Prunus serotina/Pteridium aquilinum |
2022MI165019.P | Acer rubrum-Quercus rubra/Fagus grandifolia/Amelanchier arborea/Pteridium aquilinum-Carex pensylvanica-Maianthemum canadense |
2022MI165020.P | Pinus banksiana/Pteridium aquilinum-Carex pensylvanica/Pleurozium schreberi |
2022MI165021.P | Pinus resinosa/Pteridium aquilinum |
2022MI165022.P | Pinus resinosa/Pteridium aquilinum |
2022MI165023.P | Pinus strobus-Acer rubrum-Tsuga canadensis/Dryopteris carthusiana-Glyceria striata-Solidago gigantea-Coptis trifolia |
2022MI165024.P | Acer rubrum-Quercus rubra/Pinus strobus/Carex pensylvanica |
2022MI165025.P | Pinus strobus/Fagus grandifolia/Deschampsia flexuosa-Carex pensylvanica |
2022MI165026.P | Acer rubrum/Prunus serotina/Carpinus caroliniana-Quercus alba/Carex stricta |
2022MI165027.P | Acer rubrum/Fagus grandifolia |
2022MI165028.P | Acer saccharum-Tilia americana |
2022MI165029.P | Acer saccharum/Ostrya virginiana |
2022MI165030.P | Acer rubrum/Pteridium aquilinum |
2022MI165031.P | Acer rubrum/Thuja occidentalis/Alnus incana/Vaccinium myrtilloides |
2022MI165032.P | Acer rubrum-Tsuga canadensis |
2022MI165033.P | Tilia americana/Acer saccharinum/Carpinus caroliniana/Carex stricta |
2022MI165034.P | Acer saccharum/Carpinus caroliniana |
5.4 Cluster Analysis
#Create plot matrix, based log transformed relative cover values.
m <- veg |> make.plot.matrix(tr = 'log', rc = TRUE)
knitr::kable(
m[1:10,1:10], booktabs = TRUE,
caption = 'A table of the first 10 rows of the community data matrix.'
)
Abies.balsamea | Acer.rubrum | Acer.saccharinum | Acer.saccharum | Achillea.millefolium | Adiantum.pedatum | Agrimonia.gryposepala | Allium.tricoccum | Alnus.incana | Alnus.rugosa | |
---|---|---|---|---|---|---|---|---|---|---|
2022MI165001.P | 0.0098231 | 0.2735230 | 0 | 0.0000000 | 0 | 0 | 0 | 0.0000000 | 0 | 0 |
2022MI165002.P | 0.0000000 | 0.7695928 | 0 | 0.0000000 | 0 | 0 | 0 | 0.0000000 | 0 | 0 |
2022MI165003.P | 0.0246233 | 0.5401819 | 0 | 0.0000000 | 0 | 0 | 0 | 0.0000000 | 0 | 0 |
2022MI165004.P | 0.0000000 | 0.0015488 | 0 | 0.0015488 | 0 | 0 | 0 | 0.0000000 | 0 | 0 |
2022MI165005.P | 0.0000000 | 0.0353465 | 0 | 0.0000000 | 0 | 0 | 0 | 0.0000000 | 0 | 0 |
2022MI165006.P | 0.0000000 | 0.0000000 | 0 | 0.5647917 | 0 | 0 | 0 | 0.0000000 | 0 | 0 |
2022MI165007.P | 0.0000000 | 0.1868105 | 0 | 0.0501600 | 0 | 0 | 0 | 0.0000000 | 0 | 0 |
2022MI165008.P | 0.0000000 | 0.0016694 | 0 | 0.2704181 | 0 | 0 | 0 | 0.0000000 | 0 | 0 |
2022MI165009.P | 0.0000000 | 0.0016849 | 0 | 0.7854276 | 0 | 0 | 0 | 0.2505727 | 0 | 0 |
2022MI165010.P | 0.0000000 | 0.0050284 | 0 | 0.0000000 | 0 | 0 | 0 | 0.0000000 | 0 | 0 |
#distance matrix based on Bray-Curtis simularity.
d = vegan::vegdist(m, method='bray')
#Cluster analysis using Ward's method using distance matrix.
t <- cluster::agnes(d, method = 'ward')|> as.hclust()
#Define number of groups to color the dendrogram by.
k = 3
groups <- cutree(t, k = k)
#This function rearranges the branchs and groups so that the tree is always oriented with most nested branches to the bottom of the plot (when tree oriented vertically with branches to the right).
groups <- dendrogrouporder(t, groups)
a = 'Vegetation of Wexford County'
5.5 Phylogenetically Weighted Cluster Analysis
Sometimes there are several unknown species in a plot, which may or may not be the same as a species in other plots. These unknown species are often recorded as genera (e.g. Rubus), or if more ambiguous, as family (e.g. Poaceae). Creating a similarity matrix which rates commonly held genera and families may provide some partial credit to link plots related by unknown species. Alternatively, when comparing vegetation from more geographically distant biotic realms with few overlapping species, there may yet be value in giving credit to shared genera and families in as much as some ecological traits are phylogenetically conserved.
#Create alternative higher taxon datasets and combine them.
veg.genera <- veg |> mutate(taxon = link.taxonomy(taxon, taxrank=1))
veg.families <- veg |> mutate(taxon = link.taxonomy(taxon, taxrank=2))
veg.combined <- rbind(veg,veg.genera,veg.families)
#Create plot matrix, based log transformed relative cover values.
m <- veg.combined |> make.plot.matrix(tr = 'log', rc = TRUE)
#distance matrix based on Bray-Curtis simularity.
d = vegan::vegdist(m, method='bray')
#Cluster analysis using Ward's method using distance matrix.
t <- cluster::agnes(d, method = 'ward')|> as.hclust()
#Define number of groups to color the dendrogram by.
k = 3
groups <- cutree(t, k = k)
#This function rearranges the branchs and groups so that the tree is always oriented with most nested branches to the bottom of the plot (when tree oriented vertically with branches to the right).
groups <- dendrogrouporder(t, groups)
a = 'Vegetation of Wexford County'