mirror of
https://github.com/msberends/AMR.git
synced 2025-07-10 05:41:59 +02:00
allow column name for ab
in as.sir()
This commit is contained in:
@ -129,6 +129,10 @@ ab_from_text <- function(text,
|
||||
text_split_all <- text_split_all[nchar(text_split_all) >= 4 & grepl("[a-z]+", text_split_all)]
|
||||
result <- lapply(text_split_all, function(text_split) {
|
||||
progress$tick()
|
||||
text_split <- text_split[text_split %like% "[A-Z]" & text_split %unlike% "[0-9]"]
|
||||
if (length(text_split) == 0) {
|
||||
return(as.ab(NA_character_))
|
||||
}
|
||||
suppressWarnings(
|
||||
as.ab(text_split, ...)
|
||||
)
|
||||
|
Reference in New Issue
Block a user