Phytosociological analysis"

knitr::opts_chunk$set(collapse = T, comment = "#>")
knitr::opts_chunk$set(fig.width=7, fig.height=5)
options(tibble.print_min = 6L, tibble.print_max = 6L)
library(forestmangr)

For this example we'll use a database of forestry inventories done in the amazon forest, and make a phytosociological analysis of the area.

library(forestmangr)
data(exfm20)
data_ex <- exfm20

data_ex

First we'll calculate the diversity indexes of the area, with the species_diversity function. It just needs the data and column name for species:

species_diversity(data_ex, "scientific.name")

We can evaluate similarity between plots by the Jaccard index, using the similarity_matrix function:

similarity_matrix(data_ex, "scientific.name", "transect", index = "Jaccard")

We can also generate a dendrogram for this analysis:

similarity_matrix(exfm20, "scientific.name", "transect", index = "Jaccard", dendrogram = TRUE, n_groups = 3)

To evaluate the level of aggregation among species in the area, we can use the species_aggreg function:

species_aggreg(data_ex, "scientific.name", "transect")

We can also evaluate the horizontal structure of the forest. To do this, we can use the forest_structure function:

forest_structure(data_ex, "scientific.name", "dbh", "transect", 10000)

It's also possible to calculate the vertical and internal structures:

forest_structure(data_ex, "scientific.name", "dbh", "transect", 10000, "canopy.pos", "light") 

To check if the forest is regulated, we can use the BDq method, with the bdq_meyer function:

bdq_meyer(data_ex, "transect", "dbh", 1000,licourt_index = 2)

With the diameter_class function it's possible to divide the data in diameter classes, and get the number of individuals per species in each class:

classified <- diameter_class(data_ex,"dbh", "transect", 10000, 10, 10, "scientific.name") 

head(classified)

Another way of visualizing this table is to spread the center of class to columns. We can do this with the cc_to_column argument:

classified <- diameter_class(data_ex,"dbh", "transect", 10000, 10, 10,
               "scientific.name", cc_to_column=TRUE)
head(classified)


Try the forestmangr package in your browser

Any scripts or data that you put into this service are public.

forestmangr documentation built on Nov. 24, 2023, 1:07 a.m.