| ec_pa | R Documentation |
pa) object from a matrix.Create a presence/absence object
Create a presence/absence (pa) object from a matrix.
ec_pa(x, threshold = 0, spc_name = NULL, sit_name = NULL)
x |
a R object to be coerced as a matrix. |
threshold |
threshold value. Above (strictly) this value, a species is considered present. |
spc_name |
vector of species names. |
sit_name |
vector of site names. |
The input x should be a presence absence matrix (sites as rows and species as columns), it could be either a logical one or a numeric one. In the latter case, presence and absence will be determined based on threshold.
If there are less names than species (or sites), or no names at all, then names will be automatically added. These names are created using column or row numbers (zero-padded to the number of digits of total the number of column or row), preceded by spc_ for column and sit_ for sites.
An object of class pa which basically is a matrix of 0 (absence) and 1 (presence).
ec_pa(matrix(c(0, 0, 0, 1, 1, 0, 1, 0, 0), 3, 3), spc_name = "Lynx", sit_name = "ON_001")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.