Preparation of data and details to create range-diversity plots.
prepare_PAM_CS(PAM, exclude_column = NULL, id_column = NULL,
significance_test = FALSE, randomization_iterations = 100,
CL = 0.05, picante_iterations = NULL,
keep_randomizations = FALSE, parallel = FALSE,
n_cores = NULL)
matrix, data.frame, or base_PAM object containing information on presence and absence of species for a set of sites. Sites are organized in the rows and species in the columns. See details.
(optional) name or numeric index of columns to be excluded. Default = NULL.
(optional) name or numeric index of column containing the ID of sites (cells of the PAM). Default = NULL.
(logical) whether to perform a test to detect sites (cells) that are statistically significant (i.e., the pattern detected can be distinguished from random expectations). Default = FALSE.
(numeric) number of iterations for the randomization test used to calculate statistical significance. Default = 100.
(numeric) confidence limit to detect statistically significant values. Default = 0.05.
(numeric) number of iterations to be used for each
matrix randomization process (to be done randomization_iterations
times). This process is done using the function randomizeMatrix
from the package picante
. The default, NULL, uses 2 * sum(PAM)
.
(logical) whether to keep a matrix with all values from the randomization process. Default = FALSE.
(logical) whether to perform analyses in parallel. Default = FALSE.
(numeric) number of cores to be used when parallel
=
TRUE. The default, NULL, uses available cores - 1.
An S3 object of class PAM_CS
if PAM
is a matrix or
data.frame, otherwise, an object of class base_PAM
that
contains the PAM_CS
object as a part of PAM_indices
.
Significant values are presented as a vector in which 0 means non-significant, and 1 and 2 represent significant values below and above confidence limits of random expectations, respectively.
Range-diversity plot allow explorations of patterns of biodiversity in a region based on the data of presence-absence matrices. The plots to be produced using the information prepared here are a modification of those presented in Arita et al. (2011) https://doi.org/10.1111/j.1466-8238.2011.00662.x.
# NOT RUN {
# Data
data("b_pam", package = "biosurvey")
# Preparing data for CS diagram
pcs <- prepare_PAM_CS(PAM = b_pam)
summary(pcs$PAM_indices$CS_diagram)
# }
Run the code above in your browser using DataLab