Often as a shorthand we pull lower age bounds from the names of a vector. This modulates that action, and allows for giving several vectors to check for names.

names2age(...)

Arguments

...

one or more vectors of any class, which has/have a names attribute.

Value

integer vector of ages (presumably).

Details

If more than one vector is given, names are pulled from the first available named vector. All vectors must be of the same length. If no names are available on any vector, then NAs are returned. This clearly won't work if the names on the vector are of something else.