diff --git a/R/count.R b/R/count.R index d0bf15e7..7a0fdb1c 100644 --- a/R/count.R +++ b/R/count.R @@ -43,7 +43,7 @@ #' count_R(septic_patients$amox) #' count_IR(septic_patients$amox) #' -#' # Or susceptibile isolates +#' # Or susceptible isolates #' count_S(septic_patients$amox) #' count_SI(septic_patients$amox) #' diff --git a/R/data.R b/R/data.R index 4debcbf1..9c747577 100755 --- a/R/data.R +++ b/R/data.R @@ -194,9 +194,9 @@ #' \item{\code{ward_clinical}}{logical to determine if ward is a regular clinical ward} #' \item{\code{ward_outpatient}}{logical to determine if ward is an outpatient clinic} #' \item{\code{age}}{age of the patient} -#' \item{\code{sex}}{sex of the patient} +#' \item{\code{gender}}{gender of the patient} #' \item{\code{patient_id}}{ID of the patient, first 10 characters of an SHA hash containing irretrievable information} -#' \item{\code{mo}}{ID of microorganism, see \code{\link{microorganisms}}} +#' \item{\code{mo}}{ID of microorganism created with \code{\link{as.mo}}, see also \code{\link{microorganisms}}} #' \item{\code{peni:rifa}}{40 different antibiotics with class \code{rsi} (see \code{\link{as.rsi}}); these column names occur in \code{\link{antibiotics}} data set and can be translated with \code{\link{abname}}} #' } #' @examples diff --git a/R/first_isolate.R b/R/first_isolate.R index 59d91f69..4ef2c7bb 100755 --- a/R/first_isolate.R +++ b/R/first_isolate.R @@ -205,10 +205,6 @@ first_isolate <- function(tbl, stop('Please check tbl for existance.') } - if (is.na(column)) { - column <- NULL - } - if (!is.null(column)) { if (!(column %in% colnames(tblname))) { stop('Column `', column, '` not found.') diff --git a/R/portion.R b/R/portion.R index f86defca..b26e764c 100755 --- a/R/portion.R +++ b/R/portion.R @@ -52,7 +52,7 @@ #' @source \strong{M39 Analysis and Presentation of Cumulative Antimicrobial Susceptibility Test Data, 4th Edition}, 2014, \emph{Clinical and Laboratory Standards Institute (CLSI)}. \url{https://clsi.org/standards/products/microbiology/documents/m39/}. #' #' Wickham H. \strong{Tidy Data.} The Journal of Statistical Software, vol. 59, 2014. \url{http://vita.had.co.nz/papers/tidy-data.html} -#' @seealso \code{\link[AMR]{count}_*} to count resistant and susceptibile isolates. +#' @seealso \code{\link[AMR]{count}_*} to count resistant and susceptible isolates. #' @keywords resistance susceptibility rsi_df rsi antibiotics isolate isolates #' @return Double or, when \code{as_percent = TRUE}, a character. #' @rdname portion diff --git a/man/count.Rd b/man/count.Rd index 9137ff6f..501fbfc5 100644 --- a/man/count.Rd +++ b/man/count.Rd @@ -66,7 +66,7 @@ These functions are meant to count isolates. Use the \code{\link{portion}_*} fun count_R(septic_patients$amox) count_IR(septic_patients$amox) -# Or susceptibile isolates +# Or susceptible isolates count_S(septic_patients$amox) count_SI(septic_patients$amox) diff --git a/man/portion.Rd b/man/portion.Rd index 590f9505..72e39288 100644 --- a/man/portion.Rd +++ b/man/portion.Rd @@ -155,7 +155,7 @@ my_table \%>\% } } \seealso{ -\code{\link[AMR]{count}_*} to count resistant and susceptibile isolates. +\code{\link[AMR]{count}_*} to count resistant and susceptible isolates. } \keyword{antibiotics} \keyword{isolate} diff --git a/man/septic_patients.Rd b/man/septic_patients.Rd index f6921198..4ed2e50c 100755 --- a/man/septic_patients.Rd +++ b/man/septic_patients.Rd @@ -12,9 +12,9 @@ \item{\code{ward_clinical}}{logical to determine if ward is a regular clinical ward} \item{\code{ward_outpatient}}{logical to determine if ward is an outpatient clinic} \item{\code{age}}{age of the patient} - \item{\code{sex}}{sex of the patient} + \item{\code{gender}}{gender of the patient} \item{\code{patient_id}}{ID of the patient, first 10 characters of an SHA hash containing irretrievable information} - \item{\code{mo}}{ID of microorganism, see \code{\link{microorganisms}}} + \item{\code{mo}}{ID of microorganism created with \code{\link{as.mo}}, see also \code{\link{microorganisms}}} \item{\code{peni:rifa}}{40 different antibiotics with class \code{rsi} (see \code{\link{as.rsi}}); these column names occur in \code{\link{antibiotics}} data set and can be translated with \code{\link{abname}}} }} \usage{ diff --git a/tests/testthat/test-first_isolate.R b/tests/testthat/test-first_isolate.R index f9b2a5a7..b9ed1838 100755 --- a/tests/testthat/test-first_isolate.R +++ b/tests/testthat/test-first_isolate.R @@ -17,10 +17,11 @@ test_that("first isolates work", { suppressWarnings( sum( first_isolate(tbl = septic_patients %>% mutate(keyab = key_antibiotics(.)), - col_date = "date", - col_patient_id = "patient_id", - col_mo = "mo", - col_keyantibiotics = "keyab", + # let syntax determine these automatically: + # col_date = "date", + # col_patient_id = "patient_id", + # col_mo = "mo", + # col_keyantibiotics = "keyab", type = "keyantibiotics", info = TRUE), na.rm = TRUE)),