1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-08 23:21:56 +02:00

(v1.4.0.9026) docu update

This commit is contained in:
2020-11-24 11:47:54 +01:00
parent b045b571a6
commit 7b42b15c90
21 changed files with 47 additions and 50 deletions

View File

@ -50,7 +50,7 @@ filter_first_weighted_isolate(
)
}
\arguments{
\item{x, .data}{a \link{data.frame} containing isolates.}
\item{x}{a \link{data.frame} containing isolates.}
\item{col_date}{column name of the result date (or date that is was received on the lab), defaults to the first column with a date class}
@ -84,7 +84,7 @@ filter_first_weighted_isolate(
\item{include_unknown}{logical to determine whether 'unknown' microorganisms should be included too, i.e. microbial code \code{"UNKNOWN"}, which defaults to \code{FALSE}. For WHONET users, this means that all records with organism code \code{"con"} (\emph{contamination}) will be excluded at default. Isolates with a microbial ID of \code{NA} will always be excluded as first isolate.}
\item{...}{parameters passed on to the \code{\link[=first_isolate]{first_isolate()}} function}
\item{...}{parameters passed on to \code{\link[=first_isolate]{first_isolate()}} when using \code{\link[=filter_first_isolate]{filter_first_isolate()}}, or parameters passed on to \code{\link[=key_antibiotics]{key_antibiotics()}} when using \code{\link[=filter_first_weighted_isolate]{filter_first_weighted_isolate()}}}
}
\value{
A \code{\link{logical}} vector

View File

@ -99,7 +99,7 @@ labels_rsi_count(
\item{nrow}{(when using \code{facet}) number of rows}
\item{colours}{a named vector with colours for the bars. The names must be one or more of: S, SI, I, IR, R or be \code{FALSE} to use default [ggplot2][\code{\link[ggplot2:ggplot]{ggplot2::ggplot()}} colours.}
\item{colours}{a named vector with colours for the bars. The names must be one or more of: S, SI, I, IR, R or be \code{FALSE} to use default \link[ggplot2:ggplot]{ggplot2} colours.}
\item{datalabels}{show datalabels using \code{\link[=labels_rsi_count]{labels_rsi_count()}}}
@ -194,13 +194,12 @@ if (require("ggplot2") & require("dplyr")) {
}
\donttest{
# resistance of ciprofloxacine per age group
example_isolates \%>\%
mutate(first_isolate = first_isolate(.)) \%>\%
filter(first_isolate == TRUE,
mo == as.mo("E. coli")) \%>\%
# `age_groups` is also a function of this AMR package:
# age_groups() is also a function in this AMR package:
group_by(age_group = age_groups(age)) \%>\%
select(age_group,
CIP) \%>\%

View File

@ -22,7 +22,7 @@ This function determines which items in a vector can be considered (the start of
\details{
Dates are first sorted from old to new. The oldest date will mark the start of the first episode. After this date, the next date will be marked that is at least \code{episode_days} days later than the start of the first episode. From that second marked date on, the next date will be marked that is at least \code{episode_days} days later than the start of the second episode which will be the start of the third episode, and so on. Before the vector is being returned, the original order will be restored.
The \code{dplyr} package is not required for this function to work, but this function works conveniently inside \code{dplyr} verbs such as \code{\link[=filter]{filter()}}, \code{\link[=mutate]{mutate()}} and \code{\link[=summarise]{summarise()}}.
The \code{dplyr} package is not required for this function to work, but this function works conveniently inside \code{dplyr} verbs such as \code{\link[dplyr:filter]{filter()}}, \code{\link[dplyr:mutate]{mutate()}} and \code{\link[dplyr:summarise]{summarise()}}.
}
\section{Experimental lifecycle}{