Import the library and the data set
library(vegtable)
releves <- readRDS ("sanmartin1998.rds")
Use the function count_taxa for counting species, genus or family per plot.
releves <- count_taxa (
object = species ~ ReleveID,
data = releves,
suffix = "_count"
)
releves <- count_taxa (
object = genus ~ ReleveID,
data = releves,
suffix = "_count2",
include_lower = TRUE
)
releves <- count_taxa (
object = family ~ ReleveID,
data = releves,
suffix = "_count",
include_lower = TRUE
)
Use summary to summarize the results of maximum, minimum, and mean number of species, genera, and families per plot.
summary(releves$species_count)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.000 6.000 8.000 8.088 10.000 17.000
summary(releves$genus_count2)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.000 6.000 8.000 8.312 10.000 17.000
summary(releves$family_count)
## Min. 1st Qu. Median Mean 3rd Qu. Max.
## 1.000 5.000 6.500 6.625 8.000 15.000
Also you can create histogram to show frequency of taxa number per plot. This is an example for species number.
hist(releves$species_count)
abline(v = mean(releves$species_count),
col = "red", lty = "dashed", lwd = 2)
In this case, the different life forms for all releves are shown.
summary(as.factor (releves@species@taxonTraits$life_form))
## annual climber perennial woody NA's
## 17 1 51 4 12
Use the function trait_proportion to calculate the proportion of life forms per plot
releves <- trait_proportion(
object = releves,
trait = "life_form",
head_var = "ReleveID",
include_nas = FALSE,
weight = "cover_percentage",
suffix = "_prop",
in_header = TRUE)
Sumarize the results of maximum, minimum, and mean porportion of the different life forms.
summary(releves$annual_prop)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.000000 0.000000 0.005076 0.147616 0.197087 0.983607 1
summary(releves$climber_prop)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.0000000 0.0000000 0.0000000 0.0001257 0.0000000 0.0051020 1
summary(releves$perennial_prop)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.01639 0.80291 0.99048 0.85150 1.00000 1.00000 1
summary(releves$woody_prop)
## Min. 1st Qu. Median Mean 3rd Qu. Max. NA's
## 0.0000000 0.0000000 0.0000000 0.0007566 0.0000000 0.0084034 1
See the number of plots per community type
releves <- relation2header(vegtable = releves,
relation = "community_type")
summary(as.factor(releves$community_name))
## Anthoxanthum utriculatum
## 4
## Eleocharietum macrostachyae
## 7
## Eleocharietum pachycarpae
## 11
## Eleocharis pachycarpa-Lythrum portula
## 5
## Glycerietum multiflorae
## 2
## Gnaphalio cymatoidis-Polygonetum piperoidis
## 7
## Juncetum proceri
## 15
## Junco proceri-Caricetum ripariae
## 1
## Ludwigia peploides-Sagittaria montevidense
## 7
## Mentho pulegium-Agrostietum capillaris
## 16
## Phyla nodiflora
## 4
## Potamogeton pusilus
## 1
Calculate the mean number of species per community type
releves <- count_taxa(species ~ ReleveID, data = releves,include_lower = TRUE)
aggregate(species_count ~ community_name, data = releves@header, FUN = mean)
## community_name species_count
## 1 Anthoxanthum utriculatum 14.000000
## 2 Eleocharietum macrostachyae 7.142857
## 3 Eleocharietum pachycarpae 8.545455
## 4 Eleocharis pachycarpa-Lythrum portula 7.400000
## 5 Glycerietum multiflorae 4.500000
## 6 Gnaphalio cymatoidis-Polygonetum piperoidis 9.428571
## 7 Juncetum proceri 10.066667
## 8 Junco proceri-Caricetum ripariae 6.000000
## 9 Ludwigia peploides-Sagittaria montevidense 5.142857
## 10 Mentho pulegium-Agrostietum capillaris 10.187500
## 11 Phyla nodiflora 4.750000
## 12 Potamogeton pusilus 1.000000