Function that converts numeric age values to user defined age groups.
Usage
a2g(ages, mydist)
Value
Returns a Character class vector object of age distribution values defined by the mydist argument. The function will otherwise return an error message stating that the function requires a numeric class object.
Arguments
ages
Vector of Numeric class age values.
mydist
Vector of Character class age distributions. Values must be two integers separated by a hyphen. Remove any whitespaces on either side of the hyphen.