Skip to contents

Computes dissimilarity indices for each set of selected sites contained in elements of PAM_subset that contain information of species incidence (presence-absence). Calculations are done also among sets of selected sites.

Usage

selected_sites_DI(PAM_subset, selection_type = "all", method = "jaccard",
                  verbose = TRUE, ...)

Arguments

PAM_subset

object of class PAM_subset obtained using the function subset_PAM.

selection_type

type of selection to be considered when creating dissimilarity matrices for elements in PAM_subset. Options are: "all", "random", "E", "G", and "EG". The default, "all", uses all selection types present in PAM_subset.

method

(character) dissimilarity index to be passed to function vegdist. Default = "jaccard". See details.

verbose

(logical) whether or not to print messages about the process. Default = TRUE.

...

other arguments to be passed to function vegdist.

Value

A list containing:

  • Dissimilarity matrices for all PAMs reduced based on distinct sets of selected sites.

  • A matrix summarizing incidences from all sets of selected sites.

  • A dissimilarity matrix for the summary of incidences for all sets of selected sites.

  • The result of clustering sets of selected sites based on dissimilarities.

Details

Important details about the process performed to compute dissimilarity indices can be seen in the documentation of vegdist.

Examples

# Data
b_pam <- read_PAM(system.file("extdata/b_pam.rds",
                              package = "biosurvey"))
m_selection <- read_master(system.file("extdata/m_selection.rds",
                                       package = "biosurvey"))

# Subsetting base PAM according to selections
sub_pam_all <- subset_PAM(b_pam, m_selection, selection_type = "all")

# Calculating dissimilarities
DI_sel <- selected_sites_DI(sub_pam_all)
#> Running analysis...
#> Random selection
#> 	One or more sites were excluded due to lack of species data:
#> 	Site_15
#> G selection
#> 	One or more sites were excluded due to lack of species data:
#> 	Site_4, Site_10, Site_19, Site_20
#> E selection
#> Summary of all selections