addParents: Add parents

Description Usage Arguments Details Value Examples

View source: R/addParents.R

Description

Pedigree curation function Given a pedigree, find any IDs listed in the "sire" or "dam" columns that lack their own line entry and generate one.

Usage

1

Arguments

ped

datatable that is the 'Pedigree'. It contains pedigree information including the IDs listed in candidates.

Details

This must be run after to addUIds since the IDs made there are used by addParents

Value

An updated pedigree with entries added as necessary. Entries have the id and sex specified; all remaining columns are filled with NA.

Examples

1
2
3
4
5
6
7
pedTwo <- data.frame(id = c("d1", "s2", "d2", "o1", "o2", "o3", "o4"),
                     sire = c(NA, NA, NA, "s1", "s1", "s2", "s2"),
                     dam = c(NA, NA, NA, "d1", "d2", "d2", "d2"),
                     sex = c("F", "M", "F", "F", "F", "F", "M"),
                     stringsAsFactors = FALSE)
newPed <- addParents(pedTwo)
newPed

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