From 81af0b001cbf6af50295c14daf2349a41e539eb6 Mon Sep 17 00:00:00 2001 From: "Matthijs S. Berends" Date: Wed, 26 Aug 2020 16:13:40 +0200 Subject: [PATCH] (v1.3.0.9009) documentation update --- DESCRIPTION | 2 +- NEWS.md | 8 ++++---- R/aa_helper_functions.R | 6 ++++-- R/ab_class_selectors.R | 9 +++++---- R/bug_drug_combinations.R | 2 +- data-raw/antibiotics.dta | Bin 329492 -> 329492 bytes data-raw/antibiotics.sas | Bin 1880064 -> 1880064 bytes data-raw/antibiotics.sav | Bin 1406605 -> 1406605 bytes data-raw/antibiotics.xlsx | Bin 66083 -> 66083 bytes data-raw/antivirals.dta | Bin 68841 -> 68841 bytes data-raw/antivirals.sas | Bin 81920 -> 81920 bytes data-raw/antivirals.sav | Bin 69306 -> 69306 bytes data-raw/antivirals.xlsx | Bin 13935 -> 13935 bytes data-raw/intrinsic_resistant.dta | Bin 3909333 -> 3909333 bytes data-raw/intrinsic_resistant.sas | Bin 3985408 -> 3985408 bytes data-raw/intrinsic_resistant.sav | Bin 4353410 -> 4353410 bytes data-raw/intrinsic_resistant.xlsx | Bin 524510 -> 524510 bytes data-raw/microorganisms.dta | Bin 26468289 -> 26468289 bytes data-raw/microorganisms.old.dta | Bin 1896607 -> 1896607 bytes data-raw/microorganisms.old.sas | Bin 1941504 -> 1941504 bytes data-raw/microorganisms.old.sav | Bin 2034367 -> 2034367 bytes data-raw/microorganisms.old.xlsx | Bin 453024 -> 453024 bytes data-raw/microorganisms.sas | Bin 27521024 -> 27521024 bytes data-raw/microorganisms.sav | Bin 29548953 -> 29548953 bytes data-raw/microorganisms.xlsx | Bin 6401595 -> 6401595 bytes data-raw/rsi_translation.dta | Bin 3121505 -> 3121505 bytes data-raw/rsi_translation.sas | Bin 3334144 -> 3334144 bytes data-raw/rsi_translation.sav | Bin 3582161 -> 3582161 bytes data-raw/rsi_translation.xlsx | Bin 656226 -> 656226 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 | 14 +++++++------- docs/pkgdown.yml | 2 +- .../reference/antibiotic_class_selectors.html | 17 +++++++++++------ docs/reference/bug_drug_combinations.html | 4 ++-- docs/reference/index.html | 2 +- docs/survey.html | 2 +- man/antibiotic_class_selectors.Rd | 13 +++++++++---- man/bug_drug_combinations.Rd | 2 +- 42 files changed, 53 insertions(+), 40 deletions(-) diff --git a/DESCRIPTION b/DESCRIPTION index 373efc2a..bf4c251a 100644 --- a/DESCRIPTION +++ b/DESCRIPTION @@ -1,5 +1,5 @@ Package: AMR -Version: 1.3.0.9008 +Version: 1.3.0.9009 Date: 2020-08-26 Title: Antimicrobial Resistance Analysis Authors@R: c( diff --git a/NEWS.md b/NEWS.md index 64fb0469..9325353b 100755 --- a/NEWS.md +++ b/NEWS.md @@ -1,4 +1,4 @@ -# AMR 1.3.0.9008 +# AMR 1.3.0.9009 ## Last updated: 26 August 2020 ### New @@ -36,9 +36,9 @@ ``` * Speed improvement for `eucast_rules()` * Overall speed improvement by tweaking joining functions -* Function `mo_shortname()` now return the genus for input where the species is unknown -* BORSA is now recognised as an abbreviation for a *Staphylococcus aureus*, meaning that e.g. `mo_genus("BORSA")` will return "Staphylococcus" -* Support for coloured `tibble` printing of classes `mo`, `rsi`, `mic` and `disk` +* Function `mo_shortname()` now returns the genus for input where the species is unknown +* BORSA is now recognised as an abbreviation for *Staphylococcus aureus*, meaning that e.g. `mo_genus("BORSA")` will return "Staphylococcus" +* Support for coloured `tibble` printing of classes `ab`, `mo`, `rsi`, `mic` and `disk` # AMR 1.3.0 diff --git a/R/aa_helper_functions.R b/R/aa_helper_functions.R index 0ffb96c0..9c00ce8c 100755 --- a/R/aa_helper_functions.R +++ b/R/aa_helper_functions.R @@ -224,7 +224,7 @@ stop_ifnot_installed <- function(package) { if (package == "rstudioapi") { stop("This function only works in RStudio.", call. = FALSE) } else if (pkg != "base") { - stop("package '", pkg, "' required but not installed.", + stop("This requires the '", pkg, "' package.", "\nTry to install it with: install.packages(\"", pkg, "\")", call. = FALSE) } @@ -240,7 +240,9 @@ import_fn <- function(name, pkg, error_on_fail = TRUE) { get(name, envir = asNamespace(pkg)), error = function(e) { if (isTRUE(error_on_fail)) { - stop_("function ", name, "() not found in package '", pkg, "'. Please contact the maintainers of the AMR package at https://github.com/msberends/AMR/issues.", call = FALSE) + stop_("function ", name, "() not found in package '", pkg, + "'. Please create an issue at https://github.com/msberends/AMR/issues. Many thanks!", + call = FALSE) } else { return(NULL) } diff --git a/R/ab_class_selectors.R b/R/ab_class_selectors.R index 0d9b723d..001b0cb3 100644 --- a/R/ab_class_selectors.R +++ b/R/ab_class_selectors.R @@ -21,15 +21,16 @@ #' Antibiotic class selectors #' -#' Use these selection helpers inside any function that allows [Tidyverse selections](https://tidyselect.r-lib.org/reference/language.html), like `dplyr::select()` or `tidyr::pivot_longer()`. They help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations. +#' Use these selection helpers inside any function that allows [Tidyverse selection helpers](https://tidyselect.r-lib.org/reference/language.html), like `dplyr::select()` or `tidyr::pivot_longer()`. They help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations. #' @inheritParams filter_ab_class -#' @details All columns will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.). This means that a selector like e.g. [aminoglycosides()] will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc. +#' @details All columns will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.) in the [antibiotics] data set. This means that a selector like e.g. [aminoglycosides()] will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc. #' -#' These functions only work if the `tidyselect` package is installed, that comes with the `dplyr` package. An error will be thrown if `tidyselect` package is not installed, or if the functions are used outside a function that allows Tidyverse selections like `select()` or `pivot_longer()`. +#' **N.B. These functions only work if the `tidyselect` package is installed**, that comes with the `dplyr` package. An error will be thrown if the `tidyselect` package is not installed, or if the functions are used outside a function that allows Tidyverse selections like `select()` or `pivot_longer()`. #' @rdname antibiotic_class_selectors #' @seealso [filter_ab_class()] for the `filter()` equivalent. #' @name antibiotic_class_selectors #' @export +#' @inheritSection AMR Reference data publicly available #' @inheritSection AMR Read more on our website! #' @examples #' \dontrun{ @@ -58,7 +59,7 @@ #' #' data.frame(irrelevant = "value", #' J01CA01 = "S") %>% # ATC code of ampicillin -#' select(penicillins()) # so the 'J01CA01' column is selected +#' select(penicillins()) # the 'J01CA01' column will be selected #' #' } ab_class <- function(ab_class) { diff --git a/R/bug_drug_combinations.R b/R/bug_drug_combinations.R index 9d3a6253..f287bde3 100644 --- a/R/bug_drug_combinations.R +++ b/R/bug_drug_combinations.R @@ -51,7 +51,7 @@ #' FUN = mo_gramstain) #' #' x <- bug_drug_combinations(example_isolates, -#' FUN = function(x) ifelse(x == "B_ESCHR_COLI", +#' FUN = function(x) ifelse(x == as.mo("E. coli"), #' "E. coli", #' "Others")) #' } diff --git a/data-raw/antibiotics.dta b/data-raw/antibiotics.dta index 3f94d9065cc0e7e07e9fdd2da0176bc1ae5976b8..65a39711871f618225c8d0d4a87027cd72b445ce 100644 GIT binary patch delta 32 ncmbQzCo-i^WI`*8nU$eYV`pn8V{0c06@WjAo3AWVE{&u1PW|if)(7r0VrNcLgy5(bRQOA2k(}BTJ~vuC&T#Y p#=iTu&)_wS0fuhM<}2 z+|Iw%yT3rkB~Ru3+D55ffeYJKwtW5YVlA`0Xp4@c&x(tNZpRJy9&yZSS30St$^P23 zKl6)hS;d@}KI=d|7RtnKG))b8w8UK%ms-Qn-X4qQC883u+4K>~kX z_dY1yvCBZa`?JWEM^bGICBioAt1A5{{r|zF{ruFKc0mkTTADLH99aC-xAi~Yp^fv} zclfi)h@7}>_%i(7zQuFDJEUncbT9V)`$t26_3qzg?NU*fjP%VdW4EWAlFdzrsW(ihpaOkFS52Et_+i=WklnMk{H+l1au+*FXZa}H2 pCXB%#s*}+HM4e`|1X9!47#TtOrn@sTT7&2oMn-=SeU*{X4*=@$(8~Y- delta 491 zcmZ47!m_x9g(tw9nMH(wgM))XyJjPg3L}$t&1NIUl^}ZZU8a{H>IAbv{l9~TPPZFR z&6DBq6S?nHbe(m!y-N7*y6Ve*tD9|qRTQ85d)L`-ujNa-pDglIOnEgo%~45cnR=>( zxAI>8Wm8Y4BIU|_UXzp-2eVw=HSO;CvK1i$lQ;|)D!RKI*Wi7`F{@qYl$sX%Yt!Qv zzxu57?p3mHIrCZcYC}xXlafVC^Xd;yH16m8{@z1VY{~Bre|aV}Iq^&JutlY?{{5;{ zA-hiR%&A8+smuCB9BxH%so4~4*|+xPeMgIHpBr{Z z9B^#hBfGfn>09etmHa6}%my;CZ=SnXu6+0Id-SDgl{1(Bw9*a#{irQeRD1RImrsuV zQ!06~=)yPd0B?4VXYb!O2r@D-NH8%lAP3%N307@z=()0Wf$59vt6M>#S=ajt%+Knd zzzX93nc@%T`%cpX)3wvf(m}!e^`AM2()(`@qVoUSaA?;^1%j-by!k&^>dk*Qpwv_o o#$XWD$>;#0PBU5psp)Ktj39l}-5D9JL39fvqd$ng%E;&k02`3UQ2+n{ diff --git a/data-raw/antivirals.dta b/data-raw/antivirals.dta index 4c4ede05ca42444147c1169bf132b2f7448080a4..adfb02c639f7efa60f5e8725ed2e45a6d46a5d0f 100644 GIT binary patch delta 20 bcmaDkljY@1mI$tqjh$ON854K_TNwwg delta 20 bcmaDkljY@1mIW>$tqR;EUi6$Kp{*KS?Q$jb)+hDiw7 delta 27 jcmdlrmu1&nmI-O>rdGzrRz}8?6$Kp{*KS?Q$jb)+hD!+9 diff --git a/data-raw/antivirals.xlsx b/data-raw/antivirals.xlsx index 58d46c73423699c836af663f83484a4d289c6179..eb444e2142dbeb1ccc6d89356bdf6f50bddcde66 100644 GIT binary patch delta 485 zcmaE#^FD_sz?+#xgn@&DgJD+VMjjPLrdf@fjTl#g=*f4PUV^9-%m(#phYg)>H=dd& z!x1KO->K+2>uh_Ki|g*++j99;LciU;ImPwgCj{sE?>cXHkUiD6*CTKdPtS&+nd{un zzty|HK*uFd<^9@5sa}B#+g7%G{qSNfv%F}Fj-$_ti-vB;4fq~$%xYIUsiw*P+O$9O zi)>lUp3i&+x~EOA3G93_@p0$0-Sw>P=WNvO>{nhIG2z|e@5T;XJhmAIh6zCee_r=K zDBZEkK)d_1$dyM@Z3`vBHtVY@{V4ta!KD5C)R}fc3|U&5Gd>(x{MEPhKi{E^^V)a# zv&x8^xNZ0{{NBFBbH6*JX)<&#_Wt`vLx1(|-(~GmQJ0ML%`IcMr<~5J@!{GiZe5q|~de~_5K z3gS1(`GfhF<@LZcv!aamz delta 485 zcmaE#^FD_sz?+#xgn@&DgF(AyBaaFrlXlH!BgT~=dh%VSmmul{vqAm8gN9DG8&A!X z;qVi=?^JZ1b+)}q`0l#u%YLhyZGTl1pZj~)*>A7qOS_*e@>5KCH8;&sNobjRs)V=l zUjAiMPo^T}%6wjvlokiGT-`P8?)kD6Ap(;)3>PZ8yBycxeZ(=VUFVdV7W-?{;}*aA ztn}_xvTr%_S@dc{Owp5)MN9MQ4^A}h=luTOLsM+Y?+<@@CNw$mOYyKprLg|}s#GDn zPVdaAM>ecmceEv*Xv_L`)P=S7uC2}4hry}K`b8XWMRBRw6l~eI_T_y?i))`7c1Ij= zY}_NexbEp&>syulDMHK!GO=%-yH~D!_wIZ2rD>Hjm;bcV4gdY9EmTx{_4b!fj{Z|B zd9vujH|_v$c8+K7-!=#`GB8LmF)$zp-ew6_ZE)zhvUP#!i|mH{pwMIye+A}$keI*< z;y20pgZY=`^}sZrGHK~$BoJ&4+EY{Q{lBNYg;Zt{PKl!b{KNUFgk7(`t) daR5=`rj{To$P}z?vZ*zQcfr&jL@Ap20RZHuz-Ise diff --git a/data-raw/intrinsic_resistant.dta b/data-raw/intrinsic_resistant.dta index 57e639d0e606233598143e6e1523d59ef7032c57..41548e7946b986c2a9c6f2f39c05473773172c9e 100644 GIT binary patch delta 196 zcmWN=TUJ2<06@`&t3(lbmS-q$?p5-bf=T%}ALq{~%)l^wnualCueGn2TkLv&Bv@_3 z=pe>0jtLAfi4XXQDSW~-X7CwbFpD{S#XJ`94U1U9GFGsPHGIbptYZV4*upk;@Dsb( n!#;lDHx6)!BOK!dr#QnoE-=Ihm-vIfxWYeN;|8~9cl*;n=DAK^ delta 196 zcmWN=$58?S06@`Ma*!NE$r%g?t_UnG*p!EV_&2Jc1IzG88`J=A=3V};!R7u$VjG3w zuNYtq|zi5IKUx}aEue2 m;tc1wz$L!mE56}7uJ8lbxWP{h@e8;3jXT`q0i!>UKj$0hBu-%f diff --git a/data-raw/intrinsic_resistant.sas b/data-raw/intrinsic_resistant.sas index b6dbe2ca99473d5dc6cbb86123107ac6f020807e..0e1782e188339f15082cfc2225d59af7d60f675c 100644 GIT binary patch delta 206 zcmWN?OIkqz0D#eZL(wfNmCCaxl4lQ;Nh`3WYw*u4z@U-&Kd=rP$SQ1r!TC=7w+-XH z`7#PN3;utDVE;@E@cTr#4tBAJeH`FBe&8p5;SfhS#&7&tIhn3^qC1PH~2Fe8v}i#RV>L_3hio?;c0j BT_ykk diff --git a/data-raw/intrinsic_resistant.sav b/data-raw/intrinsic_resistant.sav index 53fd6664bded2032273a1220d5fb854728a5e341..ab1f33f1e61017fcb17067499f6a7b424bbee705 100644 GIT binary patch delta 226 zcmWN=%T@sa0D$3xK`K(Z3eo)@gQ=!b>0w&gc!P4zzp!f_0bH3UCJUd(d z`7B0pFN}v_I!)5A;9JaK7IPS29t&8+6)fQ@uHibCv4R^|#ZBD88gAnb?&2Qq;{n$3 z5F6OU79L?6J9vyIc#3Cuju&`|S9py#c#C&hM<}2 z+|Iw%yT3rkB~Ru3+D55ffeYJKwtW5YVlA`0Xp4@c&x(tNZpRJy9&yZSS30St$^P23 zKl6)hS;d@}KI=d|7RtnKG))b8w8UK%ms-Qn-X4qQC883u+4K>~kX z_dY1yvCBZa`?JWEM^bGICBioAt1A5{{r|zF{ruFKc0mkTTADLH99aC-xAi~Yp^fv} zclfi)h@7}>_%i(7zQuFDJEUncbT9V)`$t26_3qzg?NU*fjP%VdW4EWAlFdzrsW(ihpaOk^^rup(+356`0Tc zYyvBYKliminE&pL9*Az1d)F@ajuD8NfS4JGS%8=oh}pKwyIAbv{l9~TPPZFR z&6DBq6S?nHbe(m!y-N7*y6Ve*tD9|qRTQ85d)L`-ujNa-pDglIOnEgo%~45cnR=>( zxAI>8Wm8Y4BIU|_UXzp-2eVw=HSO;CvK1i$lQ;|)D!RKI*Wi7`F{@qYl$sX%Yt!Qv zzxu57?p3mHIrCZcYC}xXlafVC^Xd;yH16m8{@z1VY{~Bre|aV}Iq^&JutlY?{{5;{ zA-hiR%&A8+smuCB9BxH%so4~4*|+xPeMgIHpBr{Z z9B^#hBfGfn>09etmHa6}%my;CZ=SnXu6+0Id-SDgl{1(Bw9*a#{irQeRD1RImrsuV zQ!06~=)yPd0B?4VXYb!O2r@D-NH8%lAP3%N307@z=()0Wf$59vK6gN&DgWdZn9u!e z0xO6=_q9Km|L%<*h;Ej9*Dm*t5r~<9m>Gy!fS47C*|y8QW1qkeR5N|UUv_g4{qirn zJ&4x&$8N)+T_Y6;a?SL-e-PQ_|JdC?vhV+~2ZLyr|LhJRy6r!^C5S%wAFO*S6NfdB OJJp`UA4E;y@B;wp)7QiR diff --git a/data-raw/microorganisms.dta b/data-raw/microorganisms.dta index 1328140a6f6228a7a5ff0c96d0e1b2c945e74de7..dea339d5a0348754cbe875913ea1fd215b8597e4 100644 GIT binary patch delta 1375 zcmWN=1+WkV00qJMbTtTBHaSY0Y``3-Q9(V-Q9)V-K}qDcK^QT z%k0mc6lveNb(?i!0T#l-SOkk=F)WTHuq2kk(pUz|VmU026|f>!!pc|$t70`g2&-ca ztceF>Ev$`ourAia`q%&)Vk0~R8)Fk}ip{V&9*T!y3p^ZKVk>NoZSV+ei|w#IcEFC< z2|HsKJQBNNH|&l*uqXDy-q;8GVn6JU18^W7g@bS~4#A-~42R z$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.old.dta b/data-raw/microorganisms.old.dta index d1f9430fc42aff853cf5138cbf7fd642b30bc08c..0251d0aa615b08ddaa3ffc45a1806f54d8699419 100644 GIT binary patch delta 101 zcmV~$I~9Te06@`$fFD3aZ}?1NfCmgQ m!WfTu!ZThl!4xyRVvaW~@Qx)uu)-P}Y_Y>0pZHpQH`@;IxF<0H delta 101 zcmV~$xeG;z)cYNr>Y| toZ%c7xWp7!xW)`~EU?54ZgGcuJm3*4JmDE@yxZp`=e;X zE2MRmf5d=2?Bf6<9O4MaIKddFIKw$EaEU8iV}cvp;to^HaE}K(;t9`q!Ryak68`~2 C_%K}n delta 118 zcmV~$xe&7!wLIpaudBE|+mAzydBbrZso_uIanx{Rr+=SyrEK zowv{8B@S?iBOGIZ6P#j*GmLPK3tZv~*SNtL6HIZ78RoddJs$9gCp_Z?uRm`|^aqFV BF%$p* diff --git a/data-raw/microorganisms.old.xlsx b/data-raw/microorganisms.old.xlsx index cf0be9843fd861ef836100f9df0be49be8793d1a..426744d8b4047a98662af04f069f33bce96447a6 100644 GIT binary patch delta 528 zcmZ2*S$e@`X`TRYW)=|!4h{~6S&bWcR2Z3NHEuRyTnVBl-(`9UqE0Xy)Gs+~=ybdB z)I1rEFp>LCMb}wp+pAn$cmLj&%dZmp?e5JfuKzwEIM;vIdAoz`slL4#jsa|L5i5Pd z7e6nXo*y8lWIpNpHHTg|j*QzOhpH;RTx;y-a+;=~cIAb{;$#W-LYA}66H_KnY5qFv zxXCX*YrT7w>^oFadQDyQDxXv=dYV^%aG`NO=lAy>nqo_SfB4HYfytR)%7#8sNt!}pcRZ)EI?_FoVy_PTSezM3)TNm*4n$aHfJ9Or!MOkakv%5rDjvGW#8JD_Z=;+eQwwt zalo;0kL=>Qr*ExqRr03@F&oIlzIpCmx$@n+@6ng0RnA=g(@Hn|_oKE@QSH^+Up_hd zPpRa|q6^=+1H9Qep1ptDAjrtTAi>1IfE;+6C0Mn=q36oh1)`fTvbSGkX9QxV?HAdZ z4Ml)r+g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ddc3a67d58145e56e0d1d 100644 GIT binary patch delta 160 zcmWN=rx5}H006;xcyi7;=R6<~bcZ-`juL1Bi=YbZcLF=J(dQjR{}00J?R>e50md+n zAto@1DNJJqvzWs?7O;pVEMo<$Si?Ftu!${fV+Xs~!#)mhh$9^11gAK|IWBOCD_r9S Px46SS9`N|`^nLySx^X{U delta 160 zcmWN=w++Go002Q5OwKvyoC}MF?I^zZjuBXbmVzm0y$PIj@#h`H{}00JEsE}9fC)@u zh$&2C2D6yMJQlEsB`jkFt60N2Hn52;Y-0zz*uy>!aEK!u;{>NT!#OT+i7Q;=2DiAw OJs$9gCp^Ere4jtNls{hp diff --git a/data-raw/rsi_translation.sas b/data-raw/rsi_translation.sas index e760c7ae8be19bc632389aa738e495ab2cca2f06..5967099445c3e8913a81e7e5f71a177be19a4797 100644 GIT binary patch delta 176 zcmWN?xlsZE06@`Q0R>hLx$!_jxo;|f3TSBwer^HA6*hSD;`4tPCw`C7 z_VUMd7X--%F~kQDi<#{mv;gkzlG6lXZc1uk)g>yw-P?GEl1PJsXb delta 176 zcmWN?w{Zdi006;%Kv>}sMtJXp?SKks2?ZCCC{_XF7m$gPg7{MsU@B`zRz$B(HjT!vJEaote1uS9-%UHoLtYQu8*uZaWVhh{Y!7lc& fj{_Xy2*)_VDb8??3tZw4u5gVT+~V%){`h-L-Jiq+KH)RI;43CEg=x%S7T++3c`RTNOIXGVRAGX p#{queCk}ChW1Qd=XZVG4{Kg+#;1Yjvg?|`eh-=(nbaOktJ^++|QHlTn delta 189 zcmWN=IdVY(0D$2UVoPihV&7v463+{T%4rP=R<0< z3&UNoy#&Yd{v^im1>=~&S4?6G)0n|5zTrFOFpmW+VhKO6jGtJ+Dt=)N>)601wy=#I o>|zi5IKUx}@EgZC!70x02j{rJCH~?ct}wtghWL-0o7>U#0hEDJiU0rr diff --git a/data-raw/rsi_translation.xlsx b/data-raw/rsi_translation.xlsx index 6d30b389fbddc5407c40f48d6280332fec1d6dd0..b5b52290350f255ebc7fb554fc5c93bb4589708d 100644 GIT binary patch delta 508 zcmaFVrtzpvgD1e7nMH(wgM))%TH{6@6-K6Mjhl@aSAyutcbQ&-s1wYFjF%_>VwSG2 z-edXv-#f+Sw`4-+*ED{<^g?Q)jyq>YUdxr(-nd)2yWBeYeYmel^O{N>T!4=&fu=&=*8lu>F3tP7p_}!MYR7KFSK{~T7R~+Upkm0tySVr7 zAFcJPf47%)&r;I=WD>vJ_2#5WlbY_`+2^l*{@Zfp^j5R`0p9E!3+*o+5@cjxkYHk9 zfCdsPIFvR^uxf*Y$(5}OOkZTL;QDK+FQftU$~L#Oy%KvE5IO^T|V?+Nma7<{&DU%N|6nT)`mv1S6LNh~{GAvINntOklm!+nBhlLHxr^T>cIAbPATXghhV zu5QZoPw)2KUbyWqx z252C$f)^R2}uu!8t!rTxKtIaxgr-RvjV?kC3x z#7scU48$xz%nHP8K+F!r9NYcmIG;QOs-0@WWe%cpx$HsIIxZUyjT)&ykejA{0!vNT wX5?}M%1tk3n+a diff --git a/docs/404.html b/docs/404.html index ba608dbc..882dab7d 100644 --- a/docs/404.html +++ b/docs/404.html @@ -81,7 +81,7 @@ AMR (for R) - 1.3.0.9008 + 1.3.0.9009 diff --git a/docs/LICENSE-text.html b/docs/LICENSE-text.html index 3426713a..5d38cbaf 100644 --- a/docs/LICENSE-text.html +++ b/docs/LICENSE-text.html @@ -81,7 +81,7 @@ AMR (for R) - 1.3.0.9008 + 1.3.0.9009 diff --git a/docs/articles/index.html b/docs/articles/index.html index 8240a25b..0c6d799b 100644 --- a/docs/articles/index.html +++ b/docs/articles/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.3.0.9008 + 1.3.0.9009 diff --git a/docs/authors.html b/docs/authors.html index b30cf69a..d2a570c0 100644 --- a/docs/authors.html +++ b/docs/authors.html @@ -81,7 +81,7 @@ AMR (for R) - 1.3.0.9008 + 1.3.0.9009 diff --git a/docs/index.html b/docs/index.html index 8c5cf54e..2793708d 100644 --- a/docs/index.html +++ b/docs/index.html @@ -43,7 +43,7 @@ AMR (for R) - 1.3.0.9008 + 1.3.0.9009 diff --git a/docs/news/index.html b/docs/news/index.html index 6df18f1a..5ed02570 100644 --- a/docs/news/index.html +++ b/docs/news/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.3.0.9008 + 1.3.0.9009 @@ -236,9 +236,9 @@ Source: NEWS.md -
-

-AMR 1.3.0.9008 Unreleased +
+

+AMR 1.3.0.9009 Unreleased

@@ -295,9 +295,9 @@
  • Speed improvement for eucast_rules()

  • Overall speed improvement by tweaking joining functions

  • -
  • Function mo_shortname() now return the genus for input where the species is unknown

  • -
  • BORSA is now recognised as an abbreviation for a Staphylococcus aureus, meaning that e.g. mo_genus("BORSA") will return “Staphylococcus”

  • -
  • Support for coloured tibble printing of classes mo, rsi, mic and disk

  • +
  • Function mo_shortname() now returns the genus for input where the species is unknown

  • +
  • BORSA is now recognised as an abbreviation for Staphylococcus aureus, meaning that e.g. mo_genus("BORSA") will return “Staphylococcus”

  • +
  • Support for coloured tibble printing of classes ab, mo, rsi, mic and disk

  • diff --git a/docs/pkgdown.yml b/docs/pkgdown.yml index 66658eda..89692fc9 100644 --- a/docs/pkgdown.yml +++ b/docs/pkgdown.yml @@ -2,7 +2,7 @@ pandoc: 2.7.3 pkgdown: 1.5.1.9000 pkgdown_sha: eae56f08694abebf93cdfc0dd8e9ede06d8c815f articles: [] -last_built: 2020-08-26T13:33Z +last_built: 2020-08-26T14:13Z urls: reference: https://msberends.github.io/AMR/reference article: https://msberends.github.io/AMR/articles diff --git a/docs/reference/antibiotic_class_selectors.html b/docs/reference/antibiotic_class_selectors.html index 2965a5a0..ee9c1090 100644 --- a/docs/reference/antibiotic_class_selectors.html +++ b/docs/reference/antibiotic_class_selectors.html @@ -49,7 +49,7 @@ - + @@ -82,7 +82,7 @@ AMR (for R) - 1.3.0.9007 + 1.3.0.9009

    @@ -239,7 +239,7 @@
    -

    Use these selection helpers inside any function that allows Tidyverse selections, like dplyr::select() or tidyr::pivot_longer(). They help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations.

    +

    Use these selection helpers inside any function that allows Tidyverse selection helpers, like dplyr::select() or tidyr::pivot_longer(). They help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations.

    ab_class(ab_class)
    @@ -281,8 +281,13 @@
     
         

    Details

    -

    All columns will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.). This means that a selector like e.g. aminoglycosides() will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc.

    -

    These functions only work if the tidyselect package is installed, that comes with the dplyr package. An error will be thrown if tidyselect package is not installed, or if the functions are used outside a function that allows Tidyverse selections like select() or pivot_longer().

    +

    All columns will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.) in the antibiotics data set. This means that a selector like e.g. aminoglycosides() will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc.

    +

    N.B. These functions only work if the tidyselect package is installed, that comes with the dplyr package. An error will be thrown if the tidyselect package is not installed, or if the functions are used outside a function that allows Tidyverse selections like select() or pivot_longer().

    +

    Reference data publicly available

    + + + +

    All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this AMR package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find all download links on our website, which is automatically updated with every code change.

    Read more on our website!

    @@ -319,7 +324,7 @@ data.frame(irrelevant = "value", J01CA01 = "S") %>% # ATC code of ampicillin - select(penicillins()) # so the 'J01CA01' column is selected + select(penicillins()) # the 'J01CA01' column will be selected }
    diff --git a/docs/reference/bug_drug_combinations.html b/docs/reference/bug_drug_combinations.html index e100a4d1..90a1a538 100644 --- a/docs/reference/bug_drug_combinations.html +++ b/docs/reference/bug_drug_combinations.html @@ -82,7 +82,7 @@ AMR (for R) - 1.3.0.9006 + 1.3.0.9009 @@ -353,7 +353,7 @@ The lifecycle of this function is stablemo_gramstain) x <- bug_drug_combinations(example_isolates, - FUN = function(x) ifelse(x == "B_ESCHR_COLI", + FUN = function(x) ifelse(x == as.mo("E. coli"), "E. coli", "Others")) # } diff --git a/docs/reference/index.html b/docs/reference/index.html index be755b35..4d15e24c 100644 --- a/docs/reference/index.html +++ b/docs/reference/index.html @@ -81,7 +81,7 @@ AMR (for R) - 1.3.0.9008 + 1.3.0.9009 diff --git a/docs/survey.html b/docs/survey.html index 4d912bd7..cccb70a9 100644 --- a/docs/survey.html +++ b/docs/survey.html @@ -81,7 +81,7 @@ AMR (for R) - 1.3.0.9008 + 1.3.0.9009 diff --git a/man/antibiotic_class_selectors.Rd b/man/antibiotic_class_selectors.Rd index 49e9c0b9..46aca0a4 100644 --- a/man/antibiotic_class_selectors.Rd +++ b/man/antibiotic_class_selectors.Rd @@ -50,13 +50,18 @@ tetracyclines() \item{ab_class}{an antimicrobial class, like \code{"carbapenems"}. The columns \code{group}, \code{atc_group1} and \code{atc_group2} of the \link{antibiotics} data set will be searched (case-insensitive) for this value.} } \description{ -Use these selection helpers inside any function that allows \href{https://tidyselect.r-lib.org/reference/language.html}{Tidyverse selections}, like \code{dplyr::select()} or \code{tidyr::pivot_longer()}. They help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations. +Use these selection helpers inside any function that allows \href{https://tidyselect.r-lib.org/reference/language.html}{Tidyverse selection helpers}, like \code{dplyr::select()} or \code{tidyr::pivot_longer()}. They help to select the columns of antibiotics that are of a specific antibiotic class, without the need to define the columns or antibiotic abbreviations. } \details{ -All columns will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.). This means that a selector like e.g. \code{\link[=aminoglycosides]{aminoglycosides()}} will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc. +All columns will be searched for known antibiotic names, abbreviations, brand names and codes (ATC, EARS-Net, WHO, etc.) in the \link{antibiotics} data set. This means that a selector like e.g. \code{\link[=aminoglycosides]{aminoglycosides()}} will pick up column names like 'gen', 'genta', 'J01GB03', 'tobra', 'Tobracin', etc. -These functions only work if the \code{tidyselect} package is installed, that comes with the \code{dplyr} package. An error will be thrown if \code{tidyselect} package is not installed, or if the functions are used outside a function that allows Tidyverse selections like \code{select()} or \code{pivot_longer()}. +\strong{N.B. These functions only work if the \code{tidyselect} package is installed}, that comes with the \code{dplyr} package. An error will be thrown if the \code{tidyselect} package is not installed, or if the functions are used outside a function that allows Tidyverse selections like \code{select()} or \code{pivot_longer()}. } +\section{Reference data publicly available}{ + +All reference data sets (about microorganisms, antibiotics, R/SI interpretation, EUCAST rules, etc.) in this \code{AMR} package are publicly and freely available. We continually export our data sets to formats for use in R, SPSS, SAS, Stata and Excel. We also supply flat files that are machine-readable and suitable for input in any software program, such as laboratory information systems. Please find \href{https://msberends.github.io/AMR/articles/datasets.html}{all download links on our website}, which is automatically updated with every code change. +} + \section{Read more on our website!}{ On our website \url{https://msberends.github.io/AMR} you can find \href{https://msberends.github.io/AMR/articles/AMR.html}{a comprehensive tutorial} about how to conduct AMR analysis, the \href{https://msberends.github.io/AMR/reference}{complete documentation of all functions} (which reads a lot easier than here in R) and \href{https://msberends.github.io/AMR/articles/WHONET.html}{an example analysis using WHONET data}. As we would like to better understand the backgrounds and needs of our users, please \href{https://msberends.github.io/AMR/survey.html}{participate in our survey}! @@ -89,7 +94,7 @@ On our website \url{https://msberends.github.io/AMR} you can find \href{https:// data.frame(irrelevant = "value", J01CA01 = "S") \%>\% # ATC code of ampicillin - select(penicillins()) # so the 'J01CA01' column is selected + select(penicillins()) # the 'J01CA01' column will be selected } } diff --git a/man/bug_drug_combinations.Rd b/man/bug_drug_combinations.Rd index b88afd16..5026d8a0 100644 --- a/man/bug_drug_combinations.Rd +++ b/man/bug_drug_combinations.Rd @@ -89,7 +89,7 @@ x <- bug_drug_combinations(example_isolates, FUN = mo_gramstain) x <- bug_drug_combinations(example_isolates, - FUN = function(x) ifelse(x == "B_ESCHR_COLI", + FUN = function(x) ifelse(x == as.mo("E. coli"), "E. coli", "Others")) }