addSexAndAgeToGroup: Build a group data frame with ID, sex, and age

View source: R/addSexAndAgeToGroup.R

addSexAndAgeToGroupR Documentation

Build a group data frame with ID, sex, and age

Description

Build a group data frame with ID, sex, and age

Usage

addSexAndAgeToGroup(ids, ped)

Arguments

ids

character vector of animal IDs

ped

The pedigree information in data.frame format

Details

An empty ids vector yields a zero-row data frame that still contains all three columns (ids, sex, age), with sex an empty factor, so the returned schema does not depend on the number of ids supplied.

Value

Dataframe with Id, Sex, and Current Age

Examples

library(nprcgenekeepr)
data("qcBreeders")
data("qcPed")
df <- addSexAndAgeToGroup(ids = qcBreeders, ped = qcPed)
head(df)

nprcgenekeepr documentation built on July 26, 2026, 5:06 p.m.