News

barroso watermark

barRoso (development version)

New functions

  • barroso_dwc(): formats a dataset into Darwin Core column names and values. It recognizes the three layouts of speciesLink downloads (e.g. collector, recordedby, or proper Darwin Core names), and records from REFLORA, JABOT and GBIF. For speciesLink, it also builds dateIdentified from the year, month and day of identification, adds the author to scientificName, splits epithets like "cf. platychila" or "stygium var. annulatum", and takes a missing recordNumber from fieldNumber. barroso_cat() now runs it on each source.

  • std_identifiedBy(): standardizes determiner names in identifiedBy with the same rules of std_recordedBy(), keeping all determiners in the same cell (e.g. "D. Cardoso & L. P. Queiroz") and removing herbarium acronyms and determination dates. It is now part of barroso_std() (new argument colname_identifiedBy).

  • std_coordinates(): fixes transposed coordinates and flags empty, out of range, country-inconsistent and low precision coordinates, as well as coordinates at capitals, centroids, institutions and zero coordinates, following the workflow of the bdc package. Flags use the bdc columns (e.g. .coordinates_empty), plus a readable coordinateIssues column.

  • dms_to_decimal(): converts coordinates in degrees, minutes and seconds (e.g. "22º22´55´´S", "53°45'W", "43º40'49''O") into decimal degrees, recognizing the many symbols and hemisphere letters (also in Portuguese) found in herbarium data. Invalid values (e.g. 61 seconds) become NA, with a warning.

