mirror of
https://github.com/msberends/AMR.git
synced 2025-07-10 19:41:55 +02:00
Implement extensive support for antiviral agents support (#77)
This commit is contained in:
committed by
GitHub
parent
d2edcf51ad
commit
496c08d851
14
R/vctrs.R
14
R/vctrs.R
@ -70,6 +70,20 @@ vec_cast.ab.character <- function(x, to, ...) {
|
||||
return_after_integrity_check(x, "antimicrobial code", as.character(AMR_env$AB_lookup$ab))
|
||||
}
|
||||
|
||||
# S3: av
|
||||
vec_ptype2.character.av <- function(x, y, ...) {
|
||||
x
|
||||
}
|
||||
vec_ptype2.av.character <- function(x, y, ...) {
|
||||
y
|
||||
}
|
||||
vec_cast.character.av <- function(x, to, ...) {
|
||||
as.character(x)
|
||||
}
|
||||
vec_cast.av.character <- function(x, to, ...) {
|
||||
return_after_integrity_check(x, "antiviral agent code", as.character(AMR_env$AV_lookup$av))
|
||||
}
|
||||
|
||||
# S3: mo
|
||||
vec_ptype2.character.mo <- function(x, y, ...) {
|
||||
x
|
||||
|
Reference in New Issue
Block a user