* using log directory 'd:/Rcompile/CRANpkg/local/3.4/AMR.Rcheck' * using R version 3.4.4 (2018-03-15) * using platform: x86_64-w64-mingw32 (64-bit) * using session charset: ISO8859-1 * checking for file 'AMR/DESCRIPTION' ... OK * this is package 'AMR' version '0.6.1' * package encoding: UTF-8 * checking package namespace information ... OK * checking package dependencies ... OK * checking if this is a source package ... OK * checking if there is a namespace ... OK * checking for hidden files and directories ... OK * checking for portable file names ... OK * checking whether package 'AMR' can be installed ... OK * checking installed package size ... OK * checking package directory ... OK * checking 'build' directory ... OK * checking DESCRIPTION meta-information ... OK * checking top-level files ... OK * checking for left-over files ... OK * checking index information ... OK * checking package subdirectories ... OK * checking R files for non-ASCII characters ... OK * checking R files for syntax errors ... OK * checking whether the package can be loaded ... OK * checking whether the package can be loaded with stated dependencies ... OK * checking whether the package can be unloaded cleanly ... OK * checking whether the namespace can be loaded with stated dependencies ... OK * checking whether the namespace can be unloaded cleanly ... OK * checking loading without being on the library search path ... OK * checking use of S3 registration ... OK * checking dependencies in R code ... OK * checking S3 generic/method consistency ... OK * checking replacement functions ... OK * checking foreign function calls ... OK * checking R code for possible problems ... [40s] OK * checking Rd files ... OK * checking Rd metadata ... OK * checking Rd cross-references ... OK * checking for missing documentation entries ... OK * checking for code/documentation mismatches ... OK * checking Rd \usage sections ... OK * checking Rd contents ... OK * checking for unstated dependencies in examples ... OK * checking contents of 'data' directory ... OK * checking data for non-ASCII characters ... OK * checking data for ASCII and uncompressed saves ... OK * checking installed files from 'inst/doc' ... OK * checking files in 'vignettes' ... OK * checking examples ... ERROR Running examples in 'AMR-Ex.R' failed The error most likely occurred in: > ### Name: eucast_rules > ### Title: EUCAST rules > ### Aliases: eucast_rules EUCAST_rules interpretive_reading > ### Keywords: eucast interpretive reading resistance > > ### ** Examples > > a <- eucast_rules(septic_patients) NOTE: Using column `mo` as input for `col_mo`. Warning: Some columns do not exist -- THIS MAY STRONGLY INFLUENCE THE OUTCOME. Rules by the European Committee on Antimicrobial Susceptibility Testing (EUCAST) EUCAST Clinical Breakpoints (v9.0, 2019) Enterobacteriales (Order) (no changes) StaphylococcusError in matrix(unlist(value, recursive = FALSE, use.names = FALSE), nrow = nr, : 'data' must be of a vector type, was 'NULL' Calls: eucast_rules -> edit_rsi -> which -> Ops.data.frame -> matrix Execution halted * checking for unstated dependencies in 'tests' ... OK * checking tests ... [134s] ERROR Running 'testthat.R' [133s] Running the tests in 'tests/testthat.R' failed. Complete output: > # ==================================================================== # > # TITLE # > # Antimicrobial Resistance (AMR) Analysis # > # # > # SOURCE # > # https://gitlab.com/msberends/AMR # > # # > # LICENCE # > # (c) 2019 Berends MS (m.s.berends@umcg.nl), Luz CF (c.f.luz@umcg.nl) # > # # > # 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. # > # # > # This R package was created for academic research and was publicly # > # released in the hope that it will be useful, but it comes WITHOUT # > # ANY WARRANTY OR LIABILITY. # > # Visit our website for more info: https://msberends.gitab.io/AMR. # > # ==================================================================== # > > library(testthat) > library(AMR) > > test_check("AMR") Rules by the European Committee on Antimicrobial Susceptibility Testing (EUCAST) EUCAST Clinical Breakpoints (v9.0, 2019) Enterobacteriales (Order) (no changes) Staphylococcus-- 1. Error: EUCAST rules work (@test-eucast_rules.R#28) ---------------------- 'data' must be of a vector type, was 'NULL' 1: expect_identical(colnames(septic_patients), colnames(suppressWarnings(eucast_rules(septic_patients)))) at testthat/test-eucast_rules.R:28 2: quasi_label(enquo(expected), expected.label, arg = "expected") 3: eval_bare(get_expr(quo), get_env(quo)) 4: colnames(suppressWarnings(eucast_rules(septic_patients))) 5: is.data.frame(x) 6: suppressWarnings(eucast_rules(septic_patients)) 7: withCallingHandlers(expr, warning = function(w) invokeRestart("muffleWarning")) 8: eucast_rules(septic_patients) 9: edit_rsi(to = "S", rule = c(rule_group, rule), rows = which(tbl$genus == "Staphylococcus" & tbl[, norf] == "S"), cols = c(cipr, levo, moxi, oflo)) 10: which(tbl$genus == "Staphylococcus" & tbl[, norf] == "S") 11: Ops.data.frame(tbl[, norf], "S") 12: matrix(unlist(value, recursive = FALSE, use.names = FALSE), nrow = nr, dimnames = list(rn, cn)) [Criterion] Inclusion based on key antibiotics, ignoring I. [Criterion] Inclusion based on key antibiotics, ignoring I. [Criterion] Inclusion based on key antibiotics, not ignoring I. [Criterion] Inclusion based on key antibiotics, using points threshold of 2. [Criterion] Excluded isolates from ICU. [Criterion] Excluded other than specimen group 'Urine' [Criterion] Excluded other than specimen group 'Urine' [Criterion] Excluded isolates from ICU. [Criterion] Excluded other than specimen group 'something_unexisting' Determining multidrug-resistant organisms (MDRO), according to: Guideline: EUCAST Expert Rules, "Intrinsic Resistance and Exceptional Phenotypes Tables", Version 3.1 Country : (European guidelines) Source : http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf Determining multidrug-resistant organisms (MDRO), according to: Guideline: EUCAST Expert Rules, "Intrinsic Resistance and Exceptional Phenotypes Tables", Version 3.1 Country : (European guidelines) Source : http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf Determining multidrug-resistant organisms (MDRO), according to: Guideline: EUCAST Expert Rules, "Intrinsic Resistance and Exceptional Phenotypes Tables", Version 3.1 Country : (European guidelines) Source : http://www.eucast.org/fileadmin/src/media/PDFs/EUCAST_files/Expert_Rules/Expert_rules_intrinsic_exceptional_V3.1.pdf Determining multidrug-resistant organisms (MDRO), according to: Guideline: WIP-Richtlijn BRMO, Revision as of December 2017 Country : The Netherlands Source : https://www.rivm.nl/Documenten_en_publicaties/Professioneel_Praktisch/Richtlijnen/Infectieziekten/WIP_Richtlijnen/WIP_Richtlijnen/Ziekenhuizen/WIP_richtlijn_BRMO_Bijzonder_Resistente_Micro_Organismen_ZKH Determining multidrug-resistant organisms (MDRO), according to: Guideline: , Country : Germany Source : Class 'mic' [1] 1 2 4 8 Escherichia blattae (Burgess et al., 1973) was renamed Shimwellia blattae (Priest et al., 2010) (B_SHMWL_BLA)2 unique result(s) guessed with uncertainty: (1 = renamed, 2 = uncertain, 3 = very uncertain) [2] "Streptococcus suis (bovis gr)" -> Streptococcus suis (B_STRPT_SUI) [2] "Raoultella (here some text) terrigena" -> Raoultella terrigena (B_RLTLL_TER) Logistic regression model (logit) with binomial distribution ------------------------------------------------------------ Call: glm(formula = df_matrix ~ year, family = binomial) Deviance Residuals: Min 1Q Median 3Q Max -3.2579 -0.9245 0.0336 1.4185 3.0981 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) -97.54685 49.32757 -1.978 0.048 * year 0.04850 0.02453 1.977 0.048 * --- Signif. codes: 0 '***' 0.001 '**' 0.01 '*' 0.05 '.' 0.1 ' ' 1 (Dispersion parameter for binomial family taken to be 1) Null deviance: 42.518 on 13 degrees of freedom Residual deviance: 38.575 on 12 degrees of freedom AIC: 93.28 Number of Fisher Scoring iterations: 3 Logistic regression model (logit) with binomial distribution ------------------------------------------------------------ Call: glm(formula = df_matrix ~ year, family = binomial) Deviance Residuals: Min 1Q Median 3Q Max -2.65799 -0.59136 0.08025 0.77236 2.21610 Coefficients: Estimate Std. Error z value Pr(>|z|) (Intercept) 9.079733 25.139103 0.361 0.718 year -0.004401 0.012507 -0.352 0.725 (Dispersion parameter for binomial family taken to be 1) Null deviance: 23.780 on 15 degrees of freedom Residual deviance: 23.656 on 14 degrees of freedom AIC: 103.33 Number of Fisher Scoring iterations: 3 Class 'rsi' [1] S I R == testthat results =========================================================== OK: 494 SKIPPED: 0 WARNINGS: 0 FAILED: 1 1. Error: EUCAST rules work (@test-eucast_rules.R#28) Error: testthat unit tests failed Execution halted * checking for unstated dependencies in vignettes ... OK * checking package vignettes in 'inst/doc' ... OK * checking re-building of vignette outputs ... [15s] WARNING Error in re-building vignettes: ... Attaching package: 'dplyr' The following objects are masked from 'package:stats': filter, lag The following objects are masked from 'package:base': intersect, setdiff, setequal, union Joining, by = "patient_id" Warning: Some columns do not exist -- THIS MAY STRONGLY INFLUENCE THE OUTCOME. Quitting from lines 177-178 (AMR.Rmd) Error: processing vignette 'AMR.Rmd' failed with diagnostics: 'data' must be of a vector type, was 'NULL' Execution halted * checking PDF version of manual ... OK * DONE Status: 2 ERRORs, 1 WARNING