View source: R/prepare_PAM_CS.R
prepare_PAM_CS | R Documentation |
Preparation of data and details to create range-diversity plots.
prepare_PAM_CS(PAM, exclude_column = NULL, id_column = NULL,
significance_test = FALSE, randomization_method = "picante",
randomization_iterations = 100,
CL = 0.05, picante_iterations = NULL,
keep_randomizations = FALSE, parallel = FALSE,
n_cores = NULL)
PAM |
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. |
exclude_column |
(optional) name or numeric index of columns to be excluded. Default = NULL. |
id_column |
(optional) name or numeric index of column containing the ID of sites (cells of the PAM). Default = NULL. |
significance_test |
(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. |
randomization_method |
(character) method of randomization to be used. Options are: "picante" and "curve_ball". Default = "picante". |
randomization_iterations |
(numeric) number of iterations for the
randomization test used to calculate statistical significance.
Valid only with |
CL |
(numeric) confidence limit to detect statistically significant values. Default = 0.05. |
picante_iterations |
(numeric) number of iterations to be used for each
matrix randomization process (to be done |
keep_randomizations |
(logical) whether to keep a matrix with all values from the randomization process. Default = FALSE. |
parallel |
(logical) whether to perform analyses in parallel. Default = FALSE. |
n_cores |
(numeric) number of cores to be used when |
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) \Sexpr[results=rd]{tools:::Rd_expr_doi("https://doi.org/10.1111/j.1466-8238.2011.00662.x")}.
More details about the randomization_method
can be found in the description
of the functions used: from picante randomizeMatrix
,
and randomize_matrix_cb
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.
# Data
b_pam <- read_PAM(system.file("extdata/b_pam.rds",
package = "biosurvey"))
# Preparing data for CS diagram
pcs <- prepare_PAM_CS(PAM = b_pam)
summary(pcs$PAM_indices$CS_diagram)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.