Standardises a vector of radiocarbon laboratory identifiers to a common
format. Specifically, this c14_control_lab_id()
:
Fixes malformed identifiers with
c14_fix_lab_id()
Parses the lab code and lab number components (
c14_parse_lab_id()
)Standardises lab codes against a thesaurus, by default c14_lab_code_thesaurus
Reunites lab codes and numbers with a uniform seperator (default:
"-"
)
Usage
c14_control_lab_id(
x,
thesaurus = c14_lab_code_thesaurus,
sep = "-",
quiet = FALSE,
warn_unmatched = TRUE
)
Arguments
- x
Vector of radiocarbon laboratory identifiers.
- thesaurus
Thesaurus to use for lab codes. Defaults to the c14_lab_code_thesaurus thesaraus included in the package.
- sep
Character to use to seperate lab codes and numbers in the result. Default:
"-"
.- quiet
Passed to
controller::control()
. Set toTRUE
to suppress messages about replaced values. Default:FALSE
.- warn_unmatched
Passed to
controller::control()
. Set toFALSE
to suppress warnings about unmatched values. Default:TRUE
.
Examples
c14_control_lab_id(c("OxA-1234", "OxA 1234", "Oxa 1234"))
#> Replaced values:
#> ℹ Oxa → OxA
#> [1] "OxA-1234" "OxA-1234" "OxA-1234"