1
0
mirror of https://github.com/msberends/AMR.git synced 2024-12-25 18:46:11 +01:00

small text fixes

This commit is contained in:
dr. M.S. (Matthijs) Berends 2018-12-14 07:48:12 +01:00
parent 81af7be36e
commit 7e5fe75a17
8 changed files with 13 additions and 16 deletions

View File

@ -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)
#'

View File

@ -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

View File

@ -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.')

View File

@ -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

View File

@ -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)

View File

@ -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}

View File

@ -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{

View File

@ -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)),