Learn R Programming

nprcgenekeepr (version 1.0.5)

getPyramidAgeDist: Get the age distribution for the pedigree

Description

Forms a dataframe with columns id, birth, sex, and age for those animals with a status of Alive in the pedigree.

Usage

getPyramidAgeDist(ped = NULL)

Arguments

ped

dataframe with pedigree

Value

A pedigree with status column added, which describes the animal as ALIVE or DECEASED and a age column added, which has the animal's age in years or NA if it cannot be calculated. The exit column values have been remapped to valid dates or NA.

Details

The lubridate package is used here because of the way the modern Gregorian calendar is constructed, there is no straightforward arithmetic method that produces a person<U+2019>s age, stated according to common usage <U+2014> common usage meaning that a person<U+2019>s age should always be an integer that increases exactly on a birthday.

Examples

Run this code
# NOT RUN {
library(nprcgenekeepr)
ped <- getPyramidAgeDist()
# }
# NOT RUN {
# }

Run the code above in your browser using DataLab