Improvements

  • std_types(): the same type designation in English, Latin or Portuguese and in any case becomes one lowercase Darwin Core term, e.g. "ISOTYPE", "Isotypus" and "isótipo" into "isotype", or "Parátipo" into "paratype", keeping a taxon name after the term. On the Ormosia and Dalea datasets, 58 spellings become 25.

  • barroso_std(): cells with the text "NA", as in spreadsheets exported from R, are now missing values, except in code columns like countryCode, where "NA" is a real code (Namibia).

  • barroso_cat(): standardizes records of REFLORA and JABOT (as returned by refloraR and jabotR): the determiner "Administrador" of REFLORA becomes NA, dates become ISO 8601 (e.g. "2/12/1940" into "1940-12-02"), REFLORA type status in Latin becomes Darwin Core terms ("ISOTYPUS" into "isotype"), and the institution of RB becomes "JBRJ".

  • barroso_write_specimens(): rewritten to write the lists of examined specimens of one, several or all species (species) of a database in Darwin Core format, given as a data frame (df) or a file (path, .xlsx or .csv), in the format of 24 journals (journal): Systematic Botany, Acta Amazonica, Acta Botanica Brasilica, Acta Botanica Mexicana, Annals of the Missouri Botanical Garden, Botanical Journal of the Linnean Society, Botany Letters, Brazilian Journal of Botany, Brittonia, Candollea, Darwiniana, Edinburgh Journal of Botany, Feddes Repertorium, Hoehnea, Kew Bulletin, Nordic Journal of Botany, Phytotaxa, PhytoKeys, Plant Ecology and Evolution, Plant Systematics and Evolution, Rodriguésia, Systematics and Biodiversity, Taxon and Willdenowia. Each format was checked against recent papers of the journal: the header, case and format (bold, italics, small capitals) of countries, states and collectors, dates (e.g. "8 May 1994", "8.V.1994", "8 v 1994"), coordinates, phenology, collector names ("D.B.O.S. Cardoso", "D. B. O. S. Cardoso" or "Cardoso"), "et al." or "& al.", and herbaria (with catalog numbers with catalog_numbers = TRUE), without type status. The phenology (column phenology, as in records from REFLORA and JABOT, or reproductiveCondition, e.g. "fl", "flower, fruit" or "st") is written in the format of each journal, e.g. "(fl, fr)", "(fl., fr.)", "(fl./fr.)", "[fl]" or "fl. and fr.". With language, the list is written in English ("en"), Portuguese ("pt") or Spanish ("es"), e.g. for Hoehnea, Rodriguésia or Darwiniana: header ("Material examinado"), months, countries ("BRASIL"), phenology ("fl. e fr.") and west hemisphere ("O" in Spanish). Repeated places are written as in each journal, e.g. "l.c." in Hoehnea or "loc. cit." in Acta Botanica Mexicana. The header follows the journal (e.g. "Specimens examined" in Kew Bulletin), or any text given in header (e.g. "Paratypes"). Duplicates are written once with all their herbaria, and collections without number are cited with the catalog number of the first herbarium. The arguments xlsx_path, species_cols, species_filter and the colname_* and formatting arguments were removed.

  • std_collection(): rewritten with regular expressions instead of a list of exact codes. Aggregated collections ("Tropicos", "MO-Duplicates") take the herbarium of the specimen from institutionCode; generic words ("Botany", "Herbarium", "Vascular Plants") take the acronym from institutionCode, catalogNumber (e.g. "U.1317533", "D. Cardoso 2118 (HUEFS)") or occurrenceID; names of collections become the acronym ("F-Seedplants", "BHCB-Fanerogamas", "R-Tipos", "BSMvplantscoll"); names of herbaria and institutions become their acronym ("Herbario INPA", "Herbario Nacional de Costa Rica (CR)", "Instituto Florestal" into "SPSF"); and codes of observation projects, companies or numbers become NA. On the Ormosia dataset, 367 codes become 298 acronyms.

  • std_place(): words for municipality in county and municipality are removed, leaving just the name, e.g. "Manaus Mun.", "Mun. de Castelo", "Município de Mucugê" or "Arriaga Municipio" into "Manaus", "Castelo", "Mucugê" and "Arriaga". Particles are written in lowercase, e.g. "Rio Grande Do Norte" into "Rio Grande do Norte". Country codes become names (e.g. "BR", "GY" or "BRA" into "Brazil" and "Guyana"). Missing countries are taken from the Brazilian state (e.g. "Bahia"), from a country name at the start or end of the locality (e.g. "Rio Negro, Brasil"), or from other records with the same state and county (e.g. "Amazonas", "Manaus"), and missing municipalities from the county. Unknown counties like "inc.sed.cty." become NA. On the Ormosia dataset, 53 country codes are converted, 35 missing countries are found, and missing municipalities go from 6,848 to 3,884.

  • barroso_std(): with unvouchered = TRUE, observations without a specimen (basisOfRecord like "HUMAN_OBSERVATION") are also removed, as well as wood, seed, fruit and pollen collections written in any case (e.g. "BCTw", "BHZBcarpo"), now before the codes are standardized.

  • std_recordedBy() and std_identifiedBy(): Chinese names written in Chinese characters (e.g. "丁广奇、余莲"), and not only as unicode escapes, are converted into Latin names ("G. Q. Ding" and "L. Yu"); when also written in Latin (e.g. "K.C.Yang 楊國禎"), the Latin name is kept.

  • std_recordedBy(): removes Wikidata identifiers and codes like "[DR-02688]", capitalizes given names in lowercase ("katherine Bravo"), abbreviates names like "Edm.Pereira", fixes "C. -I Peng" into "C.-I. Peng", and keeps names of teams and herbaria (e.g. "Equipe do Jardim Botânico de Brasília", "Belem Herbarium").

  • std_recordedBy() was refactored into small internal helpers (about half of the code), with the same results for all non-Chinese names of the Ormosia GBIF and speciesLink test datasets, and about twice as fast.

  • std_recordedBy(): Chinese names in unicode escapes are now converted into abbreviated Latin names (e.g. "G. Z. Li", as Chinese authors cite themselves), without the tmcn package, which is no longer a dependency.

  • std_recordedBy(): fixed capitalization of accented names (e.g. "DuséN"), initials followed by particles ("Martius, CFP von"), three collectors like "A. Gómez Pompa, A. J. Sharp & P. Hernández", remains of "et al.", HTML entities, and abbreviations that depended on the other names in the data.

  • barroso_flag_duplicates(): groups duplicates into blocks (duplicateGroup), flags blocks with conflicting identifications (identificationConflict, duplicateIdentifications), and stores all herbaria and catalog numbers of each block (duplicateCollectionCodes, e.g. "MO | JBB"; duplicateCatalogNumbers, e.g. "MO 2839102 | JBB 13548"). With rm_duplicates = TRUE, the record kept is identified to species, has the most frequent identification of the block, and then has coordinates and more filled columns. Records with unknown collector are no longer grouped as duplicates.

  • barroso_cat(): renames raw speciesLink columns into Darwin Core terms, combines columns with different types, adds a datasource column, and with keep_source removes only the herbaria also present in the preferred source.

