View source: R/fonctionsBase.R
gen.lineages | R Documentation |
Creates an object of class GLgen that contains maternal or paternal lineages selected from input data in pedigree format
gen.lineages(ped, pro = "0", maternal = TRUE, ...)
ped |
A matrix or data frame with the following columns: individual id, father id, mother id, sex. Required. Individal id numbers must be numeric and unique. If an individual does not have a father and/or mother, the father and/or mother id numbers must be set to 0. All non-zero father and mother id numbers must also appear in the individual id column. Sex must be equal to M or 1 for males and F or 2 for females. The sex column is optional for this function but necessary for some other functions using GLgen objects. |
pro |
Vector of individual id numbers for which lineages should be included. Optional. |
maternal |
If mat=TRUE (default), maternal lineages are selected. mat=FALSE returns paternal lineages. |
... |
Option to pass additionnal arguments automaticaly between methods. Internal use only. |
returns a GLgen object
gen.genealogy
gen.graph
gen.branching
gen.genout
data(geneaJi)
genJi <- gen.genealogy(geneaJi)
genJi_MaLi<-gen.lineages(geneaJi, maternal = TRUE)
genJi_FaLi<-gen.lineages(geneaJi, maternal = FALSE)
# Plots of original genealogy and maternal and paternal lineages
layout(matrix(1:3,c(1,3),byrow=TRUE), widths =c(3,1,1), heights = 1)
gen.graph(genJi)
mtext("Original", line=2)
gen.graph(genJi_MaLi)
mtext("Maternal\nlineages", line=1)
gen.graph(genJi_FaLi)
mtext("Paternal\nlineages", line=1)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.