removeIndividual: Remove individual from pedigree

Description Usage Arguments Details Author(s) See Also Examples

View source: R/removeIndividual.R

Description

removeIndividual provides utility for removing individuals from a pedigree.

Usage

1
removeIndividual(x, individual, remove="all")

Arguments

x

pedigree

individual

vector of individuals

remove

character, column names of id columns and/or "all", see details

Details

Individuals passed to argument individual will be removed from the pedigree. If there is a pedigree with individual "id" and two ascendants, say "father" and "mother", then one can pass any combination of these three id columns or "all" for all of them in short to argument remove. In case only "id" is passed to remove, individuals will be removed from the pedigree, but not from ascendant id columns, which might be a matter of interest only if specified individuals show up as ascendants for some other individuals. In case you want to remove an individual completely from the pedigree "all" must be used.

Individuals in id column are removed via removal of the whole record from the pedigree. Individuals in ascendant id columns are only replaced by attr(x, "unknown").

If founder is removed, attribute extended status is changed to FALSE.

Author(s)

Gregor Gorjanc

See Also

Pedigree

Examples

1
2
3
4
5
6
  ped <- generatePedigree(3)
  summary(ped)
  removeIndividual(ped, individual=c(1, 3, 4), remove="father")
  removeIndividual(ped, individual=c(1, 3, 4), remove=c("mother", "father"))
  (ped <- removeIndividual(ped, individual=c(1, 3, 4), remove=c("all")))
  summary(ped)

GeneticsPed documentation built on Nov. 8, 2020, 5:54 p.m.