From 47fe8b78201c21cf575c87475e5a74b7c165934a Mon Sep 17 00:00:00 2001 From: "Matthijs S. Berends" Date: Fri, 21 Feb 2020 16:05:19 +0100 Subject: [PATCH] (v1.0.0.9004) add example_isolaten_unclean --- DESCRIPTION | 2 +- NEWS.md | 2 +- R/data.R | 12 + ...reproduction_of_example_isolates_unclean.R | 94 ++++++ data/example_isolates_unclean.rda | Bin 0 -> 12798 bytes docs/404.html | 2 +- docs/LICENSE-text.html | 2 +- docs/articles/index.html | 2 +- docs/authors.html | 2 +- docs/index.html | 2 +- docs/news/index.html | 8 +- docs/reference/example_isolates_unclean.html | 276 ++++++++++++++++++ docs/reference/index.html | 2 +- docs/sitemap.xml | 3 + man/example_isolates_unclean.Rd | 26 ++ tests/testthat/test-rsi.R | 2 +- 16 files changed, 424 insertions(+), 13 deletions(-) create mode 100644 data-raw/reproduction_of_example_isolates_unclean.R create mode 100644 data/example_isolates_unclean.rda create mode 100644 docs/reference/example_isolates_unclean.html create mode 100644 man/example_isolates_unclean.Rd diff --git a/DESCRIPTION b/DESCRIPTION index 727772bb..213aaf15 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 1.0.0.9003 +Version: 1.0.0.9004 Date: 2020-02-21 Title: Antimicrobial Resistance Analysis Authors@R: c( diff --git a/NEWS.md b/NEWS.md index 1e17777c..0aa54ced 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 1.0.0.9003 +# AMR 1.0.0.9004 ## Last updated: 21-Feb-2020 ### Changed diff --git a/R/data.R b/R/data.R index 18303209..4b4c65de 100755 --- a/R/data.R +++ b/R/data.R @@ -161,6 +161,18 @@ catalogue_of_life <- list( #' @inheritSection AMR Read more on our website! "example_isolates" +#' Data set with unclean data +#' +#' A data set containing 3,000 microbial isolates that are not cleaned up and consequently not really for AMR analysis. This data set can be used for practice. +#' @format A [`data.frame`] with 3,000 observations and 8 variables: +#' - `patient_id`\cr ID of the patient +#' - `date`\cr date of receipt at the laboratory +#' - `hospital`\cr ID of the hospital, from A to C +#' - `bacteria`\cr info about microorganism that can be transformed with [as.mo()], see also [microorganisms] +#' - `AMX:GEN`\cr 4 different antibiotics that have to be transformed with [as.rsi()] +#' @inheritSection AMR Read more on our website! +"example_isolates_unclean" + #' Data set with 500 isolates - WHONET example #' #' This example data set has the exact same structure as an export file from WHONET. Such files can be used with this package, as this example data set shows. The data itself was based on our [example_isolates] data set. diff --git a/data-raw/reproduction_of_example_isolates_unclean.R b/data-raw/reproduction_of_example_isolates_unclean.R new file mode 100644 index 00000000..9d34e990 --- /dev/null +++ b/data-raw/reproduction_of_example_isolates_unclean.R @@ -0,0 +1,94 @@ +# ==================================================================== # +# TITLE # +# Antimicrobial Resistance (AMR) Analysis # +# # +# SOURCE # +# https://gitlab.com/msberends/AMR # +# # +# LICENCE # +# (c) 2018-2020 Berends MS, Luz CF et al. # +# # +# 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 more info: https://msberends.gitlab.io/AMR. # +# ==================================================================== # + +patients <- unlist(lapply(LETTERS, paste0, 1:10)) + +patients_table <- data.frame(patient_id = patients, + gender = c(rep("M", 135), + rep("F", 125))) + +dates <- seq(as.Date("2011-01-01"), as.Date("2020-01-01"), by = "day") + +bacteria_a <- c("E. coli", "S. aureus", + "S. pneumoniae", "K. pneumoniae") + +bacteria_b <- c("esccol", "staaur", "strpne", "klepne") + +bacteria_c <- c("Escherichia coli", "Staphylococcus aureus", + "Streptococcus pneumoniae", "Klebsiella pneumoniae") + +ab_interpretations <- c("S", "I", "R") + +ab_interpretations_messy = c("R", "< 0.5 S", "I") + +sample_size <- 1000 + +data_a <- data.frame(date = sample(dates, size = sample_size, replace = TRUE), + hospital = "A", + bacteria = sample(bacteria_a, size = sample_size, replace = TRUE, + prob = c(0.50, 0.25, 0.15, 0.10)), + AMX = sample(ab_interpretations, size = sample_size, replace = TRUE, + prob = c(0.60, 0.05, 0.35)), + AMC = sample(ab_interpretations, size = sample_size, replace = TRUE, + prob = c(0.75, 0.10, 0.15)), + CIP = sample(ab_interpretations, size = sample_size, replace = TRUE, + prob = c(0.80, 0.00, 0.20)), + GEN = sample(ab_interpretations, size = sample_size, replace = TRUE, + prob = c(0.92, 0.00, 0.08))) + + +data_b <- data.frame(date = sample(dates, size = sample_size, replace = TRUE), + hospital = "B", + bacteria = sample(bacteria_b, size = sample_size, replace = TRUE, + prob = c(0.50, 0.25, 0.15, 0.10)), + AMX = sample(ab_interpretations_messy, size = sample_size, replace = TRUE, + prob = c(0.60, 0.05, 0.35)), + AMC = sample(ab_interpretations_messy, size = sample_size, replace = TRUE, + prob = c(0.75, 0.10, 0.15)), + CIP = sample(ab_interpretations_messy, size = sample_size, replace = TRUE, + prob = c(0.80, 0.00, 0.20)), + GEN = sample(ab_interpretations_messy, size = sample_size, replace = TRUE, + prob = c(0.92, 0.00, 0.08))) + +data_c <- data.frame(date = sample(dates, size = sample_size, replace = TRUE), + hospital = "C", + bacteria = sample(bacteria_c, size = sample_size, replace = TRUE, + prob = c(0.50, 0.25, 0.15, 0.10)), + AMX = sample(ab_interpretations, size = sample_size, replace = TRUE, + prob = c(0.60, 0.05, 0.35)), + AMC = sample(ab_interpretations, size = sample_size, replace = TRUE, + prob = c(0.75, 0.10, 0.15)), + CIP = sample(ab_interpretations, size = sample_size, replace = TRUE, + prob = c(0.80, 0.00, 0.20)), + GEN = sample(ab_interpretations, size = sample_size, replace = TRUE, + prob = c(0.92, 0.00, 0.08))) + + +example_isolates_unclean <- data_a %>% + bind_rows(data_b, data_c) + +example_isolates_unclean$patient_id <- sample(patients, size = nrow(example_isolates_unclean), replace = TRUE) + +example_isolates_unclean <- example_isolates_unclean %>% + select(patient_id, hospital, date, bacteria, everything()) + +usethis::use_data(example_isolates_unclean, overwrite = TRUE) + diff --git a/data/example_isolates_unclean.rda b/data/example_isolates_unclean.rda new file mode 100644 index 0000000000000000000000000000000000000000..d15c0393e0a17eeade32f3d8d465ada70e82b857 GIT binary patch literal 12798 zcmaiaXE+;f^mgp6LZW6%1QDb5>aY?uLItt+-nB=k-3VG@ua;O5d(SFr@4cy-MJZYx zw7kFf|Ns16@A+^)=Q-DTp6fbap6fo(xz#P)l%&+mg^bMou}M;7sr1+XU)#`93z(f}pai0x^0s!1*yHIW@ zy2!Uf_sQP^m?($7kVyjE9vR7^09+mp?kVKdv21|+xko1v7!f@V0DpL*Y!`}>I@>)Q z#l{98lccoMW8!kM6G909{=1FbsS6;4B6pJQ%8b>}DQZ5&@HgnX#F) zLn(l)vXV?-p;~gJBubN<%MQh+C!;2*M-6bxOyqETgy_nWw$lL6axz}Kb~7A^IBSnc zx5cyLhm9a|smV^mI*}1j91^u1=aQ`rq9aUJr57PtQVY}_k}Kwb7TRfAuay?~`9e$| z-c;bF?ui+mDiCWdphKY9Q^6SHk~qGb`guUK#$6G}xU~ifPd}KFt6qdlqpuJ!%aI_( z5v{(YW6MP#yAfbI;&cIhf`vB8Lw3_tik|SfEU!3lC)H0>ndDs#*P(YQrWXd9qd@`U zkUBOxez=$-DAu`*8fy&4;EM-$hSZn~qTL!I>G)|$%U(mOt^SeF6u7oA-k_Y76&4K@ zVU|sl<=Y2lztV#m#Fc0f2)uzoj!@^XhBX;ta=V~RJX_>4-!Q%V#szUi5QM5 zV@#PU^r5NRbV)!@R6TPf(VFpVoz|2RlEZxj;VcZAMQQ8kmq=sMdW;jq#PDr_5&TXj z>AcF6XiEf<<+DyQMu)yZP|hN_*sYRZS_>kP>r5&sF~-P#$&j;9Qx8n3SC>F!=9Xzd z^?k!%YnqC{b&};u5VS;BAXB3m0+U?}ZAul^NY6}R(kjXZ#&Kr5xLcGsXqnI^_9ER9e$5bR*RngqpwV{Fpm#@N67nx)?X0ZEqAEG#BH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s/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -78,7 +78,7 @@ AMR (for R) - 1.0.0.9003 + 1.0.0.9004 diff --git a/docs/articles/index.html b/docs/articles/index.html index a6853f39..6c2231f8 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -78,7 +78,7 @@ AMR (for R) - 1.0.0.9003 + 1.0.0.9004 diff --git a/docs/authors.html b/docs/authors.html index 1e94e3d9..87a9651c 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -78,7 +78,7 @@ AMR (for R) - 1.0.0.9003 + 1.0.0.9004 diff --git a/docs/index.html b/docs/index.html index cf3f6574..c8d397a0 100644 --- a/docs/index.html +++ b/docs/index.html @@ -43,7 +43,7 @@ AMR (for R) - 1.0.0.9003 + 1.0.0.9004 diff --git a/docs/news/index.html b/docs/news/index.html index 19ada721..8cf9bcb1 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -78,7 +78,7 @@ AMR (for R) - 1.0.0.9003 + 1.0.0.9004 @@ -219,9 +219,9 @@ -
+

-AMR 1.0.0.9003 Unreleased +AMR 1.0.0.9004 Unreleased

@@ -1473,7 +1473,7 @@

Contents

diff --git a/docs/sitemap.xml b/docs/sitemap.xml index bd7546b2..d895ebc0 100644 --- a/docs/sitemap.xml +++ b/docs/sitemap.xml @@ -66,6 +66,9 @@ https://msberends.gitlab.io/AMR/reference/example_isolates.html + + https://msberends.gitlab.io/AMR/reference/example_isolates_unclean.html + https://msberends.gitlab.io/AMR/reference/extended-functions.html diff --git a/man/example_isolates_unclean.Rd b/man/example_isolates_unclean.Rd new file mode 100644 index 00000000..67226586 --- /dev/null +++ b/man/example_isolates_unclean.Rd @@ -0,0 +1,26 @@ +% Generated by roxygen2: do not edit by hand +% Please edit documentation in R/data.R +\docType{data} +\name{example_isolates_unclean} +\alias{example_isolates_unclean} +\title{Data set with unclean data} +\format{A \code{\link{data.frame}} with 3,000 observations and 8 variables: +\itemize{ +\item \code{patient_id}\cr ID of the patient +\item \code{date}\cr date of receipt at the laboratory +\item \code{hospital}\cr ID of the hospital, from A to C +\item \code{bacteria}\cr info about microorganism that can be transformed with \code{\link[=as.mo]{as.mo()}}, see also \link{microorganisms} +\item \code{AMX:GEN}\cr 4 different antibiotics that have to be transformed with \code{\link[=as.rsi]{as.rsi()}} +}} +\usage{ +example_isolates_unclean +} +\description{ +A data set containing 3,000 microbial isolates that are not cleaned up and consequently not really for AMR analysis. This data set can be used for practice. +} +\section{Read more on our website!}{ + +On our website \url{https://msberends.gitlab.io/AMR} you can find \href{https://msberends.gitlab.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.gitlab.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.gitlab.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. +} + +\keyword{datasets} diff --git a/tests/testthat/test-rsi.R b/tests/testthat/test-rsi.R index 46dd1be8..f55a7ff3 100644 --- a/tests/testthat/test-rsi.R +++ b/tests/testthat/test-rsi.R @@ -58,7 +58,7 @@ test_that("rsi works", { sum(), 40) - expect_output(tibble(ab = as.rsi("S"))) + expect_output(print(tibble(ab = as.rsi("S")))) expect_error(as.rsi.mic(as.mic(16))) expect_error(as.rsi.disk(as.disk(16)))