Original Braun-Blanquet values (simplified) to binary values
Source:R/OBBsim_to_PA_1.R
OBBsim_to_PA_1.Rd
Converts the values of a relevé table from Original Braun-Blanquet simplified (OBBsim) values to Presence-absence scale with presences denoted as 1 (PA_1), and absences as 0.
Arguments
- m
matrix
A relevé table.- absence.values
character
A vector, with values representing absences in the OBBsim scale. Defaults toc(".", "0")
.- parentheses.values
vector
Anumeric
orcharacter vector
with the admissible values inside parentheses. Defaults toc("(+)", "(x)")
. Traditionally "(+)" or "(x)" indicate the presence of a taxon that was out of the relevé area but that was observed in its close surroundings.- parentheses.replacement
integer
The value to be used to replace values within parentheses. Defaults to 1.
Details
This function converts a relevé table using the OBBsim scale to a table using PA_1 scale (with absences denoted as 0).
Note that "PA_1" scale is useful for numerical analysis but its use for storing tables in databases is not advisable, as this scale is not easily
distinguishable from other commonly used scales. See releve_scale
.
Author
Tiago Monteiro-Henriques. E-mail: tmh.dev@icloud.com.
Examples
m.ori <- matrix(c("5", "3", "r", "(x)", ".", "4", "2", "1", ".", "+"), 5, 2)
colnames(m.ori) <- c("rele1", "rele2")
rownames(m.ori) <- c("taxa1", "taxa2", "taxa3", "taxa4", "taxon5")
m.ord <- OBBsim_to_PA_1(m.ori)
m.ori
#> rele1 rele2
#> taxa1 "5" "4"
#> taxa2 "3" "2"
#> taxa3 "r" "1"
#> taxa4 "(x)" "."
#> taxon5 "." "+"
m.ord
#> rele1 rele2
#> taxa1 1 1
#> taxa2 1 1
#> taxa3 1 1
#> taxa4 1 0
#> taxon5 0 1