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

better as.mo handling

This commit is contained in:
2018-12-06 14:36:39 +01:00
parent 5cfa5bbfe3
commit 60fe98bbbd
9 changed files with 204 additions and 50 deletions

View File

@@ -461,6 +461,15 @@ mo_validate <- function(x, property, ...) {
Lancefield <- FALSE
}
if (!"AMR" %in% base::.packages()) {
library("AMR")
# These data.tables are available as data sets when the AMR package is loaded:
# microorganismsDT # this one is sorted by kingdom (B<F<P), prevalence, TSN
# microorganisms.prevDT # same as microorganismsDT, but with prevalence != 9999
# microorganisms.unprevDT # same as microorganismsDT, but with prevalence == 9999
# microorganisms.oldDT # old taxonomic names, sorted by name (genus+species), TSN
}
if (!all(x %in% microorganismsDT[[property]])
| Becker %in% c(TRUE, "all")
| Lancefield %in% c(TRUE, "all")) {