1
0
mirror of https://github.com/msberends/AMR.git synced 2025-07-12 23:41:57 +02:00

(v1.0.1.9000) first PCA implementation

This commit is contained in:
2020-03-07 21:48:21 +01:00
parent f444c24ed3
commit fa0d9c58d9
40 changed files with 2224 additions and 172 deletions

View File

@ -11,16 +11,16 @@ age_groups(x, split_at = c(12, 25, 55, 75), na.rm = FALSE)
\item{split_at}{values to split \code{x} at, defaults to age groups 0-11, 12-24, 25-54, 55-74 and 75+. See Details.}
\item{na.rm}{a logical to indicate whether missing values should be removed}
\item{na.rm}{a \link{logical} to indicate whether missing values should be removed}
}
\value{
Ordered \code{\link{factor}}
Ordered \link{factor}
}
\description{
Split ages into age groups defined by the \code{split} parameter. This allows for easier demographic (antimicrobial resistance) analysis.
}
\details{
To split ages, the input can be:
To split ages, the input for the \code{split_at} parameter can be:
\itemize{
\item A numeric vector. A vector of e.g. \code{c(10, 20)} will split on 0-9, 10-19 and 20+. A value of only \code{50} will split on 0-49 and 50+.
The default is to split on young children (0-11), youth (12-24), young adults (25-54), middle-aged adults (55-74) and elderly (75+).
@ -29,7 +29,7 @@ The default is to split on young children (0-11), youth (12-24), young adults (2
\item \code{"children"} or \code{"kids"}, equivalent of: \code{c(0, 1, 2, 4, 6, 13, 18)}. This will split on 0, 1, 2-3, 4-5, 6-12, 13-17 and 18+.
\item \code{"elderly"} or \code{"seniors"}, equivalent of: \code{c(65, 75, 85)}. This will split on 0-64, 65-74, 75-84, 85+.
\item \code{"fives"}, equivalent of: \code{1:20 * 5}. This will split on 0-4, 5-9, 10-14, ..., 90-94, 95-99, 100+.
\item \code{"tens"}, equivalent of: \code{1:10 * 10}. This will split on 0-9, 10-19, 20-29, ... 80-89, 90-99, 100+.
\item \code{"tens"}, equivalent of: \code{1:10 * 10}. This will split on 0-9, 10-19, 20-29, ..., 80-89, 90-99, 100+.
}
}
}