names2age: detect ages from names of vector(s)

View source: R/utilsAge.R

names2ageR Documentation

detect ages from names of vector(s)

Description

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.

Usage

names2age(...)

Arguments

...

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

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.

Value

integer vector of ages (presumably).


timriffe/DemoTools documentation built on Oct. 14, 2024, 12:53 p.m.