mirror of
https://github.com/msberends/AMR.git
synced 2025-07-08 18:41:58 +02:00
(v1.6.0.9061) age() update
This commit is contained in:
@ -7,9 +7,9 @@
|
||||
age(x, reference = Sys.Date(), exact = FALSE, na.rm = FALSE, ...)
|
||||
}
|
||||
\arguments{
|
||||
\item{x}{date(s), will be coerced with \code{\link[=as.POSIXlt]{as.POSIXlt()}}}
|
||||
\item{x}{date(s), \link{character} (vectors) will be coerced with \code{\link[=as.POSIXlt]{as.POSIXlt()}}}
|
||||
|
||||
\item{reference}{reference date(s) (defaults to today), will be coerced with \code{\link[=as.POSIXlt]{as.POSIXlt()}}}
|
||||
\item{reference}{reference date(s) (defaults to today), \link{character} (vectors) will be coerced with \code{\link[=as.POSIXlt]{as.POSIXlt()}}}
|
||||
|
||||
\item{exact}{a \link{logical} to indicate whether age calculation should be exact, i.e. with decimals. It divides the number of days of \href{https://en.wikipedia.org/wiki/Year-to-date}{year-to-date} (YTD) of \code{x} by the number of days in the year of \code{reference} (either 365 or 366).}
|
||||
|
||||
@ -25,6 +25,8 @@ Calculates age in years based on a reference date, which is the sytem date at de
|
||||
}
|
||||
\details{
|
||||
Ages below 0 will be returned as \code{NA} with a warning. Ages above 120 will only give a warning.
|
||||
|
||||
This function vectorises over both \code{x} and \code{reference}, meaning that either can have a length of 1 while the other argument has a larger length.
|
||||
}
|
||||
\section{Stable Lifecycle}{
|
||||
|
||||
|
@ -53,7 +53,7 @@ penicillins(only_rsi_columns = FALSE)
|
||||
tetracyclines(only_rsi_columns = FALSE)
|
||||
}
|
||||
\arguments{
|
||||
\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.}
|
||||
\item{ab_class}{an antimicrobial class, such as \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.}
|
||||
|
||||
\item{only_rsi_columns}{a \link{logical} to indicate whether only columns of class \verb{<rsi>} must be selected (defaults to \code{FALSE}), see \code{\link[=as.rsi]{as.rsi()}}}
|
||||
}
|
||||
|
Reference in New Issue
Block a user