inferAgeIntAbr | R Documentation |
This function is an auxiliary used by top level functions where it is
guaranteed that age groups are standard abridged age groups. If Age
is specified,
this will work as well for other age groupings.
inferAgeIntAbr(Age, vec, OAG = FALSE, OAvalue = NA)
Age |
integer. Vector of lower bound of each age group. |
vec |
Any vector, presumably a count, rate, or similar. |
OAG |
logical. Whether or not the final age group open. Default |
OAvalue |
numeric or integer. The value to use for the final age interval if |
If based solely on the length of a vector, this will give erroneous results if ages
are anything other than standard abridged ages groups. If the final age group is open, the
interval width is defined as NA
. Inf
or -1
would have
also been a good choice, but we went with NA
.
An integer vector of length(vec)
indicating the width of the abridged age group that each
vector element corresponds to.
vec <- runif(20)
inferAgeIntAbr(vec = vec)
inferAgeIntAbr(vec = vec, OAG = TRUE)
inferAgeIntAbr(Age = 0:100, OAG = TRUE)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.