R: Create object of class GLgen

gen.genealogy {GENLIB} | R Documentation

## Create object of class GLgen

### Description

Creates an object of class GLgen that contains the ascending genealogies derived from input data in pedigree format

### Usage

    gen.genealogy(ped, autoComplete=FALSE, ...)

### Arguments

`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. 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.
`autoComplete` | If TRUE, any non-zero father and mother id numbers not appearing in the individual id column, will be added in the individual column as having no father or mother (both set to 0). Default to FALSE.
`...` | Option to pass additionnal arguments automaticaly between methods. Internal use only.

### Value

An object of class GLgen.

### See Also

`gen.graph` `gen.genout`

### Examples

    ind<-c(1,2,3,11:21,101:108,201:202)
    father<-c(11,15,15,102,0,102,0,103,103,103,105,105,107,107,0,202,0,202,202,0,202,0,0,0)
    mother<-c(12,14,14,101,0,101,0,104,104,104,106,106,108,108,0,201,0,201,201,0,201,0,0,0)
    sex<-c(1,2,2,1,2,1,2,1,2,1,2,2,2,1,2,1,1,2,1,2,1,2,2,1)
    gen.df<-data.frame(ind, father, mother, sex)
    gen.genealogy(gen.df)

    data(geneaJi)
    geneaJi[1:5,]
    genJi<-gen.genealogy(geneaJi)
    # Print basic information about the genealogy
    genJi

[Package GENLIB version 1.1.5 Index]