Description Usage Arguments Details Value
Assign single ages to age groups of equal and arbitrary width, and also optionally shifted.
1 | calcAgeN(Age, N = 5, shiftdown = 0)
|
Age |
integer. Vector of single ages (lower bound). |
N |
integer. Desired width of resulting age groups. |
shiftdown |
integer. Move the grouping down by one or more single ages. Optional argument. |
If you shift the groupings, then the first age groups may have a negative
lower bound (for example of -5). These counts would be discarded for the
oscillatory version of Sprague smoothing, for example, but they are preserved
in this function. The important thing to know is that if you shift the
groups, the first and last groups won't be N years wide. For example if
shiftdown
is 1, the first age group is 4-ages wide.
An integer vector of length(Age)
indicating the age group that
each single age belongs to.
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.