mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 13:21:50 +02:00
(v1.4.0.9001) is_gram_positive(), is_gram_negative(), parameter hardening
This commit is contained in:
@ -27,5 +27,6 @@ context("deprecated.R")
|
||||
|
||||
test_that("deprecated functions work", {
|
||||
skip_on_cran()
|
||||
# if some functions get deprecated, put the tests here
|
||||
expect_identical(suppressWarnings(p_symbol(c(0.001, 0.01, 0.05, 0.1, 1, NA, 3))),
|
||||
c("***", "**", "*", ".", " ", NA, NA))
|
||||
})
|
||||
|
@ -112,4 +112,9 @@ test_that("mo_property works", {
|
||||
stringsAsFactors = FALSE)
|
||||
expect_equal(nrow(subset(x, f1 != f2)), 0)
|
||||
|
||||
# is gram pos/neg (also return FALSE for all non-bacteria)
|
||||
expect_equal(is_gram_negative(c("Escherichia coli", "Staphylococcus aureus", "Candida albicans")),
|
||||
c(TRUE, FALSE, FALSE))
|
||||
expect_equal(is_gram_positive(c("Escherichia coli", "Staphylococcus aureus", "Candida albicans")),
|
||||
c(FALSE, TRUE, FALSE))
|
||||
})
|
||||
|
@ -1,32 +0,0 @@
|
||||
# ==================================================================== #
|
||||
# TITLE #
|
||||
# Antimicrobial Resistance (AMR) Analysis for R #
|
||||
# #
|
||||
# SOURCE #
|
||||
# https://github.com/msberends/AMR #
|
||||
# #
|
||||
# LICENCE #
|
||||
# (c) 2018-2020 Berends MS, Luz CF et al. #
|
||||
# Developed at the University of Groningen, the Netherlands, in #
|
||||
# collaboration with non-profit organisations Certe Medical #
|
||||
# Diagnostics & Advice, and University Medical Center Groningen. #
|
||||
# #
|
||||
# This R package is free software; you can freely use and distribute #
|
||||
# it for both personal and commercial purposes under the terms of the #
|
||||
# GNU General Public License version 2.0 (GNU GPL-2), as published by #
|
||||
# the Free Software Foundation. #
|
||||
# We created this package for both routine data analysis and academic #
|
||||
# research and it was publicly released in the hope that it will be #
|
||||
# useful, but it comes WITHOUT ANY WARRANTY OR LIABILITY. #
|
||||
# #
|
||||
# Visit our website for the full manual and a complete tutorial about #
|
||||
# how to conduct AMR analysis: https://msberends.github.io/AMR/ #
|
||||
# ==================================================================== #
|
||||
|
||||
context("p_symbol.R")
|
||||
|
||||
test_that("P symbol works", {
|
||||
skip_on_cran()
|
||||
expect_identical(p_symbol(c(0.001, 0.01, 0.05, 0.1, 1, NA, 3)),
|
||||
c("***", "**", "*", ".", " ", NA, NA))
|
||||
})
|
Reference in New Issue
Block a user