1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-09 17:02:03 +02:00

fix for binding rows

This commit is contained in:
2023-02-12 11:20:14 +01:00
parent c51fb24363
commit c740967cf2
15 changed files with 40 additions and 57 deletions

6
R/ab.R
View File

@ -495,15 +495,13 @@ as.ab <- function(x, flag_multiple_results = TRUE, info = interactive(), ...) {
# save to package env to save time for next time
if (isTRUE(initial_search)) {
AMR_env$ab_previously_coerced <- AMR_env$ab_previously_coerced[which(!AMR_env$ab_previously_coerced$x %in% x), , drop = FALSE]
AMR_env$ab_previously_coerced <- unique(pm_bind_rows(AMR_env$ab_previously_coerced,
AMR_env$ab_previously_coerced <- unique(rbind2(AMR_env$ab_previously_coerced,
data.frame(
x = x,
ab = x_new,
x_bak = x_bak[match(x, x_bak_clean)],
stringsAsFactors = FALSE
),
stringsAsFactors = FALSE
))
)))
}
# take failed ATC codes apart from rest