Bug fixes

  • std_collection(): with custom column names, the herbarium column was renamed wrongly, so no cleaning was done, and the genus column was renamed.
  • std_place(): the original municipality and locality columns were saved as countyOriginal.1 and countyOriginal.2; they are now municipalityOriginal and localityOriginal.
  • std_place(): "French Guiana" became "Guyana" when standardized again, and "Guiane française" was not recognized.
  • std_place(): Venezuela was renamed “Venezula”, and continents were not added when the continent column was completely empty.
  • std_place(): USA state acronyms were never expanded, and their table was misaligned (e.g. AK would become Alabama); Brazilian acronyms were applied to records of all countries (e.g. AL in the USA became Alagoas); US records got no continent; and with a custom country column, states and continents were not standardized.
  • barroso_write_taxon_descr(): trait values black, and whole numbers from 8 to 16 stored as numbers (e.g. 10 stamens), were silently dropped from the descriptions. A filename with the .docx extension is now saved in the output folder.
  • barroso_write_specimens(): failed with any dataset with coordinates; missing type status, month, number and municipality were printed as NA; coordinates could show 60″; and duplicates with different type status now keep each one, e.g. [holotype HUEFS, isotype RB].
  • barroso_labels(): a specimen not found in LCVP (e.g. Ormosia sp.) got the name of the previous label; authorities of infraspecific names are shown correctly.
  • barroso_std(): failed with more than 10,000 records when the last chunk had a single record.
  • std_recordedBy(): numbers before the collector name (e.g. 8470 G.H. Turner) are moved to recordNumber.
  • std_taxa(): sp., cf. and aff. at the beginning of the epithet, and genera in capital letters, are now standardized.
  • remove_authorship(): removes all authors, e.g. Ormosia arborea (Vell.) Harms and Swartzia apetala Raddi var. glabra (Vogel) R.S.Cowan, so species_filter now matches these names.

Tests

  • Test coverage increased from 35% to 94%, with tests for all exported functions.

barRoso 1.0.0

Initial Release

The first official release of the barRoso R package — a comprehensive toolkit for standardizing, harmonizing, and preparing plant specimen records for research and reconciliation.

Highlights

  • barroso_std(): Unified function to clean and standardize herbarium records across multiple fields (collector, geography, taxonomy, etc.).
  • barroso_flag_duplicates(): Flag potential duplicate specimens across herbaria using metadata patterns.
  • barroso_cat(): Combine and reconcile specimen records from multiple virtual herbaria (e.g., GBIF, SEINet, REFLORA, JABOT, speciesLink).
  • barroso_labels(): Generate printable herbarium labels from cleaned fieldbook data, with embedded maps and taxonomic authority retrieval.
  • Standardize collector names and collection numbers using regex-based parsing
  • Harmonize taxonomic, geographic, and temporal fields
  • Flag and remove potential duplicates across herbarium records
  • Generate herbarium labels from fieldbook data
  • Integrate with external taxonomic databases (e.g., LCVP, WFO)
  • Prepare large-scale biodiversity datasets for publication and analysis
  • Optimized for datasets from REFLORA, speciesLink, and JABOT.
  • Supports integration with tidyverse workflows for downstream analyses.
  • Test coverage >95%, continuous integration via GitHub Actions.

Philosophy

Unlike other tools that aggressively clean (and discard) records, barRoso focuses on standardization first — ensuring that all specimens, even misidentified or ambiguous ones, remain usable and discoverable. Standardization also enables better duplicate detection and data reconciliation without losing valuable information.

Infrastructure

Feedback

Please report bugs or feature requests here:
https://github.com/DBOSlab/barRoso/issues