gen.branching: Genealogy subset

View source: R/fonctionsBase.R

gen.branchingR Documentation

Genealogy subset

Description

Creates an object of class GLgen from an existing GLgen object by selecting specified individuals.

Usage

gen.branching( gen, pro = 0, ancestors = gen.founder(gen), bflag = 0)

Arguments

gen

An object of class GLgen obtained with gen.genealogy, gen.lineages or gen.branching. Required.

pro

Vector of proband id numbers to be included. Default is 0, which will select all individuals without children.

ancestors

Vector of ancestors id numbers to be included. Default includes all founders in the original GLgen object.

bflag

If set to 0 (default and recommended), probands and founders are filtered to quicken the calculations.

Value

returns a GLgen object

Note

Note that if there are no links between some probands and ancestors, these ids will not be included.

See Also

gen.genealogy gen.graph gen.lineages

Examples

data(geneaJi) 
genJi<-gen.genealogy(geneaJi)
genJi_part<-gen.branching(genJi,pro=c(2,28)) 

# Plots of original genealogy and of the branched version
layout(matrix(1:2,c(1,2),byrow=TRUE))
gen.graph(genJi) 
mtext("Original", line=2, cex=1.2)
gen.graph(genJi_part) 
mtext("Branched tree\nfor individuals 2 and 28", line=1, cex=1.2)


GENLIB documentation built on Jan. 17, 2023, 5:16 p.m.

Related to gen.branching in GENLIB...