::std_types() barRoso
std_types
Standardize and Fill Missing Type Status Information
Description
Cleans and standardizes the typeStatus
column in biodiversity datasets, addressing inconsistencies in type designations. It removes irrelevant entries, harmonizes formatting, and optionally fills missing values if present in other duplicate records (assumed to be handled outside this function).
Details
This function is used internally in the barRoso
package to prepare type status data for reconciliation and label generation. It corrects known placeholder or non-type entries (e.g. “Fotografia do Tipo”, “NOTATYPE”, “Epítipo”) and simplifies terms like "sim -"
to ensure clean type labels.
Arguments
Argument | Description |
---|---|
df | A data frame containing type designation records. |
colname_typeStatus | Name of the column holding type status information (default: "typeStatus" ). |
rm_original_column | Logical; if TRUE , the original column is removed after cleaning (default: TRUE ). |
Value
A data frame with a standardized typeStatus
column. If rm_original_column = FALSE
, the original values are preserved in a column named typeStatusOriginal
.
Examples
<- read.csv("specimens.csv")
df <- std_types(df,
df_clean colname_typeStatus = "tipo",
rm_original_column = FALSE)