knitr::opts_chunk$set(
  collapse = TRUE,
  comment = "#>"
)
#system.file("extdata", package = "ResNatSeed")
load("~/Pacchetti R/ResNatSeed/inst/extdata/veg.composition.example.RData")
library(tidyr)
library(ResNatSeed)

If the study area is beyond the Piedmont Region (North-Western Italy), it is advisable to provide a customized training database (see "Introduction to ResNatSeed" vignette for definitions) through the trainingDB function before using the RestInd function.

In order to be processed with the trainingDB function, the vegetation and topographical variables database (see "Introduction to ResNatSeed" vignette for definitions) must be structured as follows (see Table 1 for an example):

Table 1. Example of the structure of the vegetation and topographical variables database to provide in the function trainingDB. This database includes 703 vegetation surveys and 532 plant species

veg.composition.example

At this point, the customized training database can be generated by specifying the name of the vegetation and topographical variables database in the data argument of the trainingDB function. Through this function it is possible to select the species eligible for the statistical modeling through two arguments:

training.custom<-trainingDB(data=veg.composition.example,
           spe.freq = 30,# only species occurring at least in 30 surveys will be retained
           min.spe.abundance = 1# only species with at least 1% of relative abundance will be retained
           )

Through trainingDB function, two dataframes are created and stored in a list, named in this example as 'training.custom'. The two dataframes are:

training.custom$cep.names
head(training.custom$trainingDB.ResNatSeed)

From the list of species in training.custom$cep.names, it is necessary to create a database containing the seed mixture or donor grassland composition. The seed mixture or donor grassland composition must be a dataframe with two columns:

In this example, the donor grassland composition is characterized by four species:

Total abundances amount to 83%. The total abundance of the seed mixture or donor grassland composition should not necessarily amount 100%.

We can generate the dataframe of the donor grassland composition:

donor.composition<-data.frame(
  species=c("Dactglom","Festaggr","Thymaggr","Lotucorn"),
  abundance=c(25,35,15,8)
)

donor.composition

It is now possible to use the RestInd function to calculate the Suitability Index (SI) and Reliability Index (RI) by means of the donor grassland composition (dataframe 'donor.composition') and of the elevation, slope, and aspect of restoration site:

Remember that in the trainingDB argument it must be specified the one created above, i.e. training.custom$trainingDB.ResNatSeed

RestInd(trainingDB = training.custom$trainingDB.ResNatSeed, 
        composition=donor.composition,  
        elevation=1600, 
        slope=10, 
        aspect=110
        )

References



MarcoPittarello/ResNatSeed documentation built on April 14, 2023, 8:53 p.m.