Learn R Programming

Biograph (version 2.0.6)

year_as_age: Converts decinal years to age.

Description

Converts a vector of decimal years to ages. The function requires birth dates.

Usage

year_as_age (x,born,format.born)

Arguments

x
Vector of decimal years.
born
Vector of dates of birth. Class is 'Date'
format.born
format of dates of birth.

Value

Examples

Run this code
	year_as_age (2010.578,"1990-10-30","%Y-%m-%d")
    # result: 19.7506

Run the code above in your browser using DataLab