(v3.0.1.9027) Fixes #252 and add documentation update regarding #253

This commit is contained in:
dr. M.S. (Matthijs) Berends committed 2026-03-06 13:10:33 +01:00
1 parent 60e8f2bae6
commit c0a394008e
7 files changed
+20 -11

No files matched your search

+1
View File
@@ -568,6 +568,7 @@ as.sir.default <- function(x,
x[x %like% "dose"] <- "SDD"
mtch <- grepl(paste0("(", S, "|", I, "|", R, "|", NI, "|", SDD, "|", WT, "|", NWT, "|", NS, "|[A-Z]+)"), x, perl = TRUE)
x[!mtch] <- ""
x[mtch] <- trimws2(gsub("[^\\p{L}]", "", x[mtch], perl = TRUE)) # \p{L} is the Unicode category for all letters, including those with diacritics
# apply regexes set by user
x[x %like% S] <- "S"
x[x %like% I] <- "I"