R: Maximum number of generations

gen.max {GENLIB} | R Documentation

## Maximum number of generations

### Description

Returns the maximum number of generations between all probands and the individuals specified. Probands are defined as the individuals without children in the genealogy.

### Usage

    gen.max( gen, individuals)

### Arguments

`gen` | An object of class GLgen obtained with gen.genealogy, gen.lineages or gen.branching. Required.
`individuals` | A vector of ids specifying the individuals to include in the calculation. Required.

### Value

returns a vector of integer

### See Also

`gen.genealogy` `gen.mean` `gen.min` `gen.depth` `gen.meangendepth`

### Examples

    data(geneaJi)
    genJi<-gen.genealogy(geneaJi)
    gen.min(genJi,c(17,26))
    gen.mean(genJi,c(17,26))
    gen.max(genJi,c(17,26))

    data(genea140)
    gen140<-gen.genealogy(genea140)
    gen.min(gen140,c(18311,18430))
    gen.mean(gen140,c(18311,18430))
    gen.max(gen140,c(18311,18430))

[Package GENLIB version 1.0.8 Index]