Skip to contents

Converts the values of a relevé table from Original Braun-Blanquet simplified (OBBsim) values to Ordinal Transformed Values with five levels (OTV_5).

Usage

OBBsim_to_OTV_5(
  m,
  absence.values = c(".", "0"),
  parentheses.values = c("(+)", "(x)"),
  parentheses.replacement = 0
)

Arguments

m

matrix A relevé table.

absence.values

character A vector, with values representing absences in the OBBsim scale. Defaults to c(".", "0").

parentheses.values

vector A numericor character vector with the admissible values inside parentheses. Defaults to c("(+)", "(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. As there is no abundance value associated to these, it is advisable to replace it by an absence in the ordinal transformation. Defaults to 0.

Value

The matrix (m) with OBBsim values replaced by OTV_5.

Details

This function converts a relevé table using the OBBsim scale to a table using OTV_5 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_OTV_5(m.ori)
m.ori
#>        rele1 rele2
#> taxa1  "5"   "4"  
#> taxa2  "3"   "2"  
#> taxa3  "r"   "1"  
#> taxa4  "(x)" "."  
#> taxon5 "."   "+"  
m.ord
#>        rele1 rele2
#> taxa1      5     4
#> taxa2      3     2
#> taxa3      1     1
#> taxa4      0     0
#> taxon5     0     1