int2ageN | R Documentation |
This is a frequent grouping situation. For a given vector of lower age bounds, as implied by AgeInt
, repeat each value N times, where N is the width of the corresponding age interval. Age intervals are in this case given, and age lower bound values are calculated from AgeInt
vector.
int2ageN(AgeInt, OAG)
AgeInt |
integer or numeric. Vector of age intervals. |
OAG |
logical. Whether or not the final age group open. Default |
If OAG == TRUE
then the last value is given just once, irrespective of the final value of AgeInt
, otherwise the final age interval is repeated AgeInt[length(AgeInt)]
times. Here intervals do not need to be of uniform width.
integer vector of elements of Age
repeated once for each implied single age.
int5 <- rep(5,21)
(ageN1 <- int2ageN(int5, OAG = FALSE))
(ageN2 <- int2ageN(int5, OAG = TRUE))
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.