mirror of
https://github.com/msberends/AMR.git
synced 2025-07-09 04:42:22 +02:00
fixes
This commit is contained in:
@ -1489,4 +1489,8 @@ if (getRversion() < "4.0.0") {
|
||||
}
|
||||
}
|
||||
|
||||
# for tinytest unit tests, that call AMR:::xxx():
|
||||
strrep <- strrep
|
||||
|
||||
|
||||
# nolint end
|
||||
|
@ -601,7 +601,7 @@ pm_near <- function(x, y, tol = .Machine$double.eps^0.5) {
|
||||
pm_pull <- function(.data, var = -1) {
|
||||
var_deparse <- pm_deparse_var(var)
|
||||
col_names <- colnames(.data)
|
||||
if (!(var_deparse %in% col_names) && grepl("^[[:digit:]]+L|[[:digit:]]", var_deparse)) {
|
||||
if (!(var_deparse %in% col_names) & grepl("^[[:digit:]]+L|[[:digit:]]", var_deparse)) {
|
||||
var <- as.integer(gsub("L", "", var_deparse))
|
||||
var <- pm_if_else(var < 1L, rev(col_names)[abs(var)], col_names[var])
|
||||
} else if (var_deparse %in% col_names) {
|
||||
|
1
R/mo.R
1
R/mo.R
@ -35,6 +35,7 @@
|
||||
#' This excludes enterococci at default (who are in group D), use `Lancefield = "all"` to also categorise all enterococci as group D.
|
||||
#' @param minimum_matching_score a numeric value to set as the lower limit for the [MO matching score][mo_matching_score()]. When left blank, this will be determined automatically based on the character length of `x`, its [taxonomic kingdom][microorganisms] and [human pathogenicity][mo_matching_score()].
|
||||
#' @param allow_uncertain a number between `0` (or `"none"`) and `3` (or `"all"`), or `TRUE` (= `2`) or `FALSE` (= `0`) to indicate whether the input should be checked for less probable results, see *Details*
|
||||
#' @param keep_synonyms a [logical] to indicate if old, previously valid taxonomic names must be preserved and not be corrected to currently accepted names. The default is `FALSE` to always return the currently accepted names.
|
||||
#' @param reference_df a [data.frame] to be used for extra reference when translating `x` to a valid [`mo`]. See [set_mo_source()] and [get_mo_source()] to automate the usage of your own codes (e.g. used in your analysis or organisation).
|
||||
#' @param ignore_pattern a regular expression (case-insensitive) of which all matches in `x` must return `NA`. This can be convenient to exclude known non-relevant input and can also be set with the option `AMR_ignore_pattern`, e.g. `options(AMR_ignore_pattern = "(not reported|contaminated flora)")`.
|
||||
#' @param language language to translate text like "no growth", which defaults to the system language (see [get_AMR_locale()])
|
||||
|
Reference in New Issue
Block a user