barRoso::std_types()std_types
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.
The same type designation written in English, Latin or Portuguese, and in any case, is converted into the lowercase Darwin Core term in English, e.g. "ISOTYPE", "Isotypus" and "isótipo" into "isotype", "Parátipo" into "paratype", and "isosintipo" into "isosyntype". A taxon name after the term is kept, e.g. "ISOTYPUS of Ormosia amazonica Ducke" into "isotype of Ormosia amazonica Ducke".
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
df <- read.csv("specimens.csv")
df_clean <- std_types(df,
colname_typeStatus = "tipo",
rm_original_column = FALSE)