View source: R/as_bioregion_pairwise.R
| as_bioregion_pairwise | R Documentation |
Converts a (dis)similarity matrix or a list of such matrices into a
bioregion.pairwise object compatible with the bioregion package.
The input can come from base R, dist objects, or outputs from other
packages.
as_bioregion_pairwise(
mat,
metric_name = NULL,
pkg = NULL,
is_similarity = FALSE
)
mat |
A |
metric_name |
Optional |
pkg |
An optional |
is_similarity |
A |
This function can directly handle outputs from ten functions across four packages:
adespatial: beta.div, beta.div.comp
betapart: beta.pair, beta.pair.abund, betapart.core, betapart.core.abund
ecodist: distance, bcdist
vegan: vegdist, designdist
See the documentation of these packages for more information:
https://cran.r-project.org/package=adespatial
https://cran.r-project.org/package=betapart
https://cran.r-project.org/package=ecodist
https://cran.r-project.org/package=vegan
A dissimilarity or similarity object of class bioregion.pairwise,
compatible with the bioregion package.
If no specific package is specified (i.e., pkg = NULL), site names will be
based on the row names of the first matrix. If row names are NULL, they
will be generated automatically. If mat is a named list, those names will
be used as column names only if metric_name = NULL.
Maxime Lenormand (maxime.lenormand@inrae.fr)
Boris Leroy (leroy.boris@gmail.com)
Pierre Denelle (pierre.denelle@gmail.com)
For more details illustrated with a practical example, see the vignette: https://biorgeo.github.io/bioregion/articles/a3_pairwise_metrics.html.
Associated functions: dissimilarity similarity bind_pairwise
mat <- matrix(runif(100), 10, 10)
rownames(mat) <- paste0("s",1:10)
pair <- as_bioregion_pairwise(list(mat,mat,mat),
metric_name = NULL,
pkg = NULL,
is_similarity = FALSE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.