mirror of
https://github.com/msberends/AMR.git
synced 2025-01-13 19:31:38 +01:00
Fix translatable strings
This commit is contained in:
parent
ed70f95380
commit
1a02d302d4
@ -1,6 +1,6 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 2.0.0.9006
|
Version: 2.0.0.9007
|
||||||
Date: 2023-04-14
|
Date: 2023-04-15
|
||||||
Title: Antimicrobial Resistance Data Analysis
|
Title: Antimicrobial Resistance Data Analysis
|
||||||
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
Description: Functions to simplify and standardise antimicrobial resistance (AMR)
|
||||||
data analysis and to work with microbial and antimicrobial properties by
|
data analysis and to work with microbial and antimicrobial properties by
|
||||||
|
2
NEWS.md
2
NEWS.md
@ -1,4 +1,4 @@
|
|||||||
# AMR 2.0.0.9006
|
# AMR 2.0.0.9007
|
||||||
|
|
||||||
## Changed
|
## Changed
|
||||||
* formatting fix for `sir_interpretation_history()`
|
* formatting fix for `sir_interpretation_history()`
|
||||||
|
24
R/mo.R
24
R/mo.R
@ -947,25 +947,25 @@ convert_colloquial_input <- function(x) {
|
|||||||
out <- rep(NA_character_, length(x))
|
out <- rep(NA_character_, length(x))
|
||||||
|
|
||||||
# Streptococci, like GBS = Group B Streptococci (B_STRPT_GRPB)
|
# Streptococci, like GBS = Group B Streptococci (B_STRPT_GRPB)
|
||||||
out[x %like_case% "^g[abcdfghkl]s$"] <- gsub("g([abcdfghkl])s",
|
out[x %like_case% "^g[abcdefghijkl]s$"] <- gsub("g([abcdefghijkl])s",
|
||||||
"B_STRPT_GRP\\U\\1",
|
"B_STRPT_GRP\\U\\1",
|
||||||
x[x %like_case% "^g[abcdfghkl]s$"],
|
x[x %like_case% "^g[abcdefghijkl]s$"],
|
||||||
perl = TRUE
|
perl = TRUE
|
||||||
)
|
)
|
||||||
# Streptococci in different languages, like "estreptococos grupo B"
|
# Streptococci in different languages, like "estreptococos grupo B"
|
||||||
out[x %like_case% "strepto[ck]o[ck].* [abcdfghkl]$"] <- gsub(".*e?strepto[ck]o[ck].* ([abcdfghkl])$",
|
out[x %like_case% "strepto[ck]o[ck].* [abcdefghijkl]$"] <- gsub(".*e?strepto[ck]o[ck].* ([abcdefghijkl])$",
|
||||||
"B_STRPT_GRP\\U\\1",
|
"B_STRPT_GRP\\U\\1",
|
||||||
x[x %like_case% "strepto[ck]o[ck].* [abcdfghkl]$"],
|
x[x %like_case% "strepto[ck]o[ck].* [abcdefghijkl]$"],
|
||||||
perl = TRUE
|
perl = TRUE
|
||||||
)
|
)
|
||||||
out[x %like_case% "strep[a-z]* group [abcdfghkl]$"] <- gsub(".* ([abcdfghkl])$",
|
out[x %like_case% "strep[a-z]* group [abcdefghijkl]$"] <- gsub(".* ([abcdefghijkl])$",
|
||||||
"B_STRPT_GRP\\U\\1",
|
"B_STRPT_GRP\\U\\1",
|
||||||
x[x %like_case% "strep[a-z]* group [abcdfghkl]$"],
|
x[x %like_case% "strep[a-z]* group [abcdefghijkl]$"],
|
||||||
perl = TRUE
|
perl = TRUE
|
||||||
)
|
)
|
||||||
out[x %like_case% "group [abcdfghkl] strepto[ck]o[ck]"] <- gsub(".*group ([abcdfghkl]) strepto[ck]o[ck].*",
|
out[x %like_case% "group [abcdefghijkl] strepto[ck]o[ck]"] <- gsub(".*group ([abcdefghijkl]) strepto[ck]o[ck].*",
|
||||||
"B_STRPT_GRP\\U\\1",
|
"B_STRPT_GRP\\U\\1",
|
||||||
x[x %like_case% "group [abcdfghkl] strepto[ck]o[ck]"],
|
x[x %like_case% "group [abcdefghijkl] strepto[ck]o[ck]"],
|
||||||
perl = TRUE
|
perl = TRUE
|
||||||
)
|
)
|
||||||
out[x %like_case% "ha?emoly.*strep"] <- "B_STRPT_HAEM"
|
out[x %like_case% "ha?emoly.*strep"] <- "B_STRPT_HAEM"
|
||||||
@ -975,14 +975,14 @@ convert_colloquial_input <- function(x) {
|
|||||||
out[x %like_case% "(viridans.* (strepto|^s).*|^vgs[^a-z]*$)"] <- "B_STRPT_VIRI"
|
out[x %like_case% "(viridans.* (strepto|^s).*|^vgs[^a-z]*$)"] <- "B_STRPT_VIRI"
|
||||||
|
|
||||||
# Salmonella in different languages, like "Salmonella grupo B"
|
# Salmonella in different languages, like "Salmonella grupo B"
|
||||||
out[x %like_case% "salmonella.* [abcd]$"] <- gsub(".*salmonella.* ([abcd])$",
|
out[x %like_case% "salmonella.* [abcdefgh]$"] <- gsub(".*salmonella.* ([abcdefgh])$",
|
||||||
"B_SLMNL_GRP\\U\\1",
|
"B_SLMNL_GRP\\U\\1",
|
||||||
x[x %like_case% "salmonella.* [abcd]$"],
|
x[x %like_case% "salmonella.* [abcdefgh]$"],
|
||||||
perl = TRUE
|
perl = TRUE
|
||||||
)
|
)
|
||||||
out[x %like_case% "group [abcd] salmonella"] <- gsub(".*group ([abcd]) salmonella*",
|
out[x %like_case% "group [abcdefgh] salmonella"] <- gsub(".*group ([abcdefgh]) salmonella*",
|
||||||
"B_SLMNL_GRP\\U\\1",
|
"B_SLMNL_GRP\\U\\1",
|
||||||
x[x %like_case% "group [abcd] salmonella"],
|
x[x %like_case% "group [abcdefgh] salmonella"],
|
||||||
perl = TRUE
|
perl = TRUE
|
||||||
)
|
)
|
||||||
|
|
||||||
|
BIN
R/sysdata.rda
BIN
R/sysdata.rda
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1 +1 @@
|
|||||||
3d92820386230a7ac3c9367ce6d96db9
|
aec0e9d495ebee3079f9aab766d7a38f
|
||||||
|
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
@ -1380,6 +1380,9 @@ for (nm in to_restore) {
|
|||||||
|
|
||||||
# Save to package ---------------------------------------------------------
|
# Save to package ---------------------------------------------------------
|
||||||
|
|
||||||
|
# set class <mo> if still needed (if you run only this part coming from other scripts)
|
||||||
|
class(microorganisms$mo) <- c("mo", "character")
|
||||||
|
microorganisms <- microorganisms %>% arrange(fullname)
|
||||||
usethis::use_data(microorganisms, overwrite = TRUE, version = 2, compress = "xz")
|
usethis::use_data(microorganisms, overwrite = TRUE, version = 2, compress = "xz")
|
||||||
rm(microorganisms)
|
rm(microorganisms)
|
||||||
|
|
||||||
|
Binary file not shown.
@ -280,7 +280,7 @@ expect_equal(length(summary(example_isolates$mo)), 6)
|
|||||||
|
|
||||||
# WHONET codes and NA/NaN
|
# WHONET codes and NA/NaN
|
||||||
expect_equal(
|
expect_equal(
|
||||||
as.character(as.mo(c("xxx", "na", "nan"), debug = TRUE)),
|
as.character(as.mo(c("xxx", "na", "nan"))),
|
||||||
rep(NA_character_, 3)
|
rep(NA_character_, 3)
|
||||||
)
|
)
|
||||||
expect_equal(as.character(as.mo("con")), "UNKNOWN")
|
expect_equal(as.character(as.mo("con")), "UNKNOWN")
|
||||||
|
Loading…
Reference in New Issue
Block a user