This function deletes the empty rows from a relevé table.
Usage
clean_empty_rows(
x,
absence.values = c(".", "0"),
preserve.cols = NULL,
preserve.rows = NULL
)
Arguments
- x
matrix
A relevé table.- absence.values
character
A vector, with values representing absences. Defaults to c(".","0").- preserve.cols
numeric
Avector
containing the indices of the columns that should not be considered while cleaning (e.g., that don't correspond to relevés, but to taxa names).- preserve.rows
numeric
Avector
containing the indices of the rows that should not be considered while cleaning (e.g., that don't correspond to taxa, but to header lines).
Value
A matrix
as (x
), possibly without empty rows. Column and row order might be changed. See Details.
Details
This function deletes the empty rows from a relevé table. Row names from deleted rows will be lost.
Column and row order might be changed, as preserved columns (preserve.cols
) are placed on the left part of the output,
and preserved rows (preserve.rows
) are placed in the top part of the output.
Author
Tiago Monteiro-Henriques. E-mail: tmh.dev@icloud.com.