Skip to content

Commit

Permalink
Fix c14_control_lab_id()
Browse files Browse the repository at this point in the history
  • Loading branch information
joeroe committed May 7, 2024
1 parent 2e7e267 commit 3291065
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion R/lab_id.R
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,9 @@
#' @return
#' Vector the same length as `x` with controlled laboratory identifiers.
#'
#' @example
#' c14_control_lab_id(c("OxA-1234", "OxA 1234", "Oxa 1234"))
#'
#' @export
c14_control_lab_id <- function(x,
thesaurus = c14_lab_code_thesaurus,
Expand Down Expand Up @@ -79,7 +82,7 @@ c14_parse_lab_id <- function(x, fix = TRUE) {
x <- stringr::str_match(x, c14_lab_id_std())
x <- x[, 2:3]

nm <- c("lab_code", "lab_num")
nm <- c("lab_code", "lab_number")
if (length(x) > 2) {
x <- as.data.frame(x, stringsAsFactors = FALSE)
colnames(x) <- nm
Expand Down

0 comments on commit 3291065

Please sign in to comment.