1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 18:41:58 +02:00

(v1.3.0) skip more CRAN tests

This commit is contained in:
2020-07-31 10:50:08 +02:00
parent c8edcb7439
commit c5f7294381
45 changed files with 66 additions and 65 deletions

View File

@ -31,7 +31,8 @@
#' @name antibiotic_class_selectors
#' @export
#' @examples
#' if (require("dplyr")) {
#' \dontrun{
#' library(dplyr)
#'
#' # this will select columns 'IPM' (imipenem) and 'MEM' (meropenem):
#' example_isolates %>%

View File

@ -64,7 +64,7 @@
#' abx <- ab_from_text("500 mg amoxi po and 400mg cipro iv")
#' ab_group(abx[[1]])
#'
#' if (require(dplyr)) {
#' if (require("dplyr")) {
#' tibble(clinical_text = c("given 400mg cipro and 500 mg amox",
#' "started on doxy iv today")) %>%
#' mutate(abx_codes = ab_from_text(clinical_text),

View File

@ -33,7 +33,8 @@
#' @seealso [antibiotic_class_selectors()] for the `select()` equivalent.
#' @export
#' @examples
#' if (require(dplyr)) {
#' \dontrun{
#' library(dplyr)
#'
#' # filter on isolates that have any result for any aminoglycoside
#' example_isolates %>% filter_ab_class("aminoglycoside")
@ -62,9 +63,7 @@
#' example_isolates %>%
#' filter_aminoglycosides("R", "all") %>%
#' filter_fluoroquinolones("R", "all")
#' }
#'
#' \dontrun{
#' # with dplyr 1.0.0 and higher (that adds 'across()'), this is equal:
#' example_isolates %>% filter_carbapenems("R", "all")
#' example_isolates %>% filter(across(carbapenems(), ~. == "R"))

View File

@ -60,7 +60,8 @@
#' # See ?example_isolates.
#'
#' # See ?pca for more info about Principal Component Analysis (PCA).
#' if (require("dplyr")) {
#' \dontrun{
#' library(dplyr)
#' pca_model <- example_isolates %>%
#' filter(mo_genus(mo) == "Staphylococcus") %>%
#' group_by(species = mo_shortname(mo)) %>%

View File

@ -84,7 +84,9 @@
#' }
#'
#' # create nice plots with ggplot2 yourself
#' if (require(ggplot2) & require("dplyr")) {
#' \dontrun{
#' library(dplyr)
#' library(ggplot2)
#'
#' data <- example_isolates %>%
#' filter(mo == as.mo("E. coli")) %>%