age_format: Formatting yyy-mm ages as years

View source: R/format_age.R

age_formatR Documentation

Formatting yyy-mm ages as years

Description

Takes a character string (or list) representing an age as years-months (e.g. 13-06 for 13 years, 6 months) and converts it to a character value (13.5) or a list of values representing ages in years.

Usage

age_format(x)

Arguments

x

A character vector of ages in yyy-mm format (e.g. 93-03) to be converted to years (93.25)

Value

returns the value of the string x which represents an age in yyy-mm format (93-03) and converts it to years (93.25)

See Also

age_format_helper age_format uses age_format_helper

Examples

age_format("13-06")
age_format(c("13-06", "25-03", NA))


gpilgrim2670/SwimmeR documentation built on March 26, 2023, 5:05 p.m.