calcAge: Calculate animal ages.

Description Usage Arguments Details Value Examples

View source: R/calcAge.R

Description

Part of Pedigree Curation

Usage

1
calcAge(birth, exit)

Arguments

birth

Date vector of birth dates

exit

Date vector of exit dates.

Details

Given vectors of birth and exit dates, calculate an individuals age. If no exit date is provided, the calculation is based on the current date.

Value

A numeric vector (NA allowed) indicating age in decimal years from "birth" to "exit" or the current date if "exit" is NA.

Examples

1
2
3
4
5
library(nprcgenekeepr)
qcPed <- nprcgenekeepr::qcPed
originalAge <- qcPed$age ## ages calculated at time of data collection
currentAge <- calcAge(qcPed$birth, qcPed$exit) ## assumes no changes in
                                               ## colony

rmsharp/nprcmanager documentation built on April 24, 2021, 3:13 p.m.