mirror of
https://github.com/msberends/AMR.git
synced 2026-10-01 04:13:33 +02:00
(v1.4.0.9002) bugfix
This commit is contained in:
1 parent
4e9ccb4435
commit
ddae8085e1
14 files changed
+50
-50
No files matched your search
+1
-1
@@ -1,5 +1,5 @@
|
|||||||
Package: AMR
|
Package: AMR
|
||||||
Version: 1.4.0.9001
|
Version: 1.4.0.9002
|
||||||
Date: 2020-10-19
|
Date: 2020-10-19
|
||||||
Title: Antimicrobial Resistance Analysis
|
Title: Antimicrobial Resistance Analysis
|
||||||
Authors@R: c(
|
Authors@R: c(
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
# AMR 1.4.0.9001
|
# AMR 1.4.0.9002
|
||||||
## <small>Last updated: 19 October 2020</small>
|
## <small>Last updated: 19 October 2020</small>
|
||||||
|
|
||||||
### New
|
### New
|
||||||
|
|||||||
@@ -82,7 +82,7 @@
|
|||||||
#' ab_name("J01FA01") # "Erythromycin"
|
#' ab_name("J01FA01") # "Erythromycin"
|
||||||
#' ab_name("eryt") # "Erythromycin"
|
#' ab_name("eryt") # "Erythromycin"
|
||||||
as.ab <- function(x, flag_multiple_results = TRUE, info = TRUE, ...) {
|
as.ab <- function(x, flag_multiple_results = TRUE, info = TRUE, ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_class = c("character", "numeric", "integer", "factor"), allow_NA = TRUE)
|
||||||
meet_criteria(flag_multiple_results, allow_class = "logical", has_length = 1)
|
meet_criteria(flag_multiple_results, allow_class = "logical", has_length = 1)
|
||||||
meet_criteria(info, allow_class = "logical", has_length = 1)
|
meet_criteria(info, allow_class = "logical", has_length = 1)
|
||||||
|
|
||||||
|
|||||||
@@ -158,7 +158,7 @@ as.mo <- function(x,
|
|||||||
ignore_pattern = getOption("AMR_ignore_pattern"),
|
ignore_pattern = getOption("AMR_ignore_pattern"),
|
||||||
language = get_locale(),
|
language = get_locale(),
|
||||||
...) {
|
...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(Becker, allow_class = c("logical", "character"), has_length = 1)
|
meet_criteria(Becker, allow_class = c("logical", "character"), has_length = 1)
|
||||||
meet_criteria(Lancefield, allow_class = c("logical", "character"), has_length = 1)
|
meet_criteria(Lancefield, allow_class = c("logical", "character"), has_length = 1)
|
||||||
meet_criteria(allow_uncertain, allow_class = c("logical", "numeric", "integer"), has_length = 1)
|
meet_criteria(allow_uncertain, allow_class = c("logical", "numeric", "integer"), has_length = 1)
|
||||||
@@ -275,7 +275,7 @@ exec_as.mo <- function(x,
|
|||||||
actual_uncertainty = 1,
|
actual_uncertainty = 1,
|
||||||
actual_input = NULL,
|
actual_input = NULL,
|
||||||
language = get_locale()) {
|
language = get_locale()) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(Becker, allow_class = c("logical", "character"), has_length = 1)
|
meet_criteria(Becker, allow_class = c("logical", "character"), has_length = 1)
|
||||||
meet_criteria(Lancefield, allow_class = c("logical", "character"), has_length = 1)
|
meet_criteria(Lancefield, allow_class = c("logical", "character"), has_length = 1)
|
||||||
meet_criteria(allow_uncertain, allow_class = c("logical", "numeric", "integer"), has_length = 1)
|
meet_criteria(allow_uncertain, allow_class = c("logical", "numeric", "integer"), has_length = 1)
|
||||||
|
|||||||
+33
-33
@@ -146,7 +146,7 @@
|
|||||||
#' mo_info("E. coli")
|
#' mo_info("E. coli")
|
||||||
#' }
|
#' }
|
||||||
mo_name <- function(x, language = get_locale(), ...) {
|
mo_name <- function(x, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
translate_AMR(mo_validate(x = x, property = "fullname", language = language, ...), language = language, only_unknown = FALSE)
|
translate_AMR(mo_validate(x = x, property = "fullname", language = language, ...), language = language, only_unknown = FALSE)
|
||||||
@@ -159,7 +159,7 @@ mo_fullname <- mo_name
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_shortname <- function(x, language = get_locale(), ...) {
|
mo_shortname <- function(x, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
x.mo <- as.mo(x, language = language, ...)
|
x.mo <- as.mo(x, language = language, ...)
|
||||||
@@ -192,7 +192,7 @@ mo_shortname <- function(x, language = get_locale(), ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_subspecies <- function(x, language = get_locale(), ...) {
|
mo_subspecies <- function(x, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
translate_AMR(mo_validate(x = x, property = "subspecies", language = language, ...), language = language, only_unknown = TRUE)
|
translate_AMR(mo_validate(x = x, property = "subspecies", language = language, ...), language = language, only_unknown = TRUE)
|
||||||
@@ -201,7 +201,7 @@ mo_subspecies <- function(x, language = get_locale(), ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_species <- function(x, language = get_locale(), ...) {
|
mo_species <- function(x, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
translate_AMR(mo_validate(x = x, property = "species", language = language, ...), language = language, only_unknown = TRUE)
|
translate_AMR(mo_validate(x = x, property = "species", language = language, ...), language = language, only_unknown = TRUE)
|
||||||
@@ -210,7 +210,7 @@ mo_species <- function(x, language = get_locale(), ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_genus <- function(x, language = get_locale(), ...) {
|
mo_genus <- function(x, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
translate_AMR(mo_validate(x = x, property = "genus", language = language, ...), language = language, only_unknown = TRUE)
|
translate_AMR(mo_validate(x = x, property = "genus", language = language, ...), language = language, only_unknown = TRUE)
|
||||||
@@ -219,7 +219,7 @@ mo_genus <- function(x, language = get_locale(), ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_family <- function(x, language = get_locale(), ...) {
|
mo_family <- function(x, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
translate_AMR(mo_validate(x = x, property = "family", language = language, ...), language = language, only_unknown = TRUE)
|
translate_AMR(mo_validate(x = x, property = "family", language = language, ...), language = language, only_unknown = TRUE)
|
||||||
@@ -228,7 +228,7 @@ mo_family <- function(x, language = get_locale(), ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_order <- function(x, language = get_locale(), ...) {
|
mo_order <- function(x, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
translate_AMR(mo_validate(x = x, property = "order", language = language, ...), language = language, only_unknown = TRUE)
|
translate_AMR(mo_validate(x = x, property = "order", language = language, ...), language = language, only_unknown = TRUE)
|
||||||
@@ -237,7 +237,7 @@ mo_order <- function(x, language = get_locale(), ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_class <- function(x, language = get_locale(), ...) {
|
mo_class <- function(x, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
translate_AMR(mo_validate(x = x, property = "class", language = language, ...), language = language, only_unknown = TRUE)
|
translate_AMR(mo_validate(x = x, property = "class", language = language, ...), language = language, only_unknown = TRUE)
|
||||||
@@ -246,7 +246,7 @@ mo_class <- function(x, language = get_locale(), ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_phylum <- function(x, language = get_locale(), ...) {
|
mo_phylum <- function(x, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
translate_AMR(mo_validate(x = x, property = "phylum", language = language, ...), language = language, only_unknown = TRUE)
|
translate_AMR(mo_validate(x = x, property = "phylum", language = language, ...), language = language, only_unknown = TRUE)
|
||||||
@@ -255,7 +255,7 @@ mo_phylum <- function(x, language = get_locale(), ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_kingdom <- function(x, language = get_locale(), ...) {
|
mo_kingdom <- function(x, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
translate_AMR(mo_validate(x = x, property = "kingdom", language = language, ...), language = language, only_unknown = TRUE)
|
translate_AMR(mo_validate(x = x, property = "kingdom", language = language, ...), language = language, only_unknown = TRUE)
|
||||||
@@ -268,7 +268,7 @@ mo_domain <- mo_kingdom
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_type <- function(x, language = get_locale(), ...) {
|
mo_type <- function(x, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
translate_AMR(mo_validate(x = x, property = "kingdom", language = language, ...), language = language, only_unknown = FALSE)
|
translate_AMR(mo_validate(x = x, property = "kingdom", language = language, ...), language = language, only_unknown = FALSE)
|
||||||
@@ -277,7 +277,7 @@ mo_type <- function(x, language = get_locale(), ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_gramstain <- function(x, language = get_locale(), ...) {
|
mo_gramstain <- function(x, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
x.mo <- as.mo(x, language = language, ...)
|
x.mo <- as.mo(x, language = language, ...)
|
||||||
@@ -311,7 +311,7 @@ mo_gramstain <- function(x, language = get_locale(), ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
is_gram_negative <- function(x, ...) {
|
is_gram_negative <- function(x, ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
grams <- mo_gramstain(x, language = NULL, ...)
|
grams <- mo_gramstain(x, language = NULL, ...)
|
||||||
"Gram-negative" == grams & !is.na(grams)
|
"Gram-negative" == grams & !is.na(grams)
|
||||||
}
|
}
|
||||||
@@ -319,7 +319,7 @@ is_gram_negative <- function(x, ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
is_gram_positive <- function(x, ...) {
|
is_gram_positive <- function(x, ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
grams <- mo_gramstain(x, language = NULL, ...)
|
grams <- mo_gramstain(x, language = NULL, ...)
|
||||||
"Gram-positive" == grams & !is.na(grams)
|
"Gram-positive" == grams & !is.na(grams)
|
||||||
}
|
}
|
||||||
@@ -327,7 +327,7 @@ is_gram_positive <- function(x, ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_snomed <- function(x, language = get_locale(), ...) {
|
mo_snomed <- function(x, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
mo_validate(x = x, property = "snomed", language = language, ...)
|
mo_validate(x = x, property = "snomed", language = language, ...)
|
||||||
@@ -336,7 +336,7 @@ mo_snomed <- function(x, language = get_locale(), ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_ref <- function(x, language = get_locale(), ...) {
|
mo_ref <- function(x, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
mo_validate(x = x, property = "ref", language = language, ...)
|
mo_validate(x = x, property = "ref", language = language, ...)
|
||||||
@@ -345,7 +345,7 @@ mo_ref <- function(x, language = get_locale(), ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_authors <- function(x, language = get_locale(), ...) {
|
mo_authors <- function(x, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
x <- mo_validate(x = x, property = "ref", language = language, ...)
|
x <- mo_validate(x = x, property = "ref", language = language, ...)
|
||||||
@@ -357,7 +357,7 @@ mo_authors <- function(x, language = get_locale(), ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_year <- function(x, language = get_locale(), ...) {
|
mo_year <- function(x, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
x <- mo_validate(x = x, property = "ref", language = language, ...)
|
x <- mo_validate(x = x, property = "ref", language = language, ...)
|
||||||
@@ -369,7 +369,7 @@ mo_year <- function(x, language = get_locale(), ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_rank <- function(x, language = get_locale(), ...) {
|
mo_rank <- function(x, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
mo_validate(x = x, property = "rank", language = language, ...)
|
mo_validate(x = x, property = "rank", language = language, ...)
|
||||||
@@ -378,20 +378,20 @@ mo_rank <- function(x, language = get_locale(), ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_taxonomy <- function(x, language = get_locale(), ...) {
|
mo_taxonomy <- function(x, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
x <- as.mo(x, language = language, ...)
|
x <- as.mo(x, language = language, ...)
|
||||||
metadata <- get_mo_failures_uncertainties_renamed()
|
metadata <- get_mo_failures_uncertainties_renamed()
|
||||||
|
|
||||||
result <- list(kingdom = mo_kingdom(x, language = language),
|
result <- list(kingdom = mo_kingdom(x, language = language),
|
||||||
phylum = mo_phylum(x, language = language),
|
phylum = mo_phylum(x, language = language),
|
||||||
class = mo_class(x, language = language),
|
class = mo_class(x, language = language),
|
||||||
order = mo_order(x, language = language),
|
order = mo_order(x, language = language),
|
||||||
family = mo_family(x, language = language),
|
family = mo_family(x, language = language),
|
||||||
genus = mo_genus(x, language = language),
|
genus = mo_genus(x, language = language),
|
||||||
species = mo_species(x, language = language),
|
species = mo_species(x, language = language),
|
||||||
subspecies = mo_subspecies(x, language = language))
|
subspecies = mo_subspecies(x, language = language))
|
||||||
|
|
||||||
load_mo_failures_uncertainties_renamed(metadata)
|
load_mo_failures_uncertainties_renamed(metadata)
|
||||||
result
|
result
|
||||||
@@ -400,7 +400,7 @@ mo_taxonomy <- function(x, language = get_locale(), ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_synonyms <- function(x, language = get_locale(), ...) {
|
mo_synonyms <- function(x, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
x <- as.mo(x, language = language, ...)
|
x <- as.mo(x, language = language, ...)
|
||||||
@@ -429,7 +429,7 @@ mo_synonyms <- function(x, language = get_locale(), ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_info <- function(x, language = get_locale(), ...) {
|
mo_info <- function(x, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
x <- as.mo(x, language = language, ...)
|
x <- as.mo(x, language = language, ...)
|
||||||
@@ -455,7 +455,7 @@ mo_info <- function(x, language = get_locale(), ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_url <- function(x, open = FALSE, language = get_locale(), ...) {
|
mo_url <- function(x, open = FALSE, language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(open, allow_class = "logical", has_length = 1)
|
meet_criteria(open, allow_class = "logical", has_length = 1)
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
@@ -464,7 +464,7 @@ mo_url <- function(x, open = FALSE, language = get_locale(), ...) {
|
|||||||
metadata <- get_mo_failures_uncertainties_renamed()
|
metadata <- get_mo_failures_uncertainties_renamed()
|
||||||
|
|
||||||
df <- data.frame(mo, stringsAsFactors = FALSE) %pm>%
|
df <- data.frame(mo, stringsAsFactors = FALSE) %pm>%
|
||||||
pm_left_join(pm_select(microorganisms, mo, source, species_id), by = "mo")
|
pm_left_join(pm_select(microorganisms, mo, source, species_id), by = "mo")
|
||||||
df$url <- ifelse(df$source == "CoL",
|
df$url <- ifelse(df$source == "CoL",
|
||||||
paste0(catalogue_of_life$url_CoL, "details/species/id/", df$species_id, "/"),
|
paste0(catalogue_of_life$url_CoL, "details/species/id/", df$species_id, "/"),
|
||||||
ifelse(df$source == "DSMZ",
|
ifelse(df$source == "DSMZ",
|
||||||
@@ -488,10 +488,10 @@ mo_url <- function(x, open = FALSE, language = get_locale(), ...) {
|
|||||||
#' @rdname mo_property
|
#' @rdname mo_property
|
||||||
#' @export
|
#' @export
|
||||||
mo_property <- function(x, property = "fullname", language = get_locale(), ...) {
|
mo_property <- function(x, property = "fullname", language = get_locale(), ...) {
|
||||||
meet_criteria(x, allow_class = c("character", "data.frame", "list", "numeric", "integer"), allow_NA = TRUE)
|
meet_criteria(x, allow_NA = TRUE)
|
||||||
meet_criteria(property, allow_class = "character", has_length = 1, is_in = colnames(microorganisms))
|
meet_criteria(property, allow_class = "character", has_length = 1, is_in = colnames(microorganisms))
|
||||||
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
meet_criteria(language, has_length = 1, is_in = c(LANGUAGES_SUPPORTED, ""), allow_NULL = TRUE, allow_NA = TRUE)
|
||||||
|
|
||||||
translate_AMR(mo_validate(x = x, property = property, language = language, ...), language = language, only_unknown = TRUE)
|
translate_AMR(mo_validate(x = x, property = property, language = language, ...), language = language, only_unknown = TRUE)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -81,7 +81,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="https://msberends.github.io/AMR//index.html">AMR (for R)</a>
|
<a class="navbar-link" href="https://msberends.github.io/AMR//index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9001</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9002</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9001</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9002</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9001</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9002</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -81,7 +81,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9001</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9002</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -43,7 +43,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9001</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9002</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9001</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9002</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
@@ -236,9 +236,9 @@
|
|||||||
<small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
|
<small>Source: <a href='https://github.com/msberends/AMR/blob/master/NEWS.md'><code>NEWS.md</code></a></small>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<div id="amr-1409001" class="section level1">
|
<div id="amr-1409002" class="section level1">
|
||||||
<h1 class="page-header" data-toc-text="1.4.0.9001">
|
<h1 class="page-header" data-toc-text="1.4.0.9002">
|
||||||
<a href="#amr-1409001" class="anchor"></a>AMR 1.4.0.9001<small> Unreleased </small>
|
<a href="#amr-1409002" class="anchor"></a>AMR 1.4.0.9002<small> Unreleased </small>
|
||||||
</h1>
|
</h1>
|
||||||
<div id="last-updated-19-october-2020" class="section level2">
|
<div id="last-updated-19-october-2020" class="section level2">
|
||||||
<h2 class="hasAnchor">
|
<h2 class="hasAnchor">
|
||||||
|
|||||||
+1
-1
@@ -12,7 +12,7 @@ articles:
|
|||||||
datasets: datasets.html
|
datasets: datasets.html
|
||||||
resistance_predict: resistance_predict.html
|
resistance_predict: resistance_predict.html
|
||||||
welcome_to_AMR: welcome_to_AMR.html
|
welcome_to_AMR: welcome_to_AMR.html
|
||||||
last_built: 2020-10-19T15:08Z
|
last_built: 2020-10-19T18:44Z
|
||||||
urls:
|
urls:
|
||||||
reference: https://msberends.github.io/AMR//reference
|
reference: https://msberends.github.io/AMR//reference
|
||||||
article: https://msberends.github.io/AMR//articles
|
article: https://msberends.github.io/AMR//articles
|
||||||
|
|||||||
@@ -81,7 +81,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
<a class="navbar-link" href="../index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9001</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9002</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
+1
-1
@@ -81,7 +81,7 @@
|
|||||||
</button>
|
</button>
|
||||||
<span class="navbar-brand">
|
<span class="navbar-brand">
|
||||||
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
<a class="navbar-link" href="index.html">AMR (for R)</a>
|
||||||
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9001</span>
|
<span class="version label label-default" data-toggle="tooltip" data-placement="bottom" title="Latest development version">1.4.0.9002</span>
|
||||||
</span>
|
</span>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|||||||
Reference in new issue
Block a user