mirror of
https://github.com/msberends/AMR.git
synced 2025-07-12 19:41:58 +02:00
(v1.7.1.9070) Better WHONET support
This commit is contained in:
2
R/ab.R
2
R/ab.R
@ -155,7 +155,7 @@ as.ab <- function(x, flag_multiple_results = TRUE, info = interactive(), ...) {
|
||||
x[known_codes_atc],
|
||||
function(x_) which(vapply(FUN.VALUE = logical(1),
|
||||
AB_lookup$atc,
|
||||
function(atc) x_ %in% atc)),
|
||||
function(atc) x_ %in% atc))[1L],
|
||||
USE.NAMES = FALSE)]
|
||||
x_new[known_codes_cid] <- AB_lookup$ab[match(x[known_codes_cid], AB_lookup$cid)]
|
||||
already_known <- known_names | known_codes_ab | known_codes_atc | known_codes_cid
|
||||
|
Reference in New Issue
Block a user