News
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 buildsdateIdentifiedfrom the year, month and day of identification, adds the author toscientificName, splits epithets like"cf. platychila"or"stygium var. annulatum", and takes a missingrecordNumberfromfieldNumber.barroso_cat()now runs it on each source.std_identifiedBy(): standardizes determiner names inidentifiedBywith the same rules ofstd_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 ofbarroso_std()(new argumentcolname_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 readablecoordinateIssuescolumn.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) becomeNA, 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 likecountryCode, 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 becomesNA, 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 withcatalog_numbers = TRUE), without type status. The phenology (columnphenology, as in records from REFLORA and JABOT, orreproductiveCondition, 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.". Withlanguage, 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 inheader(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 argumentsxlsx_path,species_cols,species_filterand thecolname_*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 frominstitutionCode; generic words ("Botany","Herbarium","Vascular Plants") take the acronym frominstitutionCode,catalogNumber(e.g."U.1317533","D. Cardoso 2118 (HUEFS)") oroccurrenceID; 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 becomeNA. On the Ormosia dataset, 367 codes become 298 acronyms.std_place(): words for municipality incountyandmunicipalityare 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."becomeNA. 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(): withunvouchered = TRUE, observations without a specimen (basisOfRecordlike"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()andstd_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 thetmcnpackage, 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"). Withrm_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 adatasourcecolumn, and withkeep_sourceremoves 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 thegenuscolumn was renamed.std_place(): the original municipality and locality columns were saved ascountyOriginal.1andcountyOriginal.2; they are nowmunicipalityOriginalandlocalityOriginal.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.AKwould becomeAlabama); Brazilian acronyms were applied to records of all countries (e.g.ALin the USA becameAlagoas); US records got no continent; and with a custom country column, states and continents were not standardized.barroso_write_taxon_descr(): trait valuesblack, and whole numbers from 8 to 16 stored as numbers (e.g. 10 stamens), were silently dropped from the descriptions. Afilenamewith the.docxextension 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 asNA; coordinates could show60″; 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 torecordNumber.std_taxa():sp.,cf.andaff.at the beginning of the epithet, and genera in capital letters, are now standardized.remove_authorship(): removes all authors, e.g.Ormosia arborea (Vell.) HarmsandSwartzia apetala Raddi var. glabra (Vogel) R.S.Cowan, sospecies_filternow 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
- MIT license.
- GitHub Actions: R-CMD-check, test coverage, continuous integration.
- Website: barRoso documentation site
Feedback
Please report bugs or feature requests here:
https://github.com/DBOSlab/barRoso/issues