mirror of
https://github.com/msberends/AMR.git
synced 2025-07-09 00:43:00 +02:00
scientific notation for MICs
This commit is contained in:
@ -102,7 +102,7 @@ TAXONOMY_VERSION <- list(
|
||||
),
|
||||
SNOMED = list(
|
||||
accessed_date = as.Date("2021-07-01"),
|
||||
citation = "Public Health Information Network Vocabulary Access and Distribution System (PHIN VADS). US Edition of SNOMED CT from 1 September 2020. Value Set Name 'Microoganism', OID 2.16.840.1.114222.4.11.1009 (v12).",
|
||||
citation = "Public Health Information Network Vocabulary Access and Distribution System (PHIN VADS). US Edition of SNOMED CT from 1 September 2020. Value Set Name 'Microorganism', OID 2.16.840.1.114222.4.11.1009 (v12).",
|
||||
url = "https://phinvads.cdc.gov"
|
||||
),
|
||||
LOINC = list(
|
||||
@ -113,6 +113,7 @@ TAXONOMY_VERSION <- list(
|
||||
)
|
||||
|
||||
globalVariables(c(
|
||||
".GenericCallEnv",
|
||||
".mo",
|
||||
".rowid",
|
||||
".syndromic_group",
|
||||
|
2
R/mic.R
2
R/mic.R
@ -184,6 +184,8 @@ as.mic <- function(x, na.rm = FALSE) {
|
||||
|
||||
# comma to period
|
||||
x <- gsub(",", ".", x, fixed = TRUE)
|
||||
# transform scientific notation
|
||||
x[x %like% "[-]?[0-9]+([.][0-9]+)?e[-]?[0-9]+"] <- as.double(x[x %like% "[-]?[0-9]+([.][0-9]+)?e[-]?[0-9]+"])
|
||||
# transform Unicode for >= and <=
|
||||
x <- gsub("\u2264", "<=", x, fixed = TRUE)
|
||||
x <- gsub("\u2265", ">=", x, fixed = TRUE)
|
||||
|
Reference in New Issue
Block a user