Create pedigree data

Share:

Description

Creates data frame in pedigree format from an object of class GLgen

Usage

1
gen.genout( gen, sorted = "F")

Arguments

gen

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

sorted

If sorted="F" (default), individual id number are not sorted in output data. Id numbers for parents will be placed before their children ids. If sorted="T", individual id numbers will be sorted.

Value

returns a data.frame containing the following: ind father mother sex

See Also

gen.genealogy gen.graph gen.branching gen.lineages

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
data(geneaJi) 
## Not run: original data is a data.frame
geneaJi[1:12,]

genJi<-gen.genealogy(geneaJi) 
## Not run: as a genealogy object
genJi

## Not run: Genealogy as a data.frame
genJi_df<-gen.genout(genJi)
genJi_df[1:12,]

## Not run: Maternal lineage 
genJi_MaLi<-gen.lineages(geneaJi, maternal = TRUE) 
## Not run: Maternal lineage as a data.frame
genJi_MaLi_df<-gen.genout(genJi_MaLi)
genJi_MaLi_df

Want to suggest features or report bugs for rdrr.io? Use the GitHub issue tracker.