Assign single ages to 5-year abridged age groups. That means that age 0 is kept as a single age, ages 1-4 are grouped together as abridged age 1, and thereafter 5-year age groups are used.
calcAgeAbr(Age)
Age | integer. Vector of single ages (lower bound). |
---|
An integer vector of length(Age)
indicating the abridged age group that each single age belongs to.
In the case that the single Age
vector starts at some age higher than 4,
this is just the same as calcAgeN(Age,5,0)
.
Age <- 0:70 calcAgeAbr(Age)#> [1] 0 1 1 1 1 5 5 5 5 5 10 10 10 10 10 15 15 15 15 15 20 20 20 20 20 #> [26] 25 25 25 25 25 30 30 30 30 30 35 35 35 35 35 40 40 40 40 40 45 45 45 45 45 #> [51] 50 50 50 50 50 55 55 55 55 55 60 60 60 60 60 65 65 65 65 65 70#> [1] 0 0 0 0 0 5 5 5 5 5 10 10 10 10 10 15 15 15 15 15 20 20 20 20 20 #> [26] 25 25 25 25 25 30 30 30 30 30 35 35 35 35 35 40 40 40 40 40 45 45 45 45 45 #> [51] 50 50 50 50 50 55 55 55 55 55 60 60 60 60 60 65 65 65 65 65 70