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

Replace RSI with SIR

This commit is contained in:
Dr. Matthijs Berends
2023-01-21 23:47:20 +01:00
committed by GitHub
parent 24b12024ce
commit 98e62c9af2
127 changed files with 1746 additions and 1648 deletions

View File

@ -95,6 +95,7 @@ vec_cast.character.mo <- function(x, to, ...) {
as.character(x)
}
vec_cast.mo.character <- function(x, to, ...) {
add_MO_lookup_to_AMR_env()
return_after_integrity_check(x, "microorganism code", as.character(AMR_env$MO_lookup$mo))
}
@ -141,16 +142,16 @@ vec_math.mic <- function(.fn, x, ...) {
.fn(as.double(x), ...)
}
# S3: rsi
vec_ptype2.character.rsi <- function(x, y, ...) {
# S3: sir
vec_ptype2.character.sir <- function(x, y, ...) {
x
}
vec_ptype2.rsi.character <- function(x, y, ...) {
vec_ptype2.sir.character <- function(x, y, ...) {
y
}
vec_cast.character.rsi <- function(x, to, ...) {
vec_cast.character.sir <- function(x, to, ...) {
as.character(x)
}
vec_cast.rsi.character <- function(x, to, ...) {
as.rsi(x)
vec_cast.sir.character <- function(x, to, ...) {
as.sir(x)
}