R: Create pedigree data

gen.genout {GENLIB} | R Documentation

## Create pedigree data

### Description

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

### Usage

    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

    data(geneaJi)
    # Original data is a data.frame
    geneaJi[1:12,]

    genJi<-gen.genealogy(geneaJi)
    # As a genealogy object
    genJi

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

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

[Package GENLIB version 1.0.9 Index]