mirror of
https://github.com/msberends/AMR.git
synced 2025-07-12 16:21:59 +02:00
age_groups fix
This commit is contained in:
@ -26,8 +26,8 @@ To split ages, the input can be:
|
||||
\itemize{
|
||||
\item{\code{"children"}, 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, 95)}. This will split on 0-64, 65-74, 75-84, 85-94 and 95+.}
|
||||
\item{\code{"fives"}, equivalent of: \code{1:20 * 5}. This will split on 0-4, 5-9, 10-14, 15-19 and so forth.}
|
||||
\item{\code{"tens"}, equivalent of: \code{1:10 * 10}. This will split on 0-9, 10-19, 20-29 and so forth.}
|
||||
\item{\code{"fives"}, equivalent of: \code{1:24 * 5}. This will split on 0-4, 5-9, 10-14, 15-19 and so forth, until 120.}
|
||||
\item{\code{"tens"}, equivalent of: \code{1:12 * 10}. This will split on 0-9, 10-19, 20-29 and so forth, until 120.}
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -46,11 +46,11 @@ age_groups(ages, 50)
|
||||
age_groups(ages, c(20, 50))
|
||||
|
||||
# split into groups of ten years
|
||||
age_groups(ages, 1:10 * 10)
|
||||
age_groups(ages, 1:12 * 10)
|
||||
age_groups(ages, split_at = "tens")
|
||||
|
||||
# split into groups of five years
|
||||
age_groups(ages, 1:20 * 5)
|
||||
age_groups(ages, 1:24 * 5)
|
||||
age_groups(ages, split_at = "fives")
|
||||
|
||||
# split specifically for children
|
||||
|
Reference in New Issue
Block a user