GENLIB (version 1.0.6)

gen.branching: 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

See Also

gen.genealogy gen.graph gen.lineages

Examples

Run this code
# NOT RUN {
data(geneaJi) 
genJi<-gen.genealogy(geneaJi)
genJi_part<-gen.branching(genJi,pro=c(2,28)) 

# }
# NOT RUN {
Plots of original genealogy and of the branched version
# }
# NOT RUN {
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)

# }

Run the code above in your browser using DataLab