addPersonToPed: addPersonToTree A function to add a new person to an existing...

View source: R/tweakPedigree.R

addPersonToPedR Documentation

addPersonToTree A function to add a new person to an existing pedigree data.frame.

Description

addPersonToTree A function to add a new person to an existing pedigree data.frame.

Usage

addPersonToPed(
  ped,
  name = NULL,
  sex = NULL,
  momID = NA,
  dadID = NA,
  twinID = NULL,
  personID = NULL,
  zygosity = NULL
)

Arguments

ped

A data.frame representing the existing pedigree.

name

Optional. A character string representing the name of the new person. If not provided, the name will be set to NA.

sex

A value representing the sex of the new person.

momID

Optional. The ID of the mother of the new person. If not provided, it will be set to NA.

dadID

Optional. The ID of the father of the new person. If not provided, it will be set to NA.

twinID

Optional. The ID of the twin of the new person. If not provided, it will be set to NA.

personID

Optional. The ID of the new person. If not provided, it will be generated as the maximum existing personID + 1.

zygosity

Optional. A character string indicating the zygosity of the new person. If not provided, it will be set to NA.

Value

A data.frame with the new person added to the existing pedigree.


BGmisc documentation built on June 11, 2025, 1:07 a.m.