c14_parse_lab_id | R Documentation |
Splits a vector of radiocarbon lab IDs (e.g. "OxA-1234"
)
into its constituent parts: the lab code ("OxA"
) and quasi-numeric unique
identifier ("1324"
). If x
contains values that don't fit the standard
format ("OxA-1234"
or "OxA 4567"
), by default the function will attempt
to fix these with c14_fix_lab_id()
before parsing.
c14_parse_lab_id(x, fix = TRUE)
x |
Vector of lab IDs, e.g. |
fix |
If |
A data frame with two character columns: lab_code
and lab_number
. If x
is of length one, this is simplified to a named character vector of length 2.
c14_parse_lab_id(c("OxA-1234", "Ly 456", "RT 1234-5678"))
# By default, tries to fix malformed values of x before parsing
# Use fix = FALSE for strict parsing
c14_parse_lab_id(c("OxA 1234", "OxA_5678", "Gif/LSN-123"))
c14_parse_lab_id(c("OxA 1234", "OxA_5678", "Gif/LSN-123"), fix = FALSE)
# Single values of x are simplified to a character vector
c14_parse_lab_id("OxA 1234")
